/* Transcript labels */
:root {
  /* Quick global dimmer for chrome/surfaces without directly dimming text. */
  --ui-global-dim-strength: 0.18;
  /* User-owned theme seeds. All application effects derive from these values. */
  --theme-surface: #121b25;
  --theme-surface-rgb: 18 27 37;
  --theme-primary: #36c7de;
  --theme-primary-rgb: 54 199 222;
  --theme-accent: #2b8f9f;
  --theme-accent-rgb: 43 143 159;
  --theme-canvas: #080d13;
  --theme-canvas-rgb: 8 13 19;
  --theme-text: #e4e9ef;
  --theme-text-rgb: 228 233 239;
  --theme-border-choice: #2b3948;
  --theme-border-choice-rgb: 43 57 72;
  --theme-panel-border: #2b3948;
  --theme-background-image: var(--octopus-bg);
  --theme-surface-lift: color-mix(in srgb, var(--theme-surface) 88%, var(--theme-primary));
  --theme-surface-deep: color-mix(in srgb, var(--theme-surface) 62%, black);
  --theme-canvas-deep: color-mix(in srgb, var(--theme-canvas) 28%, black);
  --theme-primary-soft: color-mix(in srgb, var(--theme-primary) 56%, white);
  --theme-primary-pale: color-mix(in srgb, var(--theme-primary) 28%, white);
  --theme-primary-faint: color-mix(in srgb, var(--theme-primary) 18%, white);
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 58%, white);
  --theme-text-secondary: color-mix(in srgb, var(--theme-text) 78%, transparent);
  --theme-text-muted: color-mix(in srgb, var(--theme-text) 62%, transparent);
  --theme-surface-muted: color-mix(in srgb, var(--theme-surface) 94%, white);
  --theme-border: color-mix(in srgb, var(--theme-primary) 22%, var(--theme-surface-muted));
  --app-sidebar-background: var(--theme-surface);
  --app-mini-sidebar-background:
    radial-gradient(ellipse 110px 360px at top right, rgb(var(--theme-primary-rgb) / 30%), transparent 72%),
    linear-gradient(180deg, var(--theme-surface) 0%, var(--theme-surface-lift) 52%, var(--theme-surface) 100%);
  --app-chrome-background: color-mix(in srgb, var(--theme-canvas) 78%, black);
  --app-navbar-height: 56px;
  --color-accent-warm: #d6a84f;
  --color-accent-warm-soft: rgba(214, 168, 79, 0.18);
  --color-accent-warm-border: rgba(214, 168, 79, 0.62);
  --color-border-active: rgb(var(--theme-primary-rgb) / 72%);
  --color-border-control: rgb(var(--theme-primary-rgb) / 28%);
  --color-border-subtle: rgb(var(--theme-primary-rgb) / 18%);
  --color-surface-card: color-mix(in srgb, var(--theme-surface) 86%, transparent);
  --color-surface-card-lifted: color-mix(in srgb, var(--theme-surface-lift) 88%, transparent);
  --color-surface-control: color-mix(in srgb, var(--theme-surface-lift) 92%, transparent);
  --color-text-secondary: var(--theme-text-secondary);
  --space-action-bar-content-top: 32px;
  --space-compact-card-stack: 11px;
}

/* Operator Academy: visible human correction and forgetting engine. */
.operator-academy {
  --academy-ink: #172126;
  --academy-muted: #607078;
  --academy-line: rgba(23, 33, 38, 0.14);
  --academy-paper: rgba(255, 255, 255, 0.88);
  --academy-green: #18785d;
  --academy-amber: #a96116;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 72px;
  color: var(--academy-ink);
}

.operator-academy-hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  padding: 30px 0 24px;
  border-bottom: 1px solid var(--academy-line);
}

.operator-academy-hero h1,
.operator-academy-section-heading h2 {
  margin: 2px 0 8px;
  color: #deebef;
  letter-spacing: -0.035em;
}

.operator-academy-hero h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); }
.operator-academy-hero p { max-width: 760px; margin: 0; color: #8ca7b1; }

.operator-academy-eyebrow,
.operator-academy-source-label {
  color: var(--academy-green) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.operator-academy-runtime-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  padding: 12px 14px;
  border: 1px solid var(--academy-line);
  border-radius: 14px;
  background: var(--academy-paper);
}

.operator-academy-runtime-card div { display: grid; gap: 2px; }
.operator-academy-runtime-card small { color: var(--academy-muted); }
.operator-academy-runtime-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--academy-green); box-shadow: 0 0 0 5px rgba(24, 120, 93, 0.12); }

.operator-academy-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  padding: 22px 0;
}

.operator-academy-metric {
  display: grid;
  gap: 5px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--academy-line);
  border-radius: 14px;
  background: var(--academy-paper);
}

.operator-academy-metric > span { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.operator-academy-metric > strong { font-size: 2rem; line-height: 1; }
.operator-academy-metric > small { color: var(--academy-muted); line-height: 1.3; }
.operator-academy-metric--published,
.operator-academy-metric--cited,
.operator-academy-metric--indexed { border-top: 3px solid var(--academy-green); }
.operator-academy-metric--draft,
.operator-academy-metric--supplied { border-top: 3px solid var(--academy-amber); }
.operator-academy-metric--archived,
.operator-academy-metric--rejected { border-top: 3px solid #7a858a; }

.operator-academy-explainer {
  display: grid;
  grid-template-columns: minmax(170px, 0.5fr) minmax(280px, 1.5fr);
  gap: 6px 24px;
  padding: 18px 20px;
  color: #ecf8f3;
  border-radius: 16px;
  background: #183c33;
}

.operator-academy-explainer small { grid-column: 2; color: rgba(236, 248, 243, 0.72); }
.operator-academy-list { margin-top: 34px; }
.operator-academy-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.operator-academy-section-heading p,
.operator-academy-section-heading h2 { margin-bottom: 0; }
.operator-academy-section-heading > span { color: #8ca7b1; }

.operator-academy-project-shelf {
  margin: 18px 0 30px;
  padding: 18px;
  border: 1px solid rgba(140, 167, 177, 0.22);
  border-radius: 20px;
  background: rgba(8, 22, 28, 0.18);
}

.operator-academy-project-shelf--project { border-top: 3px solid var(--academy-green); }
.operator-academy-project-shelf--personal { border-top: 3px solid var(--academy-amber); }
.operator-academy-project-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 2px 16px; }
.operator-academy-project-heading h3 { margin: 2px 0 4px; color: #deebef; font-size: 1.45rem; }
.operator-academy-project-heading p { margin: 0; color: #8ca7b1; }
.operator-academy-project-heading > span { color: #8ca7b1; white-space: nowrap; }

.operator-academy-empty,
.operator-correction-card,
.operator-academy-source-card,
.operator-academy-form {
  border: 1px solid var(--academy-line);
  border-radius: 18px;
  background: var(--academy-paper);
}

.operator-academy-empty { padding: 36px; text-align: center; }
.operator-correction-card { padding: 20px; margin-bottom: 14px; box-shadow: 0 12px 35px rgba(29, 47, 54, 0.05); }
.operator-correction-card--published { border-left: 4px solid var(--academy-green); }
.operator-correction-card--draft { border-left: 4px solid var(--academy-amber); }
.operator-correction-card--retired,
.operator-correction-card--rejected { opacity: 0.82; border-left: 4px solid #7a858a; }

.operator-correction-header,
.operator-correction-status-line,
.operator-correction-receipts,
.operator-academy-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.operator-correction-header { justify-content: space-between; }
.operator-correction-status,
.operator-correction-state,
.operator-correction-applicability,
.operator-correction-index {
  padding: 5px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(23, 33, 38, 0.07);
}

.operator-correction-state { color: #fff; background: var(--academy-green); }
.operator-correction-read-only { padding: 5px 9px; color: #5e4b20; border-radius: 999px; background: #f4e7bd; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.operator-correction-index--failed { color: #8b2727; background: #f9dfdf; }
.operator-correction-id { color: var(--academy-muted); font-variant-numeric: tabular-nums; }
.operator-correction-lesson { margin: 20px 0; font-size: 1.08rem; line-height: 1.65; }

.operator-academy-form { padding: 22px; margin-top: 22px; }
.operator-academy-form--inline { padding: 18px 0 4px; margin-top: 12px; border: 0; background: transparent; }
.operator-academy-field { display: grid; gap: 7px; margin-bottom: 16px; }
.operator-academy-field label { font-weight: 750; }
.operator-academy-field textarea,
.operator-academy-field select,
.operator-academy-field input {
  width: 100%;
  padding: 11px 12px;
  color: var(--academy-ink);
  border: 1px solid var(--academy-line);
  border-radius: 10px;
  background: #fff;
}

.operator-academy-lifecycle-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.operator-academy-primary-action,
.operator-academy-secondary-action,
.operator-academy-danger-action,
.message-operator-correction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  border-radius: 9px;
  cursor: pointer;
}

.operator-academy-primary-action { color: #fff; border: 1px solid var(--academy-green); background: var(--academy-green); }
.operator-academy-secondary-action { color: var(--academy-ink); border: 1px solid var(--academy-line); background: #fff; }
.operator-academy-danger-action { color: #8b2727; border: 1px solid #e5bcbc; background: #fff7f7; }

.operator-academy-source-grid,
.operator-correction-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.operator-academy-source-card { padding: 18px; }
.operator-academy-source-card--response { border-top: 3px solid var(--academy-amber); }
.operator-academy-source-text { max-height: 350px; overflow: auto; margin-top: 12px; line-height: 1.55; }
.operator-correction-source { padding: 12px 0; border-top: 1px solid var(--academy-line); }
.operator-correction-source summary { color: var(--academy-muted); cursor: pointer; }
.operator-correction-source-private { padding: 12px 0; color: var(--academy-muted); border-top: 1px solid var(--academy-line); font-size: 0.82rem; }
.operator-correction-source-grid > div { padding: 12px; border-radius: 10px; background: rgba(23, 33, 38, 0.035); }
.operator-correction-source-grid span { display: block; margin-bottom: 8px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.operator-correction-receipts { padding-top: 12px; color: var(--academy-muted); border-top: 1px solid var(--academy-line); font-size: 0.82rem; }
.operator-correction-error { color: #8b2727; }

.message-operator-correction-button { min-height: 30px; padding: 5px 10px; color: var(--academy-green, #18785d); border: 1px solid rgba(24, 120, 93, 0.28); background: rgba(24, 120, 93, 0.06); font-size: 0.76rem; }

.message-turn-actions .message-operator-correction-button {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
}

@media (max-width: 800px) {
  .operator-academy-hero,
  .operator-academy-project-heading,
  .operator-academy-source-grid,
  .operator-correction-source-grid { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .operator-academy-explainer { grid-template-columns: 1fr; }
  .operator-academy-explainer small { grid-column: 1; }
  .operator-academy-lifecycle-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .operator-academy { width: min(100% - 22px, 1180px); }
  .operator-academy-lifecycle-fields { grid-template-columns: 1fr; }
}

/* VisionEngine image workspace */
.vision-workspace {
  width: min(1500px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.vision-workspace-header,
.vision-workspace-folder {
  border: 1px solid color-mix(in srgb, var(--border-color, #cbd5e1) 82%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card-background, #fff) 96%, transparent);
  box-shadow: 0 16px 42px rgb(15 23 42 / 7%);
}

.vision-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
}

.vision-workspace-header h1,
.vision-workspace-folder h2,
.vision-workspace-sidebar h2 {
  margin: 0;
}

.vision-workspace-header p:not(.vision-workspace-eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--text-muted, #64748b);
}

.vision-workspace-eyebrow {
  margin: 0 0 5px;
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.vision-workspace-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vision-workspace-layout {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.vision-workspace-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--border-color, #cbd5e1) 82%, transparent);
  border-radius: 16px;
  background: var(--card-background, #fff);
}

.vision-workspace-sidebar h2 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.vision-workspace-folder-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.vision-workspace-folder-link:hover {
  background: color-mix(in srgb, var(--accent-color, var(--theme-primary)) 9%, transparent);
}

.vision-workspace-folder-link span {
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
}

.vision-workspace-folder-form,
.vision-workspace-folder-rename,
.vision-workspace-asset-form {
  display: grid;
  gap: 8px;
}

.vision-workspace-folder-form {
  margin-top: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.vision-workspace-folder-form input,
.vision-workspace-folder-form select,
.vision-workspace-folder-rename input,
.vision-workspace-asset-form input,
.vision-workspace-asset-form select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 9px;
  background: var(--input-background, #fff);
  color: inherit;
}

.vision-workspace-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.vision-workspace-folder {
  min-height: 170px;
  padding: 18px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.vision-workspace-folder.is-drop-target {
  border-color: var(--accent-color, var(--theme-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color, var(--theme-primary)) 18%, transparent);
}

.vision-workspace-folder-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.vision-workspace-folder-heading > span {
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
}

.vision-workspace-folder-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.vision-workspace-folder-rename {
  grid-template-columns: minmax(120px, 190px) auto;
}

.vision-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 16px;
}

.vision-workspace-asset {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-color, #dbe3ee);
  border-radius: 14px;
  background: var(--card-background, #fff);
  transition: opacity 120ms ease, transform 120ms ease;
}

.vision-workspace-asset[draggable="true"] {
  cursor: grab;
}

.vision-workspace-asset.is-dragging {
  opacity: 0.48;
  transform: scale(0.98);
}

.vision-workspace-preview {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  background: var(--theme-surface);
  place-items: center;
}

.vision-workspace-preview img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
}

.vision-workspace-document-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgb(6 78 59 / 90%);
  color: #ecfdf5;
  font-size: 0.7rem;
  font-weight: 800;
}

.vision-workspace-document-status.is-failed {
  background: rgb(153 27 27 / 92%);
  color: #fef2f2;
}

.vision-workspace-asset-body {
  display: grid;
  gap: 11px;
  padding: 14px;
}

.vision-workspace-filename {
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 800;
}

.vision-workspace-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.88rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.vision-workspace-meta,
.vision-workspace-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
}

.vision-workspace-links a {
  font-weight: 750;
}

.vision-workspace-asset-form {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.vision-workspace-asset-form label,
.vision-workspace-folder-form label {
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
  font-weight: 750;
}

.vision-workspace-empty {
  grid-column: 1 / -1;
  margin: 20px 0;
  color: var(--text-muted, #64748b);
  text-align: center;
}

@media (max-width: 820px) {
  .vision-workspace {
    width: min(100% - 20px, 1500px);
    margin-top: 14px;
  }

  .vision-workspace-header,
  .vision-workspace-folder-heading,
  .vision-workspace-folder-actions {
    flex-direction: column;
  }

  .vision-workspace-layout {
    grid-template-columns: 1fr;
  }

  .vision-workspace-sidebar {
    position: static;
  }
}

/* News and Daily Updates */
.daily-updates-page {
  display: grid;
  gap: 28px;
}

.daily-updates-hero-heading {
  align-items: start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.daily-updates-setup-button {
  font-size: 0.76rem;
  padding: 6px 10px;
}

.daily-updates-setup-lane {
  border-top: 1px solid rgba(148, 184, 226, 0.2);
  margin-top: 20px;
  padding-top: 20px;
}

.daily-updates-inline-form,
.daily-updates-schedule-form,
.daily-updates-source-form {
  align-items: end;
  display: grid;
  gap: 12px;
}

.daily-updates-inline-form {
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 2fr) auto;
}

.daily-updates-source-form {
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) auto;
}

.daily-updates-schedule-form {
  grid-template-columns: minmax(220px, 2fr) minmax(130px, 0.7fr) minmax(220px, 1.4fr) auto;
}

.daily-updates-inline-form input,
.daily-updates-inline-form select,
.daily-updates-schedule-form input,
.daily-updates-schedule-form select,
.daily-updates-source-form input {
  width: 100%;
}

.daily-updates-entry-list li {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.daily-updates-entry-list small {
  display: block;
  overflow-wrap: anywhere;
}

.daily-updates-page .projects-final-deliverable-toolbar--compact {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .daily-updates-inline-form,
  .daily-updates-schedule-form,
  .daily-updates-source-form {
    grid-template-columns: 1fr;
  }
}

.global-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(26, 43, 77, 0.28), rgba(4, 9, 18, 0.72) 54%, rgba(2, 6, 14, 0.86));
  backdrop-filter: blur(2px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.global-loading-active .global-loading-overlay {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.global-loading-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.global-loading-spinner {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 8px solid rgba(148, 163, 184, 0.22);
  border-top-color: #7dd3fc;
  border-right-color: #d6a84f;
  animation: global-loading-spin 820ms linear infinite;
}

.global-loading-label {
  color: var(--theme-primary-faint);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

@keyframes global-loading-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .global-loading-overlay {
    transition: none;
  }

  .global-loading-spinner {
    animation: none;
  }
}

.project-sidebar-shell,
.home-content,
.app-footer {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, var(--ui-global-dim-strength));
}

.message-pending .message-bubble {
  opacity: 0.85;
  font-style: italic;
}

.message-live .home-response-stream {
  margin-top: 6px;
  opacity: 0.95;
}

.message-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 8px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  font-style: normal;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 4px;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--theme-text-secondary);
}

.message-role-identity,
.message-turn-actions {
  display: inline-flex;
  align-items: center;
}

.message-role-identity {
  gap: 8px;
}

.message-turn-divider {
  width: 1px;
  height: 18px;
  background: rgb(var(--theme-text-rgb) / 22%);
}

.message-turn-actions {
  gap: 5px;
}

.message-turn-action {
  flex: 0 0 auto;
}

.message-copy-button {
  min-height: 26px;
  padding: 3px 8px;
  color: rgb(var(--theme-text-rgb) / 68%);
  background: rgb(var(--theme-surface-rgb) / 42%);
  border: 1px solid rgb(var(--theme-primary-rgb) / 20%);
  border-radius: 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.message-copy-button:hover,
.message-copy-button:focus-visible,
.message-copy-button.is-copied {
  color: rgb(var(--theme-text-rgb) / 94%);
  background: rgb(var(--theme-primary-rgb) / 14%);
  border-color: rgb(var(--theme-primary-rgb) / 54%);
}

.message-speaker {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-timestamp {
  margin-left: 0;
  color: rgb(var(--theme-text-rgb) / 50%);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.message-row {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.message-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.message-assistant .message-main,
.message-agent .message-main {
  justify-content: flex-end;
}

/* Scheduler interventions occupy the user-authority side without becoming user-authored messages. */
.message-agent.message-project-scheduler .message-main {
  justify-content: flex-start;
}

.message-main > .message-bubble {
  align-self: auto;
  flex: 0 1 auto;
}

.message-bubble {
  display: inline-block;
  max-width: min(78%, 100%);
  min-width: 0;
  padding: 9px 12px;
  border-radius: 14px;
  line-height: 1.5;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  background: var(--color-surface-card-lifted);
  border: 1px solid var(--color-border-subtle);
  backdrop-filter: blur(6px);
}

.message-live .message-bubble {
  padding-top: 6px;
  padding-bottom: 6px;
}

.message-bubble p {
  margin: 0 0 0.35em;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-source-links {
  align-self: flex-start;
  max-width: 78%;
  min-width: 0;
  margin-top: -1px;
  margin-left: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  font-size: 0.83rem;
  line-height: 1.35;
  color: rgb(var(--theme-text-rgb) / 78%);
}

.message-source-link {
  color: var(--theme-primary-soft);
  text-decoration: none;
}

.message-source-link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.message-source-link:hover {
  color: var(--theme-text-secondary);
  text-decoration: underline;
}

.message-assistant .message-source-links,
.message-agent .message-source-links {
  align-self: flex-end;
  margin-right: 4px;
  margin-left: 0;
}

.message-source-separator {
  color: rgb(var(--theme-text-rgb) / 42%);
}

.message-markdown {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-markdown h2,
.message-markdown h3,
.message-markdown h4 {
  margin: 0;
  line-height: 1.25;
}

.message-markdown ul,
.message-markdown ol {
  margin: 0.25rem 0;
}

.message-markdown li {
  margin: 0.42rem 0;
  padding-left: 0.18rem;
  line-height: 1.6;
}

.message-markdown ul {
  padding-left: 1.45rem;
  list-style: disc;
}

.message-markdown ol {
  padding-left: 1.7rem;
  list-style: decimal;
}

.message-markdown ul li::marker,
.message-markdown ol li::marker {
  color: rgb(var(--theme-text-rgb) / 90%);
  font-weight: 600;
}

.message-markdown ol li::before {
  content: none;
}

.message-markdown p {
  margin: 0;
}

.message-markdown p + ul,
.message-markdown p + ol {
  margin-top: -0.25rem;
}

.message-markdown-table {
  display: block;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  font-size: 0.92rem;
}

.message-markdown-table th,
.message-markdown-table td {
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.message-markdown-table th {
  background: rgba(56, 84, 139, 0.24);
  color: rgb(var(--theme-text-rgb) / 96%);
  font-weight: 700;
}

.message-chart-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.message-chart-card {
  padding: 0.72rem 0.78rem;
  border-radius: 10px;
  border: 1px solid rgba(128, 168, 255, 0.26);
  background: rgba(13, 26, 52, 0.5);
}

.message-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.message-chart-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.message-chart-type {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.44rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgb(var(--theme-text-rgb) / 92%);
  background: rgba(104, 138, 255, 0.2);
  border: 1px solid rgba(104, 138, 255, 0.3);
}

.message-chart-body {
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
}

.message-chart-row {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.message-chart-row-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.message-chart-label {
  font-size: 0.81rem;
  line-height: 1.25;
  color: rgb(var(--theme-text-rgb) / 93%);
}

.message-chart-value {
  font-size: 0.79rem;
  color: rgb(var(--theme-text-rgb) / 86%);
}

.message-chart-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.message-chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(115, 170, 255, 0.95), rgba(151, 125, 255, 0.92));
}

.message-chart-fill--negative {
  background: linear-gradient(90deg, rgba(255, 166, 120, 0.94), rgba(255, 110, 110, 0.92));
}

.message-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-callout--success {
  background: rgba(60, 179, 113, 0.09);
  border-color: rgba(60, 179, 113, 0.2);
}

.message-callout--alert {
  background: rgba(255, 184, 77, 0.08);
  border-color: rgba(255, 184, 77, 0.2);
}

.message-callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.message-callout--success .message-callout-icon {
  color: #d8ffe7;
  background: rgba(60, 179, 113, 0.22);
}

.message-callout--alert .message-callout-icon {
  color: #fff2cc;
  background: rgba(255, 184, 77, 0.2);
}

.message-callout-body {
  min-width: 0;
}

.message-receipt-status-callouts {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.7rem;
  font-size: 0.84rem;
  line-height: 1.38;
}

.message-receipt-status-callout {
  padding: 0.65rem 0.8rem;
}

.message-receipt-status-callout-title {
  font-weight: 700;
  color: rgb(var(--theme-text-rgb) / 94%);
}

.message-receipt-status-callout-summary {
  margin-top: 0.1rem;
  color: rgb(var(--theme-text-rgb) / 78%);
}

.message-receipt-status-callout-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.message-receipt-status-callout-list li {
  margin: 0.24rem 0;
}

.message-receipt-source-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.48rem;
}

.message-receipt-source-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.message-receipt-source-open-button {
  color: rgb(190 255 44 / 82%);
  border-color: rgb(190 255 44 / 30%);
}

.message-receipt-source-url {
  min-width: 0;
  color: var(--theme-primary-soft);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.message-receipt-source-url:hover,
.message-receipt-source-url:focus-visible {
  color: var(--theme-text-secondary);
  text-decoration: underline;
}

.message-receipt-status-callout-source {
  font-weight: 650;
  color: rgb(var(--theme-text-rgb) / 90%);
}

.message-receipt-status-callout-detail {
  color: rgb(var(--theme-text-rgb) / 74%);
}

.message-inline-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.38rem;
  border-radius: 999px;
  vertical-align: text-top;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.message-inline-status--success {
  color: #d8ffe7;
  background: rgba(60, 179, 113, 0.22);
}

.message-markdown > :first-child {
  margin-top: 0;
}

.message-markdown > :last-child {
  margin-bottom: 0;
}

.message-markdown pre {
  max-width: 100%;
  margin: 0;
  padding: 0.75em 0.9em;
  border-radius: 10px;
  background: rgba(4, 10, 22, 0.84);
  border: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
  line-height: 1.45;
}

.message-markdown code {
  font-family: var(--font-family-mono);
  font-size: 0.93em;
}

.message-markdown pre code {
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.message-markdown p code,
.message-markdown li code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.message-code-block {
  max-width: 100%;
  min-width: 0;
  margin: 0.45em 0 0;
}

.message-code-language {
  display: inline-block;
  margin-bottom: 0.3em;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(var(--theme-text-rgb) / 86%);
  background: rgba(88, 140, 255, 0.2);
  border: 1px solid rgba(88, 140, 255, 0.3);
}

/* Keep provider identity and speech on the right; user speech stays on the left. */
.message-assistant .message-role,
.message-agent .message-role {
  align-self: flex-end;
  flex-direction: row-reverse;
  justify-content: flex-end;
  text-align: right;
}

.message-agent.message-project-scheduler .message-role {
  align-self: flex-start;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

.message-assistant .message-turn-actions,
.message-agent .message-turn-actions {
  flex-direction: row-reverse;
}

.message-agent.message-project-scheduler .message-turn-actions {
  flex-direction: row;
}
.message-user .message-bubble {
  background: rgb(var(--theme-primary-rgb) / 14%);
  border-color: rgb(var(--theme-primary-rgb) / 30%);
}

.message-memory-form {
  display: inline-flex;
  margin: 0;
}

.message-memory-button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 2px;
  color: rgb(var(--theme-text-rgb) / 56%);
  background: rgb(var(--theme-surface-rgb) / 42%);
  border: 1px solid rgb(var(--theme-primary-rgb) / 20%);
  border-radius: 9px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
  animation: message-action-button-blink 1.25s ease-in-out infinite;
}

.message-memory-button:hover,
.message-memory-button:focus-visible {
  color: rgb(var(--theme-text-rgb) / 92%);
  background: rgb(var(--theme-primary-rgb) / 14%);
  border-color: rgb(var(--theme-primary-rgb) / 54%);
}

.message-memory-icon {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}

@keyframes message-action-button-blink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 4px rgb(190 255 44 / 35%);
  }
  50% {
    opacity: 0.48;
    box-shadow: 0 0 14px rgb(190 255 44 / 82%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .message-memory-button,
  .message-source-save-button--available {
    animation: none;
  }
}

.message-source-save-list {
  list-style: none;
  padding-left: 0;
}

.message-source-save-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.message-source-save-form {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}

.message-source-save-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 2px;
  color: rgb(var(--theme-text-rgb) / 56%);
  background: rgb(var(--theme-surface-rgb) / 42%);
  border: 1px solid rgb(var(--theme-primary-rgb) / 20%);
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.message-source-save-button--available {
  animation: message-action-button-blink 1.25s ease-in-out infinite;
}

.message-source-save-button:hover,
.message-source-save-button:focus-visible {
  color: rgb(var(--theme-text-rgb) / 92%);
  background: rgb(var(--theme-primary-rgb) / 14%);
  border-color: rgb(var(--theme-primary-rgb) / 54%);
}

.message-source-save-button--saved {
  color: rgb(190 255 44 / 92%);
  border-color: rgb(190 255 44 / 42%);
  box-shadow: 0 0 8px rgb(190 255 44 / 24%);
  cursor: pointer;
}

.message-source-save-icon {
  display: block;
  width: 19px;
  height: 19px;
}

.message-source-save-link {
  min-width: 0;
  color: var(--theme-primary-soft);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.message-source-save-link:hover,
.message-source-save-link:focus-visible {
  color: var(--theme-text-secondary);
  text-decoration: underline;
}

/* Direct live/deliverable provider bubbles follow the completed provider side. */
.message-assistant > .message-bubble,
.message-agent > .message-bubble {
  align-self: flex-end;
}

.message-system > .message-bubble {
  align-self: flex-start;
}

.conversation-transcript .message-user .message-bubble,
.conversation-transcript .message-user .message-markdown,
.conversation-transcript .message-assistant .message-bubble,
.conversation-transcript .message-assistant .message-markdown {
  font-family: var(--font-family-ui);
  font-size: 1.1rem;
}

/* Optional: system style */
.message-system .message-bubble {
  opacity: 0.9;
  font-style: italic;
}

/* Keep transcript content readable */
.message-content {
  white-space: pre-wrap;
}

/* Small spacer above provider dropdown */
.home-chat-top-spacer {
  height: 6px;
}

/* Stream area spacing so deltas don’t smash into the final text */
.home-response-stream {
  margin-top: 10px;
}

.message-api-output,
.message-live-api-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-live-reasoning {
  border-left: 2px solid color-mix(in srgb, var(--theme-primary-soft) 70.0%, transparent);
  padding-left: 12px;
  color: rgb(var(--theme-text-rgb) / 86%);
}

.message-live-reasoning-label {
  margin-bottom: 6px;
  color: rgb(var(--theme-text-rgb) / 90%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.message-live-reasoning-body {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

/* Optional: when response area is empty, show a hint */
#live-response-text:empty::before {
  content: "Waiting for model output…";
  opacity: 0.6;
}
.settings-logs-page {
  width: min(100%, 1200px);
  margin: 0 auto !important;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.settings-log-hero,
.settings-log-section-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgb(var(--theme-primary-rgb) / 14.0%), transparent 34%),
    linear-gradient(135deg, var(--color-surface-card-lifted), color-mix(in srgb, var(--theme-surface-deep) 88%, transparent));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.settings-log-hero {
  padding: 26px 28px;
}

.settings-log-hero h1 {
  margin: 0;
  text-align: left;
}

.settings-log-hero p {
  margin: 10px 0 0;
  color: var(--theme-text-secondary);
  max-width: 860px;
}

.settings-log-section-card {
  padding: 22px;
}

.settings-log-section-card > h2,
.settings-log-section-header h2 {
  margin: 0;
  text-align: left;
  color: var(--theme-text);
}

.settings-log-section-card > p,
.settings-log-section-header p {
  color: var(--theme-text-secondary);
}

.settings-log-section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.settings-log-section-eyebrow {
  margin: 0 0 6px;
  color: var(--theme-primary-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-log-section-stat {
  min-width: 48px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 30.0%, transparent);
  background: rgb(var(--theme-primary-rgb) / 16.0%);
  color: var(--theme-text);
  font-weight: 800;
  text-align: center;
}

.settings-log-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed color-mix(in srgb, var(--theme-primary-soft) 28.0%, transparent);
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
  color: var(--theme-text-secondary);
}

.settings-log-warning {
  padding: 12px 14px;
  border: 1px solid rgba(255, 163, 102, 0.45);
  background: rgba(255, 163, 102, 0.12);
  border-radius: 14px;
}

.settings-log-subsection-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
}

.settings-log-subsection-card h2 {
  margin-top: 0;
  text-align: left;
}

.settings-logs-page h1 {
  margin: 0 0 2px;
  text-align: left;
}

.settings-logs-page > p {
  padding: 0 4px;
}

.settings-logs-page > h1 {
  padding: 24px 26px;
  border: 1px solid rgb(var(--theme-primary-rgb) / 26.0%);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgb(var(--theme-primary-rgb) / 16.0%), transparent 34%),
    linear-gradient(135deg, rgb(var(--theme-surface-rgb) / 96.0%), rgba(17, 24, 39, 0.88));
}

.settings-logs-page > h2 {
  margin: 4px 0 -10px;
  text-align: left;
  color: var(--theme-text);
}

.settings-log-table-wrap {
  overflow: auto;
  border: 1px solid rgba(47, 74, 107, 0.9);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgb(var(--theme-primary-rgb) / 8.0%), transparent 28%),
    rgb(var(--theme-surface-rgb) / 82.0%);
  padding: 16px;
}

.settings-log-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.settings-log-table thead th {
  padding: 0 12px 12px;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.settings-log-table tbody td {
  padding: 12px;
  vertical-align: top;
  color: var(--theme-text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.settings-log-table tbody tr:last-child td {
  border-bottom: none;
}

.settings-log-table code {
  color: var(--theme-text);
}

.settings-log-table-wrap + p,
.settings-logs-page > p:has(+ .settings-log-table-wrap),
.settings-logs-page > p:last-child {
  color: var(--theme-text-secondary);
}

.settings-log-row-failed td {
  background: rgba(120, 15, 15, 0.14);
  border-top: 1px solid rgba(255, 120, 120, 0.16);
  border-bottom: 1px solid rgba(255, 120, 120, 0.16);
}

.settings-log-cell-failed {
  color: #ff9b9b;
  font-style: italic;
  font-weight: 700;
}

.settings-log-summary-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.settings-log-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-log-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}

.settings-log-pill-category {
  background: rgba(120, 160, 255, 0.12);
  border-color: rgba(120, 160, 255, 0.22);
  color: var(--theme-text-secondary);
}

.settings-log-pill-info {
  color: var(--theme-text-secondary);
}

.settings-log-pill-warning {
  color: #ffd68f;
  border-color: rgba(255, 214, 143, 0.25);
  background: rgba(255, 214, 143, 0.08);
}

.settings-log-pill-error {
  color: #ff9b9b;
  border-color: rgba(255, 155, 155, 0.28);
  background: rgba(180, 38, 38, 0.12);
  font-style: italic;
  font-weight: 700;
}

.jobs-capability-key {
  display: inline-flex;
  margin-bottom: 6px;
  font-weight: 800;
}

.settings-logs-page.jobs-registry-page {
  width: min(100%, 1760px);
}

.jobs-human-surface-table {
  min-width: 1680px;
}

.jobs-role-eligibility-cell {
  min-width: 500px;
}

.jobs-role-eligibility-cell form {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px 12px;
  align-items: center;
}

.jobs-role-eligibility-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--theme-text-secondary);
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: nowrap;
}

.jobs-role-eligibility-option input {
  flex: 0 0 auto;
  margin: 0;
}

.jobs-role-eligibility-cell .button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
}

@media (max-width: 1440px) {
  .jobs-role-eligibility-cell {
    min-width: 400px;
  }

  .jobs-role-eligibility-cell form {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }
}

@media (max-width: 900px) {
  .jobs-role-eligibility-cell {
    min-width: 300px;
  }

  .jobs-role-eligibility-cell form {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

.jobs-capability-type {
  display: block;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgb(var(--theme-accent-rgb) / 28%);
  border-radius: 999px;
  background: rgb(var(--theme-accent-rgb) / 12%);
  color: var(--theme-accent-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jobs-preset-note {
  display: block;
  margin-top: 6px;
  color: var(--theme-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.jobs-entry-contract-call {
  display: block;
  margin-top: 8px;
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.jobs-entry-contract-call code {
  color: var(--theme-text-secondary);
}

.jobs-capability-badge {
  display: inline-flex;
  width: fit-content;
  margin: 2px 0;
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--theme-primary-faint);
  font-size: 0.78rem;
  font-weight: 800;
}

.jobs-capability-badge--read-only {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(22, 101, 52, 0.16);
  color: #bbf7d0;
}

.jobs-capability-badge--workflow {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(146, 64, 14, 0.18);
  color: #fde68a;
}

.jobs-capability-badge--gated {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
}

.jobs-capability-badge--neutral {
  border-color: color-mix(in srgb, var(--theme-primary-soft) 28.0%, transparent);
  background: rgb(var(--theme-primary-rgb) / 14%);
  color: var(--theme-primary-pale);
}

.jobs-capability-detail-summary {
  margin-top: 18px;
}

.jobs-capability-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.jobs-capability-detail-grid > div {
  padding: 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  background: var(--color-surface-control);
}

.jobs-capability-detail-label {
  display: block;
  margin-bottom: 8px;
  color: var(--theme-primary-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-log-filters {
  margin: 0;
  border: 1px solid rgba(47, 74, 107, 0.9);
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 78.0%);
  padding: 16px;
}

.settings-log-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
}

.settings-log-filter-input,
.settings-log-filter-button,
.settings-log-filter-reset {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--theme-text);
  padding: 0 12px;
  text-decoration: none;
}

.settings-log-filter-button,
.settings-log-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.settings-log-filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.settings-activity-feed {
  display: grid;
  gap: 14px;
}

.settings-activity-item {
  border: 1px solid rgba(47, 74, 107, 0.9);
  background: rgb(var(--theme-surface-rgb) / 82.0%);
  border-radius: 16px;
  padding: 16px 18px;
}

.settings-activity-item.is-failed {
  border-color: rgba(255, 120, 120, 0.28);
  background: rgba(120, 15, 15, 0.12);
}

.settings-activity-meta,
.settings-activity-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-activity-meta {
  margin-bottom: 10px;
  opacity: 0.88;
}

.settings-activity-summary {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.5;
}

.settings-activity-links {
  font-size: 0.94rem;
}

.settings-log-open-link,
.settings-log-context-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 170, 255, 0.25);
  background: rgba(123, 170, 255, 0.08);
  color: var(--theme-text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
}

.settings-log-open-link:hover,
.settings-log-context-link:hover {
  background: rgba(123, 170, 255, 0.14);
}
/* User dot selector for user table */
.user-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #232f45;
  border: 2px solid var(--theme-primary-soft);
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.15s, border-color 0.15s;
}
.user-dot.selected {
  background: var(--theme-primary-soft);
  border-color: #232f45;
}
/* Secondary nav bar for Providers page */
.secondary-nav {
  background: linear-gradient(to right, var(--theme-surface-deep) 0%, var(--theme-canvas) 100%);
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border-subtle);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  width: 100%;
  margin: 0;
  padding: 0;
  z-index: 100;
}
.secondary-nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  gap: 18px;
  padding: 0 24px;
  box-sizing: border-box;
  margin-left: 0;
}
.secondary-navbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-text);
  font-weight: 500;
  font-size: 1.18rem;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.secondary-navbar-link:hover,
.secondary-navbar-link:focus {
  background: var(--color-surface-control);
  color: var(--theme-text);
}

.secondary-navbar-link.is-active {
  background: var(--color-surface-control);
  color: var(--theme-text);
  box-shadow: inset 0 0 0 1px var(--color-border-active);
}

.secondary-navbar-link--stacked {
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
  text-align: center;
}

.secondary-nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 56px;
}

.secondary-nav-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.secondary-nav-menu > summary::-webkit-details-marker {
  display: none;
}

.secondary-nav-menu-panel {
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: min(260px, calc(100vw - 32px));
  max-height: min(68vh, 520px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 24.0%, transparent);
  border-radius: 12px;
  background: rgba(8, 15, 26, 0.98);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.36);
}

.secondary-nav-menu:not([open]) .secondary-nav-menu-panel {
  display: none;
}

.secondary-nav-menu-link {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--theme-primary-faint);
  text-decoration: none;
  font-size: 0.96rem;
  line-height: 1.25;
  white-space: normal;
}

.secondary-nav-menu-link:hover,
.secondary-nav-menu-link:focus {
  background: #232f45;
  color: var(--theme-text);
}

.secondary-nav-menu-link.is-active {
  background: #2f5d9b;
  color: var(--theme-text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.connected-accounts-grid {
  align-items: stretch;
}

.connected-account-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.connected-account-card-header {
  align-items: flex-start;
}

.connected-account-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.connected-account-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.84);
  background: #ffffff;
  color: var(--theme-surface);
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
}

.connected-account-logo-image {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.connected-account-logo-fallback {
  display: none;
}

.connected-account-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.72);
  color: var(--theme-text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
}

.connected-account-status--connected {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
}

.connected-account-status--configured,
.connected-account-status--active {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 34.0%, transparent);
  background: rgb(var(--theme-primary-rgb) / 16.0%);
  color: var(--theme-primary-pale);
}

.connected-account-status--expired,
.connected-account-status--error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(220, 38, 38, 0.16);
  color: #fecaca;
}

.connected-account-status--blocked,
.connected-account-status--revoked {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(217, 119, 6, 0.16);
  color: #fde68a;
}

.connected-account-meta-grid dd {
  word-break: break-word;
}

.connected-account-actions {
  margin-top: auto;
}

.connected-account-action-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.connected-account-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connected-account-scope-list {
  font-size: 0.92rem;
}

.connected-account-source-preview-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.connected-account-source-preview-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(200px, 1fr) minmax(150px, 0.8fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgb(var(--theme-surface-rgb) / 62.0%);
  color: var(--theme-primary-faint);
}
/* Center all main headers for consistency */
h1, h2, h3 {
  text-align: center;
}

/* Keep transcript content left-aligned and readable regardless of global heading styles */
.conversation-transcript {
  position: relative;
  display: grid;
  gap: 8px;
}

.conversation-scroll-jump {
  position: fixed;
  left: 50%;
  z-index: 70;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(141, 170, 214, 0.46);
  border-radius: 999px;
  background: rgba(12, 20, 34, 0.84);
  box-shadow: 0 10px 30px rgba(2, 8, 23, 0.34);
  color: var(--theme-text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.92);
  transition: opacity 140ms ease, transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.conversation-scroll-jump--top {
  top: 88px;
}

.conversation-scroll-jump--bottom {
  bottom: 154px;
}

.conversation-scroll-jump.is-visible,
.conversation-scroll-jump:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.conversation-scroll-jump:hover,
.conversation-scroll-jump:focus-visible {
  border-color: rgba(186, 213, 255, 0.76);
  background: rgba(22, 36, 60, 0.94);
  outline: none;
}

.conversation-scroll-jump-icon {
  width: 24px;
  height: 24px;
}

.conversation-transcript .message-markdown,
.conversation-transcript .message-markdown h2,
.conversation-transcript .message-markdown h3,
.conversation-transcript .message-markdown h4,
.conversation-transcript .message-markdown p,
.conversation-transcript .message-markdown li {
  text-align: left;
}

.conversation-transcript .message-markdown {
  font-size: 0.95rem;
  line-height: 1.5;
}

.conversation-transcript .message-markdown h2 {
  font-size: 1rem;
  font-weight: 700;
}

.conversation-transcript .message-markdown h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.conversation-transcript .message-markdown h4 {
  font-size: 0.92rem;
  font-weight: 700;
}

.conversation-transcript .message-system-generated .message-role {
  font-size: 0.78rem;
  opacity: 0.62;
}

.conversation-transcript .message-system-generated .message-bubble {
  padding: 6px 9px;
  font-size: 0.84rem;
  line-height: 1.38;
  opacity: 0.72;
}

.conversation-transcript .message-system-generated .message-api-output,
.conversation-transcript .message-system-generated .message-markdown,
.conversation-transcript .message-system-generated .message-markdown p,
.conversation-transcript .message-system-generated .message-markdown li {
  font-size: 0.84rem;
  line-height: 1.38;
}

.conversation-transcript .message-system-generated .message-markdown h2,
.conversation-transcript .message-system-generated .message-markdown h3,
.conversation-transcript .message-system-generated .message-markdown h4 {
  font-size: 0.86rem;
  line-height: 1.3;
}

.conversation-transcript .message-project-wait-for-user .message-role {
  color: #ffe9a8;
  opacity: 1;
}

.conversation-transcript .message-bubble--project-wait-for-user {
  align-self: stretch;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff1bd;
  box-shadow: none;
  font-style: normal;
  opacity: 1;
}

.project-wait-for-user-stamp {
  display: grid;
  width: 100%;
  gap: 4px;
  text-align: center;
}

.project-wait-for-user-ornament {
  display: grid;
  grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  color: #e2b75f;
}

.project-wait-for-user-rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(214, 168, 79, 0.08),
    rgba(214, 168, 79, 0.82)
  );
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.22);
}

.project-wait-for-user-rule:last-child {
  background: linear-gradient(
    90deg,
    rgba(214, 168, 79, 0.82),
    rgba(214, 168, 79, 0.08)
  );
}

.project-wait-for-user-flourish {
  display: block;
  min-width: 2.4rem;
  font-family: Didot, "Bodoni 72", "Bodoni MT", Georgia, serif;
  font-size: 1.42rem;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 10px rgba(214, 168, 79, 0.28);
}

.project-wait-for-user-ornament--lower .project-wait-for-user-flourish {
  font-size: 1.18rem;
}

.project-wait-for-user-title {
  color: #fff1bd;
  font-family: Didot, "Bodoni 72", "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2.2vw, 1.36rem);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 0 12px rgba(214, 168, 79, 0.24);
}
.home-chat-loading {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.home-chat-loading.is-active {
  opacity: 1;
  transform: translateY(0);
}

.home-chat-spinner {
  display: inline-block;
  transform-origin: 50% 50%;
  animation: chatSpinnerPulse 900ms ease-in-out infinite;
}

@keyframes chatSpinnerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.home-chat-elapsed.pop {
  animation: chatElapsedPop 220ms ease-out;
}

@keyframes chatElapsedPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.home-chat-loading { display: none; }
.home-chat-loading.is-active { display: block; }
/*
 *= require_self
 *= require_tree .
 */



/* =========================================================
   Base / Reset
========================================================= */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-family-ui);
  background: var(--theme-canvas);
  color: var(--theme-text);

  /* page layout */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--theme-primary-soft); text-decoration: none; }
a:hover { color: var(--theme-primary-pale); text-decoration: underline; }

button, input, select, textarea { font: inherit; }

/* Accessible focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Header (matches your actual HTML)
   header.site-header
     div.site-header-logo (logo row)
     div.site-header-bar  (nav/user row)
========================================================= */
.site-header {
  background: var(--theme-canvas);
  border-bottom: 1px solid var(--theme-surface-muted);
}

.site-header[data-controller~="header-reveal"] {
  --site-header-reveal-height: var(--app-navbar-height);
  flex: 0 0 auto;
  margin-top: 0;
  position: relative;
  z-index: 1100;
  transition: margin-top 220ms ease;
}

.site-header[data-controller~="header-reveal"].is-auto-hidden {
  margin-top: calc(-1 * var(--site-header-reveal-height));
}

.edge-corner-wordmark {
  position: fixed;
  right: 28px;
  bottom: 70px;
  width: 180px;
  height: 50px;
  z-index: 115;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  filter: drop-shadow(0 3px 10px rgb(0 0 0 / 42%));
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

body[data-header-reveal-state="hidden"] .edge-corner-wordmark {
  opacity: 0.22;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: none), (pointer: coarse) {
  .site-header[data-controller~="header-reveal"],
  .site-header[data-controller~="header-reveal"].is-auto-hidden {
    margin-top: 0;
  }

  .edge-corner-wordmark {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header[data-controller~="header-reveal"],
  .edge-corner-wordmark {
    transition: none;
  }
}

/* Logo row: centered image */
.site-header-logo {
  position: relative;
  width: 100%;
  margin: 0 auto 4px;
  padding: 10px 14px 14px;
  text-align: center;
}

.site-header-logo > a {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.site-header-sublogo-link {
  position: absolute;
  left: 0;
  bottom: -34px;
  display: block;
  line-height: 0;
  z-index: 2;
}

.site-header-main-logo {
  height: 100px;
  width: auto;
  max-width: 100%;
  display: block;
}

.site-header-sublogo {
  height: 188px;
  width: auto;
  max-width: min(64vw, 720px);
  display: block;
  image-rendering: auto;
}

/* Devise login keeps one compact brand row and no application navbar. */
.site-header--devise-login {
  flex: 0 0 auto;
  background: var(--theme-canvas);
}

.devise-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  padding: 12px 24px;
}

.devise-login-brand-link {
  display: block;
  border-radius: 16px;
  line-height: 0;
}

.devise-login-brand-image {
  display: block;
  width: clamp(220px, 24vw, 300px);
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(0 0 16px rgb(var(--theme-primary-rgb) / 24%));
}

@media (max-width: 700px) {
  .site-header-logo {
    margin-bottom: 4px;
    padding: 8px 12px 14px;
  }

  .site-header-main-logo {
    height: 82px;
  }

  .site-header-sublogo-link {
    left: 0;
    bottom: -22px;
  }

  .site-header-sublogo {
    height: 116px;
    max-width: min(76vw, 420px);
  }

  .devise-login-brand {
    min-height: 138px;
    padding: 10px 18px;
  }

  .devise-login-brand-image {
    width: clamp(190px, 58vw, 240px);
  }
}

/* =========================================================
   Devise Login
========================================================= */
.devise-login-main {
  flex: 1 0 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(36px, 6vh, 64px) 24px clamp(44px, 7vh, 72px);
  background-color: var(--theme-canvas);
  background-image:
    linear-gradient(to right, rgb(var(--theme-canvas-rgb) / 98.5%) 0%, rgb(var(--theme-surface-rgb) / 92%) 45%, rgb(var(--theme-canvas-rgb) / 100%) 100%),
    radial-gradient(ellipse at center, rgb(var(--theme-primary-rgb) / 6%) 0%, rgb(var(--theme-primary-rgb) / 2.5%) 28%, rgb(var(--theme-surface-rgb) / 76%) 56%, rgb(var(--theme-canvas-rgb) / 97.5%) 100%),
    var(--theme-background-image);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  background-size: cover, cover, 1150px auto;
}

.login-form-card {
  width: min(100%, 400px);
  margin: 0 auto;
  padding: 36px 38px 32px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background:
    radial-gradient(circle 320px at top right, rgb(var(--theme-primary-rgb) / 10%), transparent 70%),
    color-mix(in srgb, var(--theme-surface) 94%, transparent);
  box-shadow: 0 22px 60px rgb(0 0 0 / 34%);
  color: var(--theme-text);
  backdrop-filter: blur(16px);
}

.login-form-card h1 {
  margin: 0 0 28px;
  color: var(--theme-text);
  font-size: clamp(1.7rem, 4vw, 2rem);
  text-align: center;
}

.login-notice {
  margin: 0 0 20px;
  color: #86efac;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 18px;
  width: 100%;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field label,
.login-remember-row label {
  color: var(--theme-text-secondary);
  font-weight: 600;
}

.login-field input[type="email"],
.login-field input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--color-border-control);
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-canvas) 88%, transparent);
  color: var(--theme-text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-field input[type="email"]:focus,
.login-field input[type="password"]:focus {
  border-color: var(--color-border-active);
  background: var(--theme-canvas);
  box-shadow: 0 0 0 3px rgb(var(--theme-primary-rgb) / 12%);
}

.login-remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-remember-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--theme-primary);
}

.login-actions input[type="submit"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--color-border-control);
  border-radius: 10px;
  background: rgb(var(--theme-primary-rgb) / 18%);
  color: var(--theme-text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.login-actions input[type="submit"]:hover {
  border-color: var(--color-border-active);
  background: rgb(var(--theme-primary-rgb) / 26%);
  transform: translateY(-1px);
}

.login-oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 22px 0 16px;
  color: var(--theme-text-muted);
  font-size: 0.84rem;
}

.login-oauth-divider::before,
.login-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border-subtle);
}

.login-oauth-form {
  width: 100%;
  margin: 0;
}

.google-oauth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--theme-text) 60%, transparent);
  border-radius: 10px;
  background: var(--theme-text);
  color: var(--theme-canvas);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.google-oauth-button:hover {
  background: color-mix(in srgb, var(--theme-text) 92%, white);
  transform: translateY(-1px);
}

.google-oauth-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #4285f4;
  font-family: var(--font-family-ui);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.login-support-links {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  text-align: center;
}

.login-support-links p {
  margin: 0;
}

@media (min-width: 981px) {
  .devise-login-main {
    background-attachment: fixed, fixed, fixed;
  }
}

@media (max-width: 520px) {
  .devise-login-main {
    padding: 28px 16px 40px;
  }

  .login-form-card {
    padding: 30px 24px 28px;
  }

  .login-form-card h1 {
    margin-bottom: 24px;
  }
}

/* Nav/user row */
.navbar {
  background: var(--app-chrome-background);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--app-navbar-height);
  padding: 2px 14px;
  border-top: 1px solid var(--color-border-subtle);
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
}

.navbar-left {
  flex: 1;
  min-width: 0;
  gap: 22px;
}

.navbar-right {
  margin-left: auto;
  gap: 12px;
}

.navbar-location-context {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(28vw, 260px);
  padding: 5px 10px;
  border: 1px solid rgb(var(--theme-primary-rgb) / 30%);
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 42%);
  color: var(--theme-text-muted);
  font-size: 0.82rem;
  line-height: 1.2;
  text-decoration: none;
}

.navbar-location-context:hover,
.navbar-location-context:focus-visible {
  border-color: rgb(var(--theme-primary-rgb) / 58%);
  color: var(--theme-text);
  outline: none;
}

.navbar-location-context-pin {
  color: rgb(var(--theme-primary-rgb));
  font-size: 0.62rem;
  filter: drop-shadow(0 0 5px rgb(var(--theme-primary-rgb) / 48%));
}

.navbar-location-context-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-user-time {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--theme-text-muted);
  font-size: 0.82rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-user-time:hover,
.navbar-user-time:focus-visible {
  background: rgb(var(--theme-surface-rgb) / 52%);
  color: var(--theme-text);
  outline: none;
}

.user-location-actions {
  flex-wrap: wrap;
}

.user-location-status.is-error {
  color: #fca5a5;
}

.navbar-utility-menu-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 5px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.navbar-utility-menu-button span,
.global-navigation-utility-mark span {
  display: block;
  width: 26px;
  height: 2px;
  border-radius: 0;
  background: currentColor;
}

.navbar-utility-menu-button:hover,
.navbar-utility-menu-button:focus-visible {
  background: rgb(var(--theme-surface-rgb) / 68%);
  outline: 1px solid rgb(var(--theme-primary-rgb) / 46%);
  outline-offset: 1px;
}

.navbar-edge-brand-link {
  display: grid;
  place-items: center;
  width: 154px;
  height: 52px;
  overflow: visible;
  flex: 0 0 auto;
  line-height: 0;
  border-radius: 12px;
  text-decoration: none;
}

.navbar-edge-icon {
  display: block;
  width: 150px;
  max-width: none;
  height: 50px;
  object-fit: contain;
  image-rendering: auto;
  transform: scale(1);
  transform-origin: center;
  filter: drop-shadow(0 0 9px rgb(var(--theme-primary-rgb) / 30%));
  transition: transform 150ms ease, filter 150ms ease;
}

.navbar-edge-brand-link:hover,
.navbar-edge-brand-link:focus-visible {
  text-decoration: none;
  outline: 1px solid rgb(var(--theme-primary-rgb) / 44%);
  outline-offset: 1px;
}

.navbar-edge-brand-link:hover .navbar-edge-icon,
.navbar-edge-brand-link:focus-visible .navbar-edge-icon {
  transform: scale(1.04);
  filter: drop-shadow(0 0 13px rgb(var(--theme-primary-rgb) / 46%));
}

@media (max-width: 700px) {
  .navbar-edge-brand-link {
    width: 132px;
    height: 52px;
  }

  .navbar-edge-icon {
    width: 128px;
    height: 48px;
  }
}

.navbar-links {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.global-navigation-open {
  overflow: hidden;
}

body.global-navigation-open .site-header[data-controller~="header-reveal"].is-auto-hidden {
  margin-top: 0;
}

body.global-navigation-open .edge-corner-wordmark {
  opacity: 0;
  pointer-events: none;
}

.global-navigation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  visibility: hidden;
  background: rgba(0, 4, 8, 0.68);
  opacity: 0;
  backdrop-filter: blur(7px);
  transition: opacity 190ms ease, visibility 190ms ease;
}

.global-navigation-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.global-navigation-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2210;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 24px));
  min-height: 100dvh;
  overflow: hidden;
  color: var(--theme-text);
  background:
    linear-gradient(155deg, rgb(var(--theme-surface-rgb) / 84%), rgb(var(--theme-canvas-rgb) / 98%) 56%),
    var(--app-chrome-background);
  border-right: 1px solid rgb(var(--theme-primary-rgb) / 28%);
  box-shadow: 28px 0 80px rgba(0, 0, 0, 0.52);
  visibility: hidden;
  transform: translateX(-102%);
  transition: transform 230ms cubic-bezier(0.22, 1, 0.36, 1), visibility 230ms ease;
}

.global-navigation-drawer--utility {
  inset: 0 0 0 auto;
  border-right: 0;
  border-left: 1px solid rgb(var(--theme-primary-rgb) / 28%);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.52);
  transform: translateX(102%);
}

.global-navigation-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
}

.global-navigation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(1, 5, 9, 0.72);
}

.global-navigation-header--admin {
  justify-content: flex-end;
}

.global-navigation-brand-button {
  display: grid;
  place-items: center;
  width: 176px;
  height: 54px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.global-navigation-brand {
  display: block;
  width: 164px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 12px rgb(var(--theme-primary-rgb) / 28%));
}

.global-navigation-utility-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.global-navigation-brand-button:hover,
.global-navigation-brand-button:focus-visible {
  background: transparent;
  outline: none;
}

.global-navigation-brand-button:hover .global-navigation-brand,
.global-navigation-brand-button:focus-visible .global-navigation-brand {
  filter: drop-shadow(0 0 16px rgb(var(--theme-primary-rgb) / 42%));
}

.global-navigation-utility-mark:hover,
.global-navigation-utility-mark:focus-visible {
  background: rgb(var(--theme-surface-rgb) / 68%);
  outline: none;
}

.global-navigation-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 26px 42px;
}

.global-navigation-intro {
  padding: 0 2px 24px;
}

.global-navigation-intro h2,
.global-navigation-intro p {
  margin: 0;
}

.global-navigation-intro h2 {
  margin-top: 3px;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.global-navigation-intro > p:last-child {
  margin-top: 8px;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.global-navigation-intro-copy--centered {
  text-align: center;
}

.global-navigation-eyebrow,
.global-navigation-section > h3 {
  color: var(--theme-primary-pale);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.global-navigation-section {
  padding: 22px 2px;
  border-top: 1px solid var(--color-border-subtle);
}

.global-navigation-section > h3 {
  margin: 0 0 13px;
}

.global-navigation-preference,
.global-navigation-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 13px 0;
}

.global-navigation-preference > div,
.global-navigation-theme-toggle > span:first-child {
  display: grid;
  gap: 3px;
  text-align: left;
}

.global-navigation-preference span,
.global-navigation-theme-toggle small,
.global-navigation-preference-note {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.global-navigation-preference-note {
  padding: 5px 8px;
  border: 1px solid var(--color-border-control);
  border-radius: 999px;
}

.global-navigation-theme-form {
  margin: 0;
}

.global-navigation-theme-toggle {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  background: transparent;
  color: var(--theme-text);
  cursor: pointer;
}

.global-navigation-theme-toggle:hover,
.global-navigation-theme-toggle:focus-visible {
  color: var(--theme-primary-faint);
  outline: none;
}

.global-navigation-theme-toggle .projects-my-agents-wrapper-switch {
  flex: 0 0 auto;
}

.global-navigation-theme-toggle.is-enabled .projects-my-agents-wrapper-switch {
  background: rgba(34, 197, 94, 0.76);
}

.global-navigation-theme-toggle.is-enabled .projects-my-agents-wrapper-knob {
  transform: translateX(18px);
  background: #f0fdf4;
}

.global-navigation-destinations {
  display: grid;
  gap: 2px;
}

.global-navigation-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-inline: -12px;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--theme-text);
  text-decoration: none;
}

.global-navigation-link > span:first-child {
  display: grid;
  gap: 3px;
}

.global-navigation-link strong {
  font-size: var(--type-navigation);
  font-weight: 650;
  letter-spacing: -0.018em;
}

.global-navigation-link small {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.global-navigation-link > span:last-child {
  color: var(--theme-primary-pale);
  font-size: 1.05rem;
  transition: transform 150ms ease;
}

.global-navigation-link:hover,
.global-navigation-link:focus-visible {
  border-color: rgb(var(--theme-primary-rgb) / 28%);
  background: rgb(var(--theme-surface-rgb) / 58%);
  text-decoration: none;
  outline: none;
}

.global-navigation-link:hover > span:last-child,
.global-navigation-link:focus-visible > span:last-child {
  transform: translateX(3px);
}

.global-navigation-link--danger strong {
  color: #fca5a5;
}

.global-navigation-footer {
  flex: 0 0 auto;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--color-border-subtle);
  background: rgba(1, 5, 9, 0.82);
}

.global-navigation-logout-form {
  margin: 0;
}

.global-navigation-logout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-weight: var(--font-weight-semibold);
  text-align: left;
}

.global-navigation-logout:hover,
.global-navigation-logout:focus-visible {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(127, 29, 29, 0.14);
  color: #fecaca;
  outline: none;
}

@media (max-width: 700px) {
  .global-navigation-drawer {
    width: min(390px, calc(100vw - 12px));
  }

  .global-navigation-scroll {
    padding: 24px 22px 36px;
  }

  .global-navigation-footer {
    padding-inline: 22px;
  }

  .navbar-right {
    gap: 7px;
  }

  .navbar-location-context {
    max-width: min(46vw, 190px);
    padding-inline: 8px;
  }

  .navbar-user-time {
    min-width: auto;
    padding-inline: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-navigation-backdrop,
  .global-navigation-drawer,
  .global-navigation-link > span:last-child {
    transition: none;
  }
}

.site-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--theme-surface-muted); /* subtle separation from logo */
}

.site-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Compact header routes should not show the top separator. */
body.compact-header-screen .navbar,
body.compact-header-screen .site-header-bar {
  border-top: 0;
}

.navbar-link {
  display: inline-flex;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  color: var(--theme-text);
  border: 1px solid transparent;
}

.navbar-link:hover {
  background: var(--theme-surface-muted);
  border-color: var(--theme-border-choice);
  text-decoration: none;
}

.navbar-link--attention {
  position: relative;
  isolation: isolate;
}

.navbar-link--attention-green {
  border-color: rgba(74, 222, 128, 0.46);
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.15);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.14),
    0 0 14px rgba(22, 163, 74, 0.16);
}

.navbar-link--attention-yellow {
  border-color: rgba(251, 191, 36, 0.52);
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.17);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.16),
    0 0 14px rgba(245, 158, 11, 0.2);
}

.navbar-link--attention-red {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fee2e2;
  background: rgba(185, 28, 28, 0.2);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.2),
    0 0 16px rgba(220, 38, 38, 0.3);
}

.navbar-link--attention-border-only::after {
  content: none;
}

.navbar-link--attention-gentle-pulse {
  animation: navbar-chat-green-pulse 4.4s ease-in-out infinite;
}

.navbar-link--attention-gradual-blink {
  animation: navbar-chat-yellow-blink 2.9s ease-in-out infinite;
}

.navbar-link--attention-urgent-blink {
  animation: navbar-chat-red-alert 1.4s ease-in-out infinite;
}

@keyframes navbar-chat-green-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(74, 222, 128, 0.14),
      0 0 12px rgba(22, 163, 74, 0.16);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(134, 239, 172, 0.28),
      0 0 22px rgba(34, 197, 94, 0.3);
  }
}

@keyframes navbar-chat-yellow-blink {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 0 1px rgba(251, 191, 36, 0.16),
      0 0 12px rgba(245, 158, 11, 0.2);
  }

  50% {
    opacity: 0.72;
    box-shadow:
      0 0 0 1px rgba(253, 230, 138, 0.34),
      0 0 24px rgba(251, 191, 36, 0.4);
  }
}

@keyframes navbar-chat-red-alert {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 0 1px rgba(248, 113, 113, 0.22),
      0 0 14px rgba(220, 38, 38, 0.28);
  }

  50% {
    opacity: 0.66;
    box-shadow:
      0 0 0 1px rgba(254, 202, 202, 0.42),
      0 0 26px rgba(248, 113, 113, 0.42);
  }
}

.navbar-no-header-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 64px;
  margin-right: 14px;
  background: var(--app-chrome-background);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.navbar-no-header-logo {
  display: block;
  height: 22px;
  width: auto;
}

.site-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
}

.navbar-admin {
  font-size: 0.93rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--theme-surface-muted);
  border: 1px solid var(--theme-border-choice);
  color: var(--theme-text);
}

.navbar-profile-link {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 34.0%, transparent);
  background: linear-gradient(135deg, rgba(21, 94, 117, 0.68), rgba(88, 28, 135, 0.62));
  color: var(--theme-text);
  text-decoration: none;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(5, 10, 22, 0.2);
}

.navbar-profile-link:hover,
.navbar-profile-link:focus-visible {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 78.0%, transparent);
  outline: none;
}

.navbar-profile-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.navbar-profile-link .profile-picture-initials {
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.navbar-user {
  font-size: 0.9rem;
  color: var(--theme-text-secondary);
}

.navbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-control);
  color: var(--theme-text);
  border: 1px solid var(--color-border-control);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
}

.navbar-button:hover {
  background: color-mix(in srgb, var(--theme-surface-lift) 96%, transparent);
  border-color: var(--color-border-active);
}

.navbar-button-danger {
  background: linear-gradient(135deg, rgba(146, 34, 34, 0.22), rgba(239, 68, 68, 0.18));
  border-color: rgba(248, 113, 113, 0.45);
  color: #fff4f4;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.18);
}

.navbar-button-danger:hover,
.navbar-button-danger:focus {
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.32), rgba(248, 113, 113, 0.24));
  color: var(--theme-text);
}

.navbar-button.is-active {
  background: var(--color-accent-warm-soft);
  border-color: var(--color-accent-warm-border);
  color: #fff7d6;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(120, 82, 24, 0.16);
}

@media (min-width: 701px) and (max-width: 1180px) {
  .navbar-links {
    gap: 2px;
  }

  .navbar-link {
    padding-inline: 6px;
  }

  .navbar-user {
    display: none;
  }
}

@media (max-width: 700px) {
  .navbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .navbar-left {
    width: 100%;
    flex-basis: 100%;
    gap: 4px;
  }

  .navbar-links {
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .navbar-link {
    padding: 6px 8px;
    white-space: nowrap;
  }

  .navbar-right {
    width: 100%;
    justify-content: flex-end;
  }

  .navbar-account {
    max-width: 100%;
  }

  .navbar-user {
    display: none;
  }
}

.project-fullscreen-toggle-button {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(7, 15, 30, 0.16);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  color: rgb(var(--theme-text-rgb) / 72%);
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: fixed;
  right: 18px;
  top: 70px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
  width: 30px;
  z-index: 10060;
}

.project-fullscreen-toggle-button:hover,
.project-fullscreen-toggle-button:focus-visible,
.project-fullscreen-toggle-button.is-active {
  background: rgba(16, 35, 68, 0.34);
  color: var(--theme-text);
  outline: none;
}

.project-fullscreen-toggle-button:hover,
.project-fullscreen-toggle-button:focus-visible {
  transform: scale(1.05);
}

.project-fullscreen-toggle-icon {
  height: 14px;
  position: relative;
  transition:
    opacity 160ms ease,
    transform 180ms ease;
  width: 14px;
}

.project-fullscreen-toggle-icon::before,
.project-fullscreen-toggle-icon::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  position: absolute;
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.project-fullscreen-toggle-icon::before {
  height: 2px;
  left: 1px;
  right: 1px;
  top: 50%;
  transform: translateY(-50%);
}

.project-fullscreen-toggle-icon::after {
  bottom: 1px;
  left: 50%;
  top: 1px;
  transform: translateX(-50%);
  width: 2px;
}

.project-fullscreen-toggle-button.is-active .project-fullscreen-toggle-icon {
  transform: scaleX(1.12);
}

.project-fullscreen-toggle-button.is-active .project-fullscreen-toggle-icon::after {
  opacity: 0;
  transform: translateX(-50%) scaleY(0);
}

html.project-fullscreen-enabled body.project-fullscreen-capable {
  min-height: 100dvh;
  overflow: hidden;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .site-header,
html.project-fullscreen-enabled body.project-fullscreen-capable .project-sidebar-shell,
html.project-fullscreen-enabled body.project-fullscreen-capable .project-sidebar-toggle,
html.project-fullscreen-enabled body.project-fullscreen-capable .action-bar-drawer-launcher-button,
html.project-fullscreen-enabled body.project-fullscreen-capable .conversations-launcher-button,
html.project-fullscreen-enabled body.project-fullscreen-capable .action-bar-drawer-panel,
html.project-fullscreen-enabled body.project-fullscreen-capable .dashboard-conversations-panel,
html.project-fullscreen-enabled body.project-fullscreen-capable .helper-launcher-button,
html.project-fullscreen-enabled body.project-fullscreen-capable .helper-panel,
html.project-fullscreen-enabled body.project-fullscreen-capable .app-footer {
  display: none !important;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .project-fullscreen-toggle-button {
  right: 14px;
  top: 14px;
}

/* =========================================================
   Main Layout
========================================================= */

.main-content-area {
  --left-sidebar-width: 340px;
  --right-sidebar-width: 420px;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: var(--left-sidebar-width) 1fr; /* widened sidebar */
  min-height: 0; /* important so children can scroll */
  position: relative;
}

.main-content-area.action-bar-layout {
  --left-sidebar-width: 70px;
}

.main-content-area.action-bar-layout > .home-content {
  padding-top: var(--space-action-bar-content-top);
}

body.deep-synthesis-active::after {
  content: "";
  position: fixed;
  inset: 10px;
  border-radius: 18px;
  pointer-events: none;
  z-index: 999;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(110, 193, 255, 0.28),
    0 0 22px rgba(87, 178, 255, 0.28),
    0 0 30px rgba(255, 100, 196, 0.18),
    inset 0 0 18px rgba(103, 210, 255, 0.12);
  background:
    linear-gradient(120deg, rgba(95, 206, 255, 0.16), rgba(255, 90, 176, 0.08), rgba(255, 217, 61, 0.12));
  animation: deep-synthesis-border-pulse 3.2s ease-in-out infinite;
}

@keyframes deep-synthesis-border-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(110, 193, 255, 0.22),
      0 0 18px rgba(87, 178, 255, 0.24),
      0 0 24px rgba(255, 100, 196, 0.14),
      inset 0 0 14px rgba(103, 210, 255, 0.1);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(140, 215, 255, 0.32),
      0 0 28px rgba(87, 178, 255, 0.34),
      0 0 36px rgba(255, 100, 196, 0.24),
      inset 0 0 22px rgba(103, 210, 255, 0.16);
  }
}

.main-content-area.projects-dual-sidebar {
  grid-template-columns: var(--left-sidebar-width) minmax(0, 1fr) var(--right-sidebar-width);
}

.main-content-area.no-sidebars {
  display: block;
}

.main-content-area.no-sidebars > .home-content {
  min-height: 100%;
}

.main-content-area.full-height-octopus-screen .home-content {
  min-height: 100%;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .main-content-area,
html.project-fullscreen-enabled body.project-fullscreen-capable .main-content-area.projects-dual-sidebar,
html.project-fullscreen-enabled body.project-fullscreen-capable .main-content-area.project-left-collapsed:not(.projects-dual-sidebar),
html.project-fullscreen-enabled body.project-fullscreen-capable .main-content-area.projects-dual-sidebar.project-left-collapsed,
html.project-fullscreen-enabled body.project-fullscreen-capable .main-content-area.projects-dual-sidebar.project-right-collapsed,
html.project-fullscreen-enabled body.project-fullscreen-capable .main-content-area.projects-dual-sidebar.project-left-collapsed.project-right-collapsed {
  display: block;
  grid-template-columns: minmax(0, 1fr);
  height: 100dvh;
  min-height: 100dvh;
}

.project-sidebar-shell {
  min-width: 0;
  background: var(--app-sidebar-background);
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-sidebar-shell-left,
.project-sidebar-shell-right {
  overflow: hidden;
}

.project-sidebar-shell-left {
  border-right: 1px solid var(--color-border-subtle);
}

.action-bar-layout > .project-sidebar-shell-left {
  background: var(--app-mini-sidebar-background);
}

.project-sidebar-shell-right {
  border-left: 1px solid var(--color-border-subtle);
}

.project-sidebar-shell > .conversations-sidebar {
  flex: 1 1 auto;
  min-height: 100%;
  box-sizing: border-box;
}

.project-sidebar-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  border: none;
  background: transparent;
  padding: 0;
  cursor: ew-resize;
}

.project-sidebar-toggle-left {
  left: calc(var(--left-sidebar-width) - 19px);
}

.project-sidebar-toggle-right {
  right: calc(var(--right-sidebar-width) - 19px);
}

.project-sidebar-toggle-bubble {
  width: 28px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: none;
  background: transparent;
  color: transparent;
  font-size: 0;
  box-shadow: none;
  position: relative;
}

.project-sidebar-toggle-bubble::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 38px;
  border-radius: 999px;
  background: var(--color-surface-control);
  border: 1px solid var(--color-border-control);
  box-shadow: inset 0 0 0 1px rgb(var(--theme-canvas-rgb) / 28%);
}

.project-sidebar-toggle-bubble::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgb(var(--theme-text-rgb) / 92%);
  box-shadow:
    0 -8px 0 rgb(var(--theme-text-rgb) / 92%),
    0 -4px 0 rgb(var(--theme-text-rgb) / 92%),
    0 4px 0 rgb(var(--theme-text-rgb) / 92%),
    0 8px 0 rgb(var(--theme-text-rgb) / 92%);
}

.project-sidebar-toggle:hover .project-sidebar-toggle-bubble,
.project-sidebar-toggle:focus-visible .project-sidebar-toggle-bubble {
  background: transparent;
}

.action-bar-layout .project-sidebar-toggle-left {
  cursor: pointer;
  left: calc(var(--left-sidebar-width) - 19px);
}

.action-bar {
  min-height: 100%;
  width: 70px;
  padding: 12px 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  background: transparent;
}

.action-bar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.action-bar-mark {
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: rgb(var(--theme-text-rgb) / 78%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: none;
  text-decoration: none;
  position: relative;
}

.action-bar-link {
  cursor: pointer;
}

.action-bar-button {
  padding: 0;
  font: inherit;
}

.action-bar-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.action-bar-svg-icon {
  width: 28px;
  height: 28px;
  color: var(--theme-primary-soft);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-bar-icon--notes {
  stroke-width: 1.75;
}

.action-bar-icon--notes-line {
  stroke: var(--theme-primary-soft);
  stroke-width: 1.9;
}

.action-bar-badge {
  align-items: center;
  background: var(--color-accent-warm);
  border: 1px solid rgba(255, 247, 214, 0.88);
  border-radius: 999px;
  color: #1f1606;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
  position: absolute;
  right: 2px;
  top: 2px;
}

.action-bar-link:hover,
.action-bar-link:focus-visible {
  background: transparent;
  color: rgb(var(--theme-text-rgb) / 96%);
  outline: none;
}

.action-bar-link:hover .action-bar-svg-icon,
.action-bar-link:focus-visible .action-bar-svg-icon {
  color: var(--theme-primary);
  filter: drop-shadow(0 0 9px rgb(var(--theme-primary-rgb) / 42%));
  transform: scale(1.06);
}

.action-bar-placeholder {
  opacity: 0.78;
}

.conversation-notification-center {
  position: relative;
}

.conversation-notification-button.has-unread-danger {
  border-color: #ef4444;
  animation: conversation-notification-danger-pulse 1.1s ease-in-out infinite;
}

@keyframes conversation-notification-danger-pulse {
  0%,
  100% {
    border-color: rgba(239, 68, 68, 0.72);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.16), 0 12px 24px rgba(0, 0, 0, 0.22);
  }

  50% {
    border-color: #ff3030;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3), 0 12px 24px rgba(0, 0, 0, 0.22);
  }
}

.conversation-notification-panel {
  position: fixed;
  z-index: 80;
  left: 78px;
  bottom: 68px;
  box-sizing: border-box;
  width: min(520px, calc(100vw - 96px));
  max-height: min(72vh, 760px);
  padding: 14px;
  overflow-y: auto;
  border: 1px solid rgb(var(--theme-primary-rgb) / 32%);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgb(var(--theme-surface-rgb) / 98%), rgb(var(--theme-surface-rgb) / 99%)),
    var(--theme-surface-deep);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
}

.conversation-notification-panel-header {
  position: sticky;
  z-index: 1;
  top: -14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -14px -14px 12px;
  padding: 14px;
  border-bottom: 1px solid rgb(var(--theme-primary-rgb) / 18%);
  background: rgb(var(--theme-surface-rgb) / 98%);
}

.conversation-notification-panel-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--theme-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.conversation-notification-panel h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
  line-height: 1.3;
}

.conversation-notification-panel h2 span {
  color: var(--theme-accent-soft);
}

.conversation-notification-panel-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 72%);
  color: var(--theme-text);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.conversation-notification-history {
  display: grid;
  gap: 8px;
}

.conversation-notification-history .conversation-runtime-alert {
  flex: 0 0 auto;
}

.conversation-notification-empty {
  margin: 8px 2px 2px;
  color: #94a3b8;
  line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
  .conversation-notification-button.has-unread-danger {
    animation: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.26);
  }
}

.home-content.notes-content {
  padding: 34px 36px 18px;
}

.user-notes-shell {
  --user-notes-rail-track: minmax(260px, 320px);
  display: grid;
  gap: 18px;
}

.user-notes-page .user-notes-shell {
  box-sizing: border-box;
  margin: 0;
  max-width: none;
  min-height: calc(100vh - 150px);
  width: 100%;
}

.user-notes-shell--empty {
  grid-template-rows: auto minmax(0, 1fr);
}

.settings-dashboard-notice,
.settings-dashboard-alert {
  border-radius: 10px;
  margin: 0;
  padding: 10px 12px;
}

.settings-dashboard-notice {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.32);
  color: #c8f7dc;
}

.settings-dashboard-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #fecaca;
}

.user-notes-page-header {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: var(--user-notes-rail-track) minmax(0, 1fr);
  min-width: 0;
}

.user-notes-page-header > div {
  justify-self: stretch;
  text-align: center;
}

.user-notes-page-kicker {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.user-notes-page-title {
  color: var(--theme-text);
  font-size: 2rem;
  line-height: 1.05;
  margin: 0;
}

.user-notes-empty-stage {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 320px;
  width: 100%;
}

.user-notes-empty-card {
  background: rgba(9, 23, 48, 0.64);
  border: 1px solid var(--theme-panel-border);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  justify-items: start;
  max-width: 480px;
  padding: 28px;
  width: min(100%, 480px);
}

.user-notes-empty-card h2 {
  color: var(--theme-text);
  font-size: 1.38rem;
  line-height: 1.15;
  margin: 0;
}

.user-notes-empty-kicker {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.user-notes-empty-stage .button_to {
  margin: 0;
}

.user-notes-new-note-button {
  min-width: 132px;
}

.user-notes-new-note-button:hover,
.user-notes-new-note-button:focus-visible {
  outline: none;
}

.user-notes-form-card--first {
  width: 100%;
}

.user-notes-workspace {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: var(--user-notes-rail-track) minmax(0, 1fr);
  min-height: 0;
}

.user-notes-rail {
  align-content: start;
  border-right: 1px solid var(--color-border-subtle);
  display: grid;
  gap: var(--space-compact-card-stack);
  min-height: 0;
  padding: 32px 16px 8px 0;
}

.user-notes-rail-new-form {
  margin: 0;
}

.user-notes-rail-new-button {
  align-items: center;
  background: var(--color-surface-card);
  border: 1px dashed var(--color-border-active);
  border-radius: 9px;
  color: var(--theme-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 1.56rem;
  font-style: italic;
  font-weight: 900;
  justify-content: center;
  min-height: 52px;
  padding: 3px 6px;
  width: 100%;
}

.user-notes-rail-new-button:hover,
.user-notes-rail-new-button:focus-visible {
  background: var(--color-surface-card-lifted);
  border-color: var(--color-border-active);
  color: var(--theme-text);
  outline: none;
}

.user-notes-rail-list {
  display: grid;
  gap: var(--space-compact-card-stack);
}

.user-notes-rail-item {
  align-content: center;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 9px;
  color: var(--theme-text-muted);
  display: grid;
  gap: 4px;
  height: 68px;
  justify-items: center;
  min-height: 68px;
  overflow: hidden;
  padding: 12px 14px;
  text-align: center;
  text-decoration: none;
}

.user-notes-rail-item:hover,
.user-notes-rail-item:focus-visible,
.user-notes-rail-item.is-selected {
  background: var(--color-surface-card-lifted);
  border-color: var(--color-border-active);
  color: var(--theme-text);
  outline: none;
}

.user-notes-rail-item.is-selected {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 16.0%, transparent);
}

.user-notes-rail-item-title {
  display: -webkit-box;
  font-size: 1.12rem;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.14;
  overflow: hidden;
}

.user-notes-rail-item.is-selected .user-notes-rail-item-title {
  font-size: 1.36rem;
  line-height: 1.03;
}

.user-notes-rail-item-date {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
}

.user-notes-rail-empty {
  color: var(--theme-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
}

.user-notes-rail-empty {
  margin: 0;
  text-align: center;
}

.user-notes-editor-pane {
  align-content: start;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 8px 0 8px 4px;
}

.user-notes-show-stage {
  display: grid;
  justify-items: stretch;
}

.user-notes-current-heading {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.user-notes-current-title {
  color: var(--theme-text);
  font-size: 1.28rem;
  font-weight: 800;
  margin: 0;
  text-align: center;
}

.user-notes-current-date {
  color: var(--theme-text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.user-notes-form {
  display: grid;
  gap: 14px;
}

.user-notes-form-stack {
  display: grid;
  gap: 12px;
  max-width: none;
  width: 100%;
}

.user-notes-form-card--show {
  border-radius: 12px;
  box-sizing: border-box;
  max-width: none;
  padding: 18px;
  width: 100%;
}

.user-notes-audio-recording-row {
  width: 100%;
}

.user-notes-ai-shell {
  background: rgba(9, 23, 48, 0.46);
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  padding: 8px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.user-notes-ai-shell:focus-within,
.user-notes-ai-shell.is-active {
  background: rgba(12, 30, 62, 0.58);
  border-color: color-mix(in srgb, var(--theme-primary-soft) 68.0%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 14.0%, transparent), 0 0 0 3px rgb(var(--theme-primary-rgb) / 8.0%);
}

.user-notes-ai-textarea {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--theme-text);
  min-height: 260px;
  padding: 12px;
  resize: vertical;
}

.user-notes-ai-textarea:focus {
  box-shadow: none;
  outline: none;
}

.user-notes-temporal-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-notes-optional-field {
  min-width: 0;
}

.user-notes-required-note[hidden],
.user-notes-optional-field-button[hidden],
.user-notes-optional-field-panel[hidden] {
  display: none !important;
}

.user-notes-required-note {
  color: #f87171;
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.user-notes-optional-field-button {
  align-items: center;
  background: rgba(9, 23, 48, 0.58);
  border: 1px dashed rgba(122, 166, 218, 0.55);
  border-radius: 10px;
  color: var(--theme-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 43px;
  padding: 10px 12px;
  width: 100%;
}

.user-notes-optional-field-button:hover,
.user-notes-optional-field-button:focus-visible {
  background: rgba(12, 30, 62, 0.68);
  border-color: color-mix(in srgb, var(--theme-primary-soft) 66.0%, transparent);
  color: var(--theme-text);
  outline: none;
}

.user-notes-audio-recording-button {
  font-size: 1.02rem;
  min-height: 54px;
  padding: 13px 14px;
}

.user-notes-pin-toggle {
  align-items: center;
  color: var(--theme-text);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
}

.user-notes-autosave-status {
  color: var(--theme-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-left: 6px;
}

.user-notes-autosave-status[data-state="saved"] {
  color: #9ee6bd;
}

.user-notes-autosave-status[data-state="error"] {
  color: #fca5a5;
}

.user-notes-list {
  display: grid;
  gap: 12px;
}

.user-notes-delete-form {
  margin: 0;
}

.user-notes-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 900px) {
  .home-content.notes-content {
    padding: 24px 18px 18px;
  }

  .user-notes-page-header {
    align-items: center;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .user-notes-workspace {
    grid-template-columns: 1fr;
  }

  .user-notes-rail {
    border-bottom: 1px solid var(--color-border-subtle);
    border-right: 0;
    padding: 0 0 14px;
  }

  .user-notes-temporal-grid {
    grid-template-columns: 1fr;
  }
}

.helper-launcher-button {
  position: fixed;
  right: 0;
  top: 78%;
  transform: translateY(-50%);
  width: 28px;
  height: 82px;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--color-border-control);
  border-right: none;
  background: var(--color-surface-control);
  color: var(--theme-text-secondary);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 120;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.helper-launcher-button:hover,
.helper-launcher-button:focus-visible {
  background: rgb(var(--theme-primary-rgb) / 16%);
  border-color: var(--color-border-active);
}

.helper-panel {
  position: fixed;
  right: 90px;
  top: 75%;
  transform: translateY(-50%) translateX(14px);
  width: min(360px, calc(100vw - 120px));
  opacity: 0;
  pointer-events: none;
  z-index: 119;
  border-radius: 12px;
  border: 1px solid var(--color-border-control);
  background: color-mix(in srgb, var(--theme-surface) 98%, black);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  padding: 12px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.helper-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.helper-panel-message {
  margin: 0 0 10px;
  color: var(--theme-text);
  font-size: 0.94rem;
}

.helper-panel-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(123, 170, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: var(--theme-text);
  padding: 0 12px;
  box-sizing: border-box;
}

.action-bar-drawer-launcher-button,
.conversations-launcher-button {
  right: auto;
  left: 70px;
  border-radius: 0 12px 12px 0;
  border-right: 1px solid var(--color-border-control);
  border-left: none;
}

.conversations-launcher-button {
  height: 138px;
}

.projects-launcher-button {
  height: 92px;
}

body.action-bar-collapsed .action-bar-drawer-launcher-button,
body.action-bar-collapsed .conversations-launcher-button {
  left: 0;
}

.action-bar-drawer-panel,
.dashboard-conversations-panel {
  right: auto;
  left: 106px;
  width: min(390px, calc(100vw - 130px));
  max-height: min(72vh, 720px);
  overflow: hidden;
  padding: 0;
  transform: translateY(-50%) translateX(-14px);
}

.dashboard-conversations-panel {
  top: 58%;
}

.projects-action-panel {
  top: 50%;
  width: min(760px, calc(100vw - 130px));
  max-height: min(76vh, 780px);
}

.action-bar-drawer-panel.is-open,
.dashboard-conversations-panel.is-open {
  transform: translateY(-50%) translateX(0);
}

body.action-bar-collapsed .action-bar-drawer-panel,
body.action-bar-collapsed .dashboard-conversations-panel {
  left: 42px;
  width: min(390px, calc(100vw - 64px));
}

body.action-bar-collapsed .projects-action-panel {
  width: min(760px, calc(100vw - 64px));
}

.action-bar-drawer-panel > .conversations-sidebar,
.dashboard-conversations-panel > .conversations-sidebar {
  max-height: min(72vh, 720px);
  background: transparent;
  padding: 14px 12px;
  border-radius: 12px;
}

.projects-action-panel .sidebar-project-tree,
.projects-action-panel .sidebar-scope-tree-node,
.projects-action-panel .sidebar-conversation-row,
.projects-action-panel .sidebar-sidebar-folder-row,
.projects-action-panel .sidebar-project-group-projects,
.projects-action-panel .sidebar-project-folders {
  min-width: 0;
  max-width: 100%;
}

.projects-action-panel .sidebar-project-tree {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.projects-action-panel .sidebar-scope-tree-node {
  border: 1px solid rgba(112, 158, 218, 0.36);
  border-left-width: 5px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 32, 63, 0.94), rgba(8, 20, 42, 0.94));
  box-shadow: 0 12px 26px rgba(2, 8, 22, 0.26);
  overflow: hidden;
}

.projects-action-panel .sidebar-scope-tree-node:has(.sidebar-project-actions[open]),
.projects-action-panel .sidebar-scope-tree-node:has(.sidebar-folder-actions[open]) {
  overflow: visible;
  z-index: 9000;
}

.projects-action-panel .sidebar-scope-tree-node--folder {
  border-left-color: rgba(110, 232, 165, 0.72);
}

.projects-action-panel .sidebar-scope-tree-node--campaign {
  border-left-color: rgba(112, 186, 255, 0.76);
}

.projects-action-panel .sidebar-scope-tree-node--project {
  border-left-color: rgba(246, 196, 92, 0.72);
}

.projects-action-panel .sidebar-scope-tree-node--conversation {
  border-left-color: rgba(184, 151, 255, 0.74);
}

.projects-action-panel .sidebar-conversation-row,
.projects-action-panel .sidebar-sidebar-folder-row {
  padding: 10px;
}

.projects-action-panel .sidebar-project-group-projects,
.projects-action-panel .sidebar-project-folders {
  margin-top: 0;
  padding: 8px;
  border-top: 1px solid rgba(114, 163, 223, 0.18);
  background: rgba(4, 12, 28, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.projects-action-panel .sidebar-project-group-projects .sidebar-project-group-projects,
.projects-action-panel .sidebar-project-folders .sidebar-project-group-projects,
.projects-action-panel .sidebar-project-folders .sidebar-project-folders {
  grid-template-columns: 1fr;
}

.projects-action-panel .sidebar-project-tree > .sidebar-project-item + .sidebar-project-item > .sidebar-conversation-row,
.projects-action-panel .sidebar-project-group-projects > .sidebar-project-item + .sidebar-project-item > .sidebar-conversation-row,
.projects-action-panel .sidebar-project-tree > .sidebar-sidebar-folder-item + .sidebar-sidebar-folder-item > .sidebar-sidebar-folder-row,
.projects-action-panel .sidebar-project-tree > .sidebar-sidebar-folder-item + .sidebar-project-item > .sidebar-conversation-row,
.projects-action-panel .sidebar-project-tree > .sidebar-project-item + .sidebar-sidebar-folder-item > .sidebar-sidebar-folder-row {
  margin-top: 0;
  padding-top: 10px;
  border-top: 0;
}

.projects-action-panel .sidebar-conversation-link,
.projects-action-panel .sidebar-sidebar-folder-name,
.projects-action-panel .sidebar-project-folder-link {
  min-width: 0;
  max-width: 100%;
}

.projects-action-panel .sidebar-scope-role-chip {
  display: none;
}

.projects-action-panel .sidebar-project-actions,
.projects-action-panel .sidebar-folder-actions {
  flex: 0 0 auto;
}

.projects-action-panel .sidebar-project-popover,
.projects-action-panel .sidebar-folder-popover {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(4px) scale(0.98);
}

.projects-action-panel .sidebar-project-actions[open] .sidebar-project-popover,
.projects-action-panel .sidebar-folder-actions[open] .sidebar-folder-popover {
  transform: translateY(0) scale(1);
}

.main-content-area.projects-dual-sidebar.project-left-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) var(--right-sidebar-width);
}

.main-content-area.project-left-collapsed:not(.projects-dual-sidebar) {
  grid-template-columns: 0 minmax(0, 1fr);
}

.main-content-area.project-left-collapsed .project-sidebar-shell-left {
  width: 0;
}

.main-content-area.project-left-collapsed .project-sidebar-toggle-left {
  left: 8px;
}

.main-content-area.projects-dual-sidebar.project-right-collapsed {
  grid-template-columns: var(--left-sidebar-width) minmax(0, 1fr) 0;
}

.main-content-area.projects-dual-sidebar.project-right-collapsed .project-sidebar-shell-right {
  width: 0;
}

.main-content-area.projects-dual-sidebar.project-right-collapsed .project-sidebar-toggle-right {
  right: 8px;
}

.main-content-area.projects-dual-sidebar.project-left-collapsed.project-right-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

@media (max-width: 980px) {
  .main-content-area { grid-template-columns: 1fr; }
  .main-content-area.projects-dual-sidebar { grid-template-columns: 1fr; }
  .conversations-sidebar-right { display: none; }
  .project-sidebar-toggle { display: none; }
}

body.is-resizing-sidebars,
body.is-resizing-sidebars * {
  cursor: ew-resize !important;
  user-select: none;
}

/* =========================================================
   Sidebar
========================================================= */

.conversations-sidebar {
  background: var(--app-sidebar-background);
  border-right: none;
  padding: 14px 12px;
  color: var(--theme-text);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  position: relative;
  z-index: 40;
}

.conversations-sidebar:not(.conversations-sidebar-right) {
  overflow-y: scroll;
}

.conversations-sidebar::-webkit-scrollbar {
  width: 10px;
}

.conversations-sidebar::-webkit-scrollbar-track {
  background: rgb(var(--theme-surface-rgb) / 72%);
  border-left: 1px solid var(--color-border-subtle);
}

.conversations-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgb(var(--theme-primary-rgb) / 78%), rgb(var(--theme-primary-rgb) / 56%));
  border-radius: 999px;
  border: 2px solid rgb(var(--theme-canvas-rgb) / 92%);
}

.conversations-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--theme-primary-rgb) / 78%) rgb(var(--theme-surface-rgb) / 72%);
}

.project-sidebar-shell-left::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 6px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgb(var(--theme-primary-rgb) / 12%) 0%,
    rgb(var(--theme-primary-rgb) / 22%) 34%,
    rgb(var(--theme-canvas-rgb) / 82%) 100%
  );
}

.project-sidebar-shell-right::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  width: 6px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to left,
    rgb(var(--theme-primary-rgb) / 12%) 0%,
    rgb(var(--theme-primary-rgb) / 22%) 34%,
    rgb(var(--theme-canvas-rgb) / 82%) 100%
  );
}

.conversations-sidebar.conversations-sidebar-right {
  border-right: none;
  border-left: none;
}

.conversations-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.conversations-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--theme-text);
}

.conversations-section-divider {
  height: 1px;
  background: var(--theme-surface-muted);
  margin: 2px 0 12px;
  width: 100%;
}

.conversations-subtitle {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--theme-text-secondary);
}

.conversations-subtitle-indented {
  text-align: left;
  margin-left: 14px;
}

.sidebar-agent-list {
  margin: 0 0 12px 14px;
  display: grid;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 6px;
}

.sidebar-agent-list.is-scrollable {
  max-height: 32vh;
  overflow: auto;
}

.sidebar-agent-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-agent-actions {
  margin-left: auto;
}

.sidebar-agent-link {
  max-width: calc(100% - 14px);
}

.sidebar-agent-assign-form {
  margin: 0 0 0 auto;
}

.sidebar-agent-assign-btn {
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-lift);
  color: var(--theme-text-secondary);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
}

.sidebar-agent-assign-btn:hover {
  background: #203253;
  color: var(--theme-text);
}

.sidebar-agent-assign-btn.is-linked {
  border-color: #365777;
  background: #1a3149;
}

.sidebar-agent-empty {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.85rem;
}

.sidebar-placeholder-button-row {
  margin: -2px 0 12px 14px;
  padding-right: 6px;
}

.sidebar-placeholder-button {
  width: 100%;
  opacity: 0.78;
  cursor: default;
}

.sidebar-placeholder-button:disabled {
  opacity: 0.78;
  cursor: default;
}

.sidebar-right-top {
  display: grid;
  gap: 4px;
  min-height: 0;
}

.sidebar-right-bottom {
  margin-top: 6px;
  padding-top: 10px;
  min-height: 0;
  flex: 0 0 auto;
  overflow: visible;
  padding-right: 0;
}

.sidebar-project-conversations {
  margin-left: 14px;
}

.sidebar-project-agent-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.sidebar-project-agent-list.is-scrollable {
  max-height: 32vh;
  overflow: auto;
  padding-right: 6px;
}

.sidebar-project-conversation-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.conversations-sidebar-right .sidebar-project-conversations .sidebar-conversation-item,
.conversations-sidebar-right .sidebar-agent-list .sidebar-agent-item {
  margin-bottom: 2px;
}

.sidebar-project-conversation-empty {
  margin-left: 14px;
}

.provider-lock-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  vertical-align: middle;
  margin-right: 6px;
}

.provider-lock-dot.is-free {
  background: #22c55e;
}

.provider-lock-dot.is-busy {
  background: #ef4444;
}

.provider-lock-dot.is-unknown {
  background: #64748b;
}

.sidebar-lock-dot {
  margin-right: 0;
  flex: 0 0 auto;
}

.conversation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.conversation-item-row { position: relative; }

.conversation-item {
  width: 100%;
  display: block;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--theme-surface-muted);
  background: #142036;
  color: var(--theme-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item:hover {
  background: var(--theme-surface-lift);
  border-color: var(--theme-border);
  color: var(--theme-text);
}



/* Sidebar button styles merged for new sidebar row system */
.sidebar-button-form { margin: 0; }

.sidebar-button,
.sidebar-conversation-delete,
.sidebar-conversation-rename {
  display: block;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-button:hover,
.sidebar-conversation-delete:hover,
.sidebar-conversation-rename:hover {
  background: var(--theme-border);
}

.sidebar-button.sidebar-button-small {
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Sidebar actions popover for new sidebar row system */
.sidebar-conversation-actions.popover {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) scale(0.98);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-muted);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
  display: grid;
  gap: 8px;
  min-width: 160px;
}

.sidebar-conversation-item:hover .sidebar-conversation-actions.popover,
.sidebar-conversation-item:focus-within .sidebar-conversation-actions.popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.conversation-item-row:hover .conversation-actions,
.conversation-item-row:focus-within .conversation-actions,
.conversation-item-row.is-actions-open .conversation-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.conversation-actions-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--theme-text-muted);
}

.conversation-rename,
.conversation-delete {
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  display: block;
}

.conversation-rename {
  background: var(--theme-surface-muted);
  border: 1px solid var(--theme-border-choice);
  color: var(--theme-text);
}

.conversation-rename:hover { background: var(--theme-border-choice); }

.conversation-delete {
  background: #7f1d1d;
  border: 1px solid #991b1b;
  color: #fee2e2;
}

.conversation-delete:hover { background: #991b1b; }

.conversation-index-page {
  max-width: 1120px;
  margin: 0 auto;
}

.conversation-index-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.conversation-index-hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-family-ui);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 0;
}

.conversation-index-card {
  max-width: 1120px;
  margin: 0 auto 28px;
}

.conversation-index-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.conversation-index-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--color-border-control);
  border-radius: 8px;
  background: var(--color-surface-control);
  color: var(--theme-text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

.conversation-index-filter:hover,
.conversation-index-filter:focus-visible {
  border-color: var(--color-border-active);
  background: var(--color-surface-card-lifted);
  color: var(--theme-text);
  outline: none;
}

.conversation-index-filter.is-active {
  border-color: var(--color-accent-warm-border);
  background: var(--color-accent-warm-soft);
  color: #fff7d6;
}

.conversation-index-list {
  display: grid;
  gap: 10px;
}

.conversation-index-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border-control);
  border-radius: 10px;
  background: var(--color-surface-card);
  color: var(--theme-text);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.conversation-index-row:hover,
.conversation-index-row:focus-visible {
  border-color: var(--color-border-active);
  background: var(--color-surface-card-lifted);
  transform: translateY(-1px);
}

.conversation-index-marker {
  display: grid;
  place-items: center;
  min-width: 58px;
  max-width: 128px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid rgba(80, 191, 255, 0.52);
  border-radius: 8px;
  background: rgb(var(--theme-primary-rgb) / 18.0%);
  color: var(--theme-primary-pale);
  font-family: var(--font-family-mono);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-index-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.conversation-index-copy strong,
.conversation-index-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-index-copy small {
  color: var(--theme-text-muted);
}

@media (max-width: 720px) {
  .conversation-index-hero {
    flex-direction: column;
  }
}

/* =========================================================
   Main Content / Chat
========================================================= */
.home-content {
  position: relative;
  overflow: auto;

  /* Single authenticated-app background owner; child page shells stay transparent. */
  /* Blend center glow into darker edges while keeping the octopus visible */
  /* Backup blend:
     linear-gradient(to right, rgba(10, 14, 28, 0.97) 0%, rgba(20, 28, 50, 0.88) 45%, rgba(9, 11, 24, 0.99) 100%)
     radial-gradient(ellipse at center, rgba(76, 118, 174, 0.10) 0%, rgba(56, 90, 146, 0.05) 32%, rgba(24, 34, 62, 0.68) 60%, rgba(10, 12, 26, 0.95) 100%)
  */
  background-image:
    linear-gradient(to right, rgb(var(--theme-canvas-rgb) / 98.5%) 0%, rgb(var(--theme-surface-rgb) / 92%) 45%, rgb(var(--theme-canvas-rgb) / 100%) 100%),
    radial-gradient(ellipse at center, rgb(var(--theme-primary-rgb) / 6%) 0%, rgb(var(--theme-primary-rgb) / 2.5%) 28%, rgb(var(--theme-surface-rgb) / 76%) 56%, rgb(var(--theme-canvas-rgb) / 97.5%) 100%),
    var(--theme-background-image);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  background-size: cover, cover, 1150px auto; /* widened octopus image */
  padding: 70px 60px 16px;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .home-content {
  box-sizing: border-box;
  height: 100dvh;
  min-height: 100dvh;
  padding: 28px 56px 28px !important;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .home-content-inner {
  box-sizing: border-box;
  min-height: calc(100dvh - 56px);
  width: 100%;
}

.home-content.organization-content {
  padding-top: 16px;
}

.home-chat-shell {
  padding-bottom: 50px;
}

.home-chat-shell--starting {
  padding-bottom: 12px;
}

.home-chat-shell--project-conversation {
  display: grid;
  gap: 16px;
}

.operator-inbox-book {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(134, 199, 234, 0.32);
  border-radius: 14px;
  background: rgba(10, 23, 43, 0.92);
  color: var(--theme-text);
}

.operator-inbox-book--compact {
  width: min(100%, 1180px);
  max-height: 360px;
  margin: 0 auto 16px;
  overflow: auto;
}

.operator-inbox-book__header,
.operator-inbox-book__item-heading,
.operator-inbox-book__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.operator-inbox-book h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
  text-align: left;
}

.operator-inbox-book__header p,
.operator-inbox-book__meta,
.operator-inbox-book__time,
.operator-inbox-book__delivery,
.operator-inbox-book__overflow {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.78rem;
}

.operator-inbox-book__count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(50, 165, 224, 0.16);
  color: #9fddff;
  font-size: 0.76rem;
  font-weight: 800;
}

.operator-inbox-book__items {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.operator-inbox-book__item {
  padding: 11px 12px;
  border: 1px solid rgba(159, 179, 213, 0.18);
  border-radius: 10px;
  background: rgba(20, 39, 67, 0.75);
}

.operator-inbox-book__item-title {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.operator-inbox-book__time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.operator-inbox-book__context {
  margin-top: 9px;
  color: var(--theme-text-secondary);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.operator-inbox-book__handling {
  margin: 9px 0 0;
  color: #9fe3bd;
  font-size: 0.78rem;
}

.operator-inbox-book__usage-events {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(159, 179, 213, 0.14);
  color: var(--theme-text-secondary);
  font-size: 0.76rem;
}

.operator-inbox-book__usage-events-title {
  margin: 0;
  color: var(--theme-text);
  font-weight: 800;
}

.operator-inbox-book__usage-events ul {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding-left: 18px;
}

.operator-inbox-book__usage-events p:not(.operator-inbox-book__usage-events-title) {
  margin: 6px 0 0;
}

.operator-inbox-book__usage-events a {
  color: #9fddff;
}

.operator-inbox-book__empty {
  margin: 0;
  padding: 13px;
  border-radius: 10px;
  background: rgba(20, 39, 67, 0.75);
  color: var(--theme-text-secondary);
}

.operator-inbox-book__footer {
  justify-content: flex-end;
}

.operator-inbox-pagination {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.operator-inbox-filters {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(159, 179, 213, 0.24);
  border-radius: 12px;
  background: rgba(11, 29, 53, 0.76);
}

.operator-inbox-filters__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.operator-inbox-filters__group > span {
  min-width: 52px;
  color: var(--theme-text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-content.providers-content {
  padding: 12px 40px 16px;
}

.home-content.general-content {
  padding: 12px 40px 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

.providers-form-shell {
  width: min(100%, 1060px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.providers-form-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.providers-form-header h1 {
  grid-column: 2;
  text-align: center;
}

.providers-form-header-action {
  grid-column: 3;
  justify-self: end;
}

.providers-form-subtitle {
  margin: 0 0 12px;
  text-align: center;
}

.providers-form-errors {
  background: #ffecec;
  padding: 10px;
  border-radius: 8px;
  margin: 0 auto 12px;
  width: min(100%, 980px);
  max-width: 980px;
}

.providers-form-card {
  margin: 0 auto 18px;
  width: min(100%, 1040px);
  max-width: 1040px;
}

.providers-form-card h2 {
  text-align: left !important;
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.providers-form-card .usage-table {
  width: 100%;
  max-width: 100%;
  margin: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.providers-form-card .usage-table th {
  width: 240px;
  text-align: right;
  padding-right: 14px;
  vertical-align: top;
  color: var(--theme-text);
}

.providers-form-card .usage-table td {
  width: auto;
  padding-right: 20px;
  box-sizing: border-box;
  color: var(--theme-text);
}

.providers-form-card .usage-table td input[type="text"],
.providers-form-card .usage-table td input[type="number"],
.providers-form-card .usage-table td textarea,
.providers-form-card .usage-table td select {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 28.0%, transparent);
  background: rgba(10, 16, 30, 0.78);
  color: var(--theme-text);
  padding: 10px 12px;
  box-sizing: border-box;
}

.providers-form-actions {
  margin-top: 8px;
  text-align: center;
}

.providers-dashboard-table {
  min-width: 1100px;
}

.providers-dashboard-actions {
  justify-content: flex-end;
}

.providers-section-card {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.providers-section-card .usage-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.providers-section-card .usage-table th {
  width: 240px;
  text-align: right;
  padding-right: 14px;
  vertical-align: top;
  color: var(--theme-text);
}

.providers-section-card .usage-table td {
  color: var(--theme-text);
}

.home-chat-dock {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding-top: 6px;
  background: linear-gradient(to top, rgb(var(--theme-canvas-rgb) / 96.0%), rgb(var(--theme-canvas-rgb) / 0.0%));
}

.home-conversation-input-zone {
  position: relative;
}

.home-conversation-input-zone--starting {
  min-height: clamp(420px, calc(100vh - 320px), 680px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-conversation-input-zone--starting .home-chat-dock {
  position: relative;
  bottom: auto;
  background: transparent;
}

.home-conversation-input-zone--starting .home-conversation-memory {
  margin-top: 8px;
}

/* If you want the octopus to "float" and not scroll with content */
@media (min-width: 981px) {
  .home-content {
    background-attachment: fixed;
  }
}

@media (max-width: 980px) {
  .home-content {
    background-size: cover, cover, 760px auto;
    padding: 18px 14px 10px;
  }

  .main-content-area.action-bar-layout > .home-content {
    padding-top: 18px;
  }

  .home-content.providers-content {
    padding: 10px 16px;
  }

  .home-content.general-content {
    padding: 10px 16px;
  }

  .home-chat-shell {
    padding-bottom: 70px;
  }
}

/* =========================================================
   Octopus background stage + AI Response overlay (MISSING BEFORE)
========================================================= */
.home-octopus-stage {
  position: relative;
  height: 280px;
  margin: 12px 0 18px;
  border-radius: 16px;
  overflow: hidden;
}

.home-octopus-bg {
  background-image: var(--theme-background-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
}

/* The response box overlays the octopus */
.home-octopus-stage .home-response-box {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  margin: 0;
  z-index: 2;
  background: rgba(35, 52, 86, 0.92);
  border: 1px solid var(--theme-border);
  backdrop-filter: blur(4px);
}

/* Default response box (used elsewhere too) */
.home-response-box {
  transition: opacity 0.2s ease;
  margin: 12px 0 18px;
  padding: 16px;
  border-radius: 12px;
  background: var(--theme-border);
  border: 1px solid var(--theme-border);
  position: relative;
  padding: 20px;
}

.home-response-box.is-hidden { display: none; }

.home-response-actions {
  position: absolute;
  top: 12px;
  right: 12px;
}

.home-response-remember {
  background: var(--theme-surface-lift);
  border: 1px solid var(--theme-border);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--theme-text);
  cursor: pointer;
}

.home-response-remember:hover { background: var(--theme-border); }

#live-response-text {
  white-space: pre-wrap;
  line-height: 1.4;
}

/* Chat form */
.home-chat-bar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
}

.home-chat-top-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.home-chat-top-controls[hidden] {
  display: none !important;
}

.home-chat-select {
  min-width: 180px;
}

.home-chat-provider-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.home-chat-provider-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-chat-select[hidden] {
  display: none !important;
}

.home-chat-select select {
  width: 100%;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-text);
}

.home-chat-provider-reveal {
  border: 0;
  background: transparent;
  color: var(--theme-text-muted);
  font-size: 0.78rem;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.home-chat-provider-reveal:hover {
  color: var(--theme-text-secondary);
}

.home-chat-input-wrap,
.home-chat-input-inner {
  display: grid;
  gap: 6px;
}

textarea#chat_prompt {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-text);
  padding: 8px 10px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.35;
}

.project-resume-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--theme-border);
  border-radius: 18px;
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  box-shadow: 0 24px 80px color-mix(in srgb, var(--theme-background) 72%, transparent);
}

.project-resume-dialog::backdrop {
  background: color-mix(in srgb, var(--theme-background) 76%, transparent);
  backdrop-filter: blur(5px);
}

.project-resume-dialog__card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.project-resume-dialog__eyebrow {
  color: var(--theme-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.project-resume-dialog h2,
.project-resume-dialog p {
  margin: 0;
}

.project-resume-dialog p {
  color: var(--theme-text-muted);
  line-height: 1.55;
}

.project-resume-priorities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.project-resume-priorities legend {
  width: 100%;
  margin-bottom: 10px;
  color: var(--theme-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-resume-priority {
  position: relative;
  cursor: pointer;
}

.project-resume-priority input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.project-resume-priority span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-surface);
  color: var(--theme-text-secondary);
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.project-resume-priority input:checked + span {
  border-color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-accent) 14%, var(--theme-surface));
  color: var(--theme-text);
}

.project-resume-priority input:focus-visible + span {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.project-resume-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.project-resume-dialog__button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--theme-border);
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
}

.project-resume-dialog__button--secondary {
  background: transparent;
  color: var(--theme-text-secondary);
}

.project-resume-dialog__button--primary {
  border-color: var(--theme-accent);
  background: var(--theme-accent);
  color: var(--theme-accent-contrast, var(--theme-background));
}

@media (max-width: 540px) {
  .project-resume-dialog__card { padding: 22px; }
  .project-resume-priorities { grid-template-columns: 1fr; }
  .project-resume-dialog__actions { flex-direction: column-reverse; }
  .project-resume-dialog__button { width: 100%; }
}

.home-chat-input-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.home-chat-attachment-tray {
  position: relative;
}

.home-chat-attachment-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 30px;
  height: 30px;
  max-width: 260px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.home-chat-attachment-summary::-webkit-details-marker {
  display: none;
}

.home-chat-attachment-tray[open] .home-chat-attachment-summary,
.home-chat-attachment-summary:hover {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 68.0%, transparent);
  background: var(--theme-border);
}

.home-chat-attachment-tray--active .home-chat-attachment-summary {
  border-color: rgba(34, 197, 94, 0.75);
  background: rgba(20, 83, 45, 0.92);
}

.home-chat-add-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 1.25rem;
  line-height: 1;
}

.home-chat-attachment-card {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--color-border-control);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-surface) 94%, black);
  box-shadow: 0 16px 34px rgb(var(--theme-canvas-rgb) / 42%);
}

.home-chat-attachment-menu-item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--theme-text);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.home-chat-attachment-menu-item:hover {
  background: color-mix(in srgb, var(--theme-primary-pale) 16.0%, transparent);
  color: var(--theme-text);
}

.home-chat-selected-files {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.home-chat-selected-file {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #bbf7d0;
  font-size: 0.8rem;
}

.conversation-job-menu {
  position: relative;
}

.conversation-job-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--color-border-control);
  border-radius: 10px;
  background: var(--color-surface-control);
  color: var(--theme-text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.conversation-job-menu-trigger::-webkit-details-marker {
  display: none;
}

.conversation-job-menu[open] .conversation-job-menu-trigger,
.conversation-job-menu-trigger:hover {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 68.0%, transparent);
  background: var(--theme-border);
}

.conversation-job-menu-card {
  position: fixed;
  top: clamp(64px, 8vh, 92px);
  bottom: clamp(84px, 14vh, 150px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: min(760px, calc(100vw - 48px));
  overflow: auto;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--color-border-active);
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-surface) 96%, black);
  box-shadow: 0 18px 42px rgb(var(--theme-canvas-rgb) / 44%);
}

.conversation-job-menu-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.conversation-job-menu-header span {
  color: var(--theme-text);
  font-weight: 800;
}

.conversation-job-menu-header small,
.conversation-job-grant-card small,
.conversation-job-menu-group p {
  color: var(--theme-text-muted);
}

.conversation-job-grant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.conversation-job-grant-card,
.conversation-job-menu-group {
  border: 1px solid var(--color-border-control);
  border-radius: 12px;
  background: var(--color-surface-card-lifted);
  padding: 10px;
}

.conversation-job-grant-card.is-pending {
  border-color: rgba(246, 196, 92, 0.72);
  background: rgba(41, 35, 20, 0.76);
}

.conversation-job-grant-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conversation-job-grant-topline strong,
.conversation-job-menu-group h4 {
  color: var(--theme-text);
}

.conversation-job-grant-topline span {
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 44.0%, transparent);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgb(var(--theme-primary-rgb) / 18.0%);
  color: var(--theme-primary-pale);
  font-size: 0.7rem;
  font-weight: 800;
}

.conversation-job-grant-card p,
.conversation-job-menu-group p {
  margin: 8px 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.conversation-job-grant-research-controls {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}

.conversation-job-grant-depth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--theme-primary-pale);
  font-size: 0.76rem;
  font-weight: 800;
}

.conversation-job-grant-depth-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 70px;
}

.conversation-job-grant-depth strong {
  min-width: 22px;
  text-align: center;
  color: var(--theme-text);
}

.conversation-job-grant-depth-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.conversation-job-grant-depth-button {
  width: 24px;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 58.0%, transparent);
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  color: var(--theme-primary-faint);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.conversation-job-grant-depth-button:hover {
  background: rgb(var(--theme-primary-rgb) / 74.0%);
}

.conversation-job-grant-depth-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.conversation-job-grant-depth-slider {
  min-width: 70px;
  max-width: 150px;
  width: 100%;
  accent-color: var(--theme-primary);
}

.conversation-job-grant-depth-preview,
.conversation-job-grant-depth-status {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.conversation-job-grant-intensity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--theme-primary-pale);
  font-size: 0.76rem;
  font-weight: 800;
}

.conversation-job-grant-intensity select {
  min-width: 132px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 46.0%, transparent);
  border-radius: 8px;
  background: rgb(var(--theme-surface-rgb) / 78.0%);
  color: var(--theme-text);
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 800;
}

.conversation-job-grant-intensity select:disabled {
  opacity: 0.58;
}

.conversation-job-grant-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-job-grant-footer small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-job-grant-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 68.0%, transparent);
  border-radius: 9px;
  background: rgb(var(--theme-primary-rgb) / 82.0%);
  color: var(--theme-text);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.conversation-job-grant-button:hover {
  background: rgb(var(--theme-primary-rgb) / 100.0%);
}

.conversation-job-grant-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.conversation-job-grant-button--secondary {
  border-color: var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-primary-faint);
}

.conversation-job-grant-button--secondary:hover {
  background: var(--theme-border);
}

.conversation-job-grant-button.is-pending {
  border-color: rgba(246, 196, 92, 0.78);
  background: rgba(146, 103, 22, 0.84);
}

.conversation-job-menu-groups {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.conversation-job-menu-group h4 {
  margin: 0;
  font-size: 0.88rem;
}

.conversation-job-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.conversation-job-chip {
  border: 1px solid var(--color-border-control);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--color-surface-control);
  color: var(--theme-primary-faint);
  font-size: 0.72rem;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .home-conversation-input-zone--starting {
    min-height: auto;
    justify-content: flex-start;
  }

  .conversation-job-menu-card {
    top: 58px;
    right: 12px;
    bottom: 18px;
    left: 12px;
    width: auto;
    transform: none;
  }

  .conversation-job-grant-grid {
    grid-template-columns: 1fr;
  }
}

.home-chat-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.home-automation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #365176;
  background: rgb(var(--theme-surface-rgb) / 92.0%);
}

.home-automation-banner.dismissible-banner {
  padding-right: 52px;
}

.home-automation-banner .dismissible-banner-content {
  width: 100%;
}

.home-automation-banner-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.home-automation-banner strong {
  display: block;
  margin-bottom: 4px;
  color: var(--theme-text);
}

.home-automation-banner span {
  color: var(--theme-text-secondary);
  line-height: 1.35;
}

.home-automation-banner-paused {
  border-color: #cda45b;
  background: rgba(58, 42, 14, 0.9);
}

.home-automation-banner-terminal {
  border-color: #5b6f92;
  background: rgba(20, 30, 48, 0.92);
}

.home-automation-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversation-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.conversation-heading-row h3 {
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0;
}

.conversation-research-title-link {
  margin: 0;
  color: var(--theme-text);
  font-family: var(--font-family-ui);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}

.conversation-research-title-link:hover,
.conversation-research-title-link:focus-visible {
  color: var(--theme-primary-faint);
  outline: none;
}

.conversation-heading-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.conversation-heading-row--with-research {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
}

.conversation-heading-row--with-research .conversation-heading-main {
  justify-self: start;
}

.conversation-heading-row--with-research .conversation-heading-actions {
  justify-self: end;
}

.conversation-heading-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.conversation-heading-title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.conversation-title-separator {
  color: var(--theme-text-muted);
  font-weight: 400;
}

.conversation-ticker {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--theme-text-muted);
  font-family: var(--font-family-mono);
  font-size: 0.78em;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-ticker--heading {
  color: var(--theme-text-muted);
  font-size: 0.72em;
}

.conversation-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.conversation-heading-row--project-actions {
  justify-content: flex-end;
}

.conversation-research-divider {
  justify-self: center;
  align-self: center;
  width: 1px;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-accent-warm-border),
    transparent
  );
}

.conversation-research-header-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 11px;
  border: 1px solid var(--color-accent-warm-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(97, 64, 24, 0.44), rgba(38, 24, 10, 0.34)),
    var(--color-accent-warm-soft);
  color: #fff1bd;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(214, 168, 79, 0.12);
}

.conversation-research-header-link:hover,
.conversation-research-header-link:focus-visible {
  border-color: rgba(255, 221, 139, 0.78);
  background:
    linear-gradient(180deg, rgba(121, 82, 32, 0.54), rgba(46, 30, 13, 0.42)),
    rgba(214, 168, 79, 0.24);
  color: #fff8d8;
  outline: none;
}

.conversation-research-header-link--active,
.conversation-research-header-link--active:hover,
.conversation-research-header-link--active:focus-visible {
  cursor: default;
}

.conversation-research-word {
  color: #b7792f;
  font-family: var(--font-family-ui);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    0 0 1px #ffdf8a,
    0 0 9px rgba(214, 168, 79, 0.28);
  -webkit-text-stroke: 0.35px #ffdf8a;
}

.conversation-research-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffe9a8;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

.deep-synthesis-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 157, 255, 0.22);
  background: rgba(16, 26, 44, 0.88);
  color: var(--theme-text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.deep-synthesis-status-badge--authorized,
.deep-synthesis-status-badge--pending_approval {
  border-color: rgba(119, 148, 190, 0.28);
  color: var(--theme-text-secondary);
}

.deep-synthesis-status-badge--in_progress {
  border-color: rgba(99, 201, 255, 0.48);
  color: #d7f7ff;
  background:
    linear-gradient(135deg, rgba(19, 41, 72, 0.95), rgba(56, 18, 73, 0.78));
  box-shadow: 0 0 18px rgba(98, 188, 255, 0.18);
}

.deep-synthesis-status-badge--failed {
  border-color: rgba(255, 124, 155, 0.36);
  color: #ffd2dd;
  background: rgba(74, 21, 36, 0.86);
}

.deep-synthesis-status-badge--completed {
  border-color: rgba(120, 226, 174, 0.32);
  color: #dcffed;
  background: rgba(17, 55, 38, 0.84);
}

.deep-synthesis-transcript-active {
  position: relative;
  overflow: hidden;
  border-color: rgba(98, 188, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(98, 188, 255, 0.16), 0 0 22px rgba(98, 188, 255, 0.16);
}

.deep-synthesis-transcript-active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(86, 208, 255, 0.05), rgba(255, 79, 170, 0.04), rgba(255, 210, 69, 0.05));
}

.deep-synthesis-failure-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 118, 154, 0.34);
  background:
    radial-gradient(circle at top, rgba(107, 30, 54, 0.44), rgba(31, 14, 24, 0.92));
  text-align: center;
}

.deep-synthesis-failure-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffc0cf;
}

.deep-synthesis-failure-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff1f4;
}

.deep-synthesis-failure-copy {
  margin: 0;
  max-width: 54ch;
  color: #f2d4dc;
  line-height: 1.45;
}

.deep-synthesis-failure-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: #f4c5d0;
  font-size: 0.82rem;
}

.deep-synthesis-failure-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 169, 191, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.deep-synthesis-failure-reason {
  width: 100%;
  max-width: 58ch;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 166, 190, 0.22);
  background: rgba(15, 8, 13, 0.34);
  text-align: left;
}

.deep-synthesis-failure-reason strong {
  display: block;
  margin-bottom: 6px;
  color: #fff0f4;
}

.deep-synthesis-failure-reason p {
  margin: 0;
  color: #f0ccd5;
  line-height: 1.42;
}

.deep-synthesis-failure-actions {
  display: flex;
  justify-content: center;
}

.conversation-workflow-alerts {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(63, 84, 109, 0.2);
  background: rgba(11, 19, 36, 0.2);
}

.conversation-runtime-alerts {
  max-width: 100%;
  min-width: 0;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(47, 85, 98, 0.2);
  background: rgba(10, 24, 28, 0.2);
  overflow: hidden;
}

.conversation-runtime-alerts:not(:has(.conversation-runtime-alert)) {
  display: none;
}

.conversation-runtime-alerts--overlay {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.conversation-runtime-alerts--overlay .conversation-runtime-alert {
  pointer-events: auto;
}

.conversation-runtime-alerts--persistent-flow {
  position: relative;
  z-index: 21;
}

.conversation-code-builder-status {
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid #365176;
  background: rgba(13, 24, 41, 0.93);
}

.conversation-code-builder-status--info {
  border-color: #34647a;
  background: rgba(12, 33, 46, 0.92);
}

.conversation-code-builder-status--success {
  border-color: #2e7364;
  background: rgba(18, 56, 43, 0.38);
}

.conversation-code-builder-status--warning {
  border-color: #7a6332;
  background: rgba(73, 53, 18, 0.36);
}

.conversation-code-builder-status--danger {
  border-color: #7b3b46;
  background: rgba(86, 25, 38, 0.34);
}

.conversation-workflow-status {
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid #44536f;
  background: rgba(18, 27, 43, 0.92);
}

.conversation-workflow-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.conversation-workflow-status-eyebrow {
  margin-bottom: 3px;
  color: #d1d5db;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conversation-workflow-status-title {
  color: var(--theme-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.conversation-workflow-status-review-link {
  flex: 0 0 auto;
}

.conversation-workflow-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.conversation-workflow-status-grid div {
  min-width: 0;
}

.conversation-workflow-status-grid dt {
  margin-bottom: 3px;
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conversation-workflow-status-grid dd {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.conversation-workflow-status-events {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.conversation-workflow-status-events-heading {
  margin-bottom: 8px;
  color: var(--theme-text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conversation-workflow-status-events-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conversation-workflow-status-event {
  display: grid;
  gap: 3px;
}

.conversation-workflow-status-event-message {
  color: var(--theme-text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.conversation-workflow-status-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--theme-text-muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.project-hil-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 16px 18px 0;
  padding: 18px 20px;
  border: 1px solid rgba(104, 181, 255, 0.48);
  border-left: 4px solid #6eb8ff;
  border-radius: 8px;
  background: rgba(8, 24, 45, 0.92);
  color: var(--theme-text);
}

.project-hil-callout--answered {
  border-color: rgba(90, 201, 151, 0.44);
  border-left-color: #5ac997;
}

.project-hil-callout__body {
  min-width: 0;
}

.project-hil-callout__heading,
.project-hil-request__header,
.project-hil-request__answer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-hil-callout__eyebrow,
.project-hil-request__eyebrow {
  margin: 0;
  color: #75bdff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-hil-callout__status,
.project-hil-request__status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(117, 189, 255, 0.42);
  border-radius: 999px;
  color: var(--theme-text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

.project-hil-callout h3 {
  margin: 7px 0 5px;
  font-size: 1.05rem;
}

.project-hil-callout p,
.project-hil-callout__resolution {
  margin: 0;
  color: var(--theme-text-secondary);
  line-height: 1.5;
}

.project-hil-callout__resolution {
  margin-top: 8px;
  color: #cfeedd;
}

.project-hil-callout__action {
  flex: 0 0 auto;
}

.project-hil-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.project-hil-page__toolbar {
  margin-bottom: 16px;
}

.project-hil-request {
  overflow: hidden;
  border: 1px solid rgba(104, 181, 255, 0.42);
  border-radius: 8px;
  background: rgba(7, 18, 34, 0.94);
  color: var(--theme-text);
}

.project-hil-request__header {
  padding: 24px 26px;
  border-bottom: 1px solid rgba(104, 181, 255, 0.2);
  background: rgba(13, 35, 61, 0.72);
}

.project-hil-request__header h1 {
  margin: 5px 0 0;
  font-size: 1.55rem;
}

.project-hil-request__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 18px 26px;
  border-bottom: 1px solid rgba(104, 181, 255, 0.16);
}

.project-hil-request__facts div {
  min-width: 0;
  padding-right: 18px;
}

.project-hil-request__facts dt,
.project-hil-response-form label {
  color: #82bfff;
  font-size: 0.76rem;
  font-weight: 750;
}

.project-hil-request__facts dd {
  overflow-wrap: anywhere;
  margin: 5px 0 0;
  color: var(--theme-text-secondary);
}

.project-hil-request__prompt,
.project-hil-request__answer,
.project-hil-request__closed,
.project-hil-response-form {
  padding: 24px 26px;
}

.project-hil-request__prompt h2,
.project-hil-request__answer h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.project-hil-request__prompt p,
.project-hil-request__answer p,
.project-hil-request__closed {
  margin: 0;
  color: var(--theme-text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-hil-response-form {
  border-top: 1px solid rgba(104, 181, 255, 0.16);
}

.project-hil-response-form__field {
  display: grid;
  gap: 8px;
}

.project-hil-response-form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid rgba(118, 178, 238, 0.48);
  border-radius: 6px;
  padding: 12px 14px;
  background: #091b31;
  color: var(--theme-text);
  font: inherit;
  line-height: 1.5;
}

.project-hil-response-form textarea:focus {
  border-color: #75bdff;
  outline: 2px solid rgba(117, 189, 255, 0.18);
  outline-offset: 1px;
}

.project-hil-response-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.project-hil-request__answer {
  border-top: 1px solid rgba(90, 201, 151, 0.22);
  background: rgba(25, 76, 58, 0.2);
}

.project-hil-request__answer-heading span {
  color: #a9d9c2;
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .project-hil-callout {
    align-items: stretch;
    flex-direction: column;
    margin: 12px 10px 0;
    padding: 16px;
  }

  .project-hil-callout__action {
    align-self: flex-start;
  }

  .project-hil-page {
    width: min(100% - 24px, 900px);
    padding-top: 20px;
  }

  .project-hil-request__header,
  .project-hil-request__answer-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-hil-request__facts {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-hil-request__facts div {
    padding-right: 0;
  }
}

.conversation-code-builder-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.conversation-code-builder-status-eyebrow {
  margin-bottom: 3px;
  color: #b9d8e7;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conversation-code-builder-status-title {
  color: var(--theme-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.conversation-code-builder-status-link {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(148, 190, 221, 0.32);
  border-radius: 8px;
  color: var(--theme-text);
  font-size: 0.78rem;
  text-decoration: none;
  background: rgb(var(--theme-surface-rgb) / 36.0%);
}

.conversation-code-builder-status-link:hover {
  border-color: rgba(191, 219, 254, 0.56);
  color: var(--theme-text);
}

.conversation-code-builder-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.conversation-code-builder-status-grid div {
  min-width: 0;
}

.conversation-code-builder-status-grid dt {
  margin-bottom: 3px;
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conversation-code-builder-status-grid dd {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.conversation-code-builder-status-grid code {
  color: var(--theme-primary-faint);
  font-size: 0.78rem;
}

.conversation-code-builder-status-failure {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.22);
}

.conversation-code-builder-status-failure strong {
  color: #fecdd3;
  font-size: 0.78rem;
}

.conversation-code-builder-status-failure span {
  color: #ffe4e6;
  line-height: 1.38;
}

.conversation-runtime-alerts-header {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ccefe2;
  margin-bottom: 10px;
}

.conversation-runtime-alerts-list {
  display: grid;
  gap: 8px;
}

.conversation-runtime-alert {
  max-width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(46, 70, 87, 0.2);
  background: rgba(16, 32, 49, 0.2);
  overflow: hidden;
}

.conversation-runtime-alert.dismissible-banner,
.conversation-workflow-alert.dismissible-banner {
  padding-right: 48px;
}

.conversation-runtime-alert .dismissible-banner-close,
.conversation-workflow-alert .dismissible-banner-close {
  top: 50%;
  right: 14px;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgb(var(--theme-surface-rgb) / 32.0%);
  --dismissible-banner-close-transform: translateY(-50%);
  --dismissible-banner-close-hover-transform: translateY(calc(-50% - 1px));
}

.conversation-runtime-alert .dismissible-banner-content,
.conversation-workflow-alert .dismissible-banner-content {
  min-width: 0;
  width: 100%;
}

.conversation-runtime-alert-layout,
.conversation-workflow-alert-layout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 100%;
  min-width: 0;
}

.conversation-runtime-alert--active {
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.12);
}

.conversation-runtime-alert--success {
  border-color: rgba(70, 170, 143, 0.2);
  background: rgba(21, 77, 61, 0.12);
}

.conversation-runtime-alert--warning {
  border-color: rgba(122, 99, 50, 0.2);
  background: rgba(73, 53, 18, 0.12);
}

.conversation-runtime-alert--danger {
  border-color: rgba(123, 59, 70, 0.2);
  background: rgba(86, 25, 38, 0.12);
}

.conversation-runtime-alert--info {
  border-color: rgba(58, 85, 117, 0.2);
  background: rgba(21, 37, 63, 0.12);
}

.conversation-runtime-alert-icon {
  flex: 0 0 auto;
  line-height: 1;
  margin-top: 2px;
  color: var(--theme-primary-faint);
}

.conversation-runtime-alert-body {
  flex: 1 1 auto;
  max-width: 100%;
  min-width: 0;
}

.conversation-runtime-alert-summary {
  color: var(--theme-text);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.conversation-runtime-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--theme-text-muted);
}

.conversation-runtime-alert-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.conversation-runtime-alert-detail {
  margin-top: 5px;
  color: var(--theme-text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.conversation-workflow-alerts-header {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text-secondary);
  margin-bottom: 10px;
}

.conversation-workflow-alerts-list {
  display: grid;
  gap: 8px;
}

.conversation-workflow-alert {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(50, 70, 94, 0.2);
  background: rgba(20, 32, 54, 0.2);
}

.conversation-workflow-alert--warning {
  border-color: rgba(122, 99, 50, 0.2);
  background: rgba(73, 53, 18, 0.12);
}

.conversation-workflow-alert--error {
  border-color: rgba(123, 59, 70, 0.2);
  background: rgba(86, 25, 38, 0.12);
}

.conversation-workflow-alert-icon {
  flex: 0 0 auto;
  line-height: 1;
  margin-top: 2px;
}

.conversation-workflow-alert-body {
  min-width: 0;
}

.conversation-workflow-alert-summary {
  color: var(--theme-text);
  line-height: 1.35;
}

.conversation-workflow-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--theme-text-muted);
}

.conversation-research-page {
  width: 100%;
  display: grid;
  gap: 16px;
}

.conversation-research-page-header {
  display: block;
  padding-bottom: 0;
}

.conversation-research-sister-heading {
  margin-bottom: 0;
}

.conversation-research-section {
  display: grid;
  gap: 12px;
}

.conversation-research-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(122, 166, 218, 0.14);
  padding-bottom: 8px;
}

.conversation-research-section-heading h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0;
}

.conversation-research-section-heading span {
  color: var(--theme-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.conversation-research-section-note {
  margin: -2px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.conversation-research-budget-control {
  padding: 16px;
  border: 1px solid rgba(214, 168, 79, 0.48);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(214, 168, 79, 0.14), rgba(18, 27, 43, 0.5));
}

.conversation-research-budget-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
}

.conversation-research-budget-field {
  min-width: 0;
}

.conversation-research-budget-field .projects-modal-input {
  width: 100%;
  font-size: 1.25rem;
  font-weight: 700;
}

.conversation-research-budget-slider {
  margin-top: 12px;
}

.conversation-research-budget-summary {
  display: flex;
  flex-direction: column;
  min-width: 130px;
  padding-bottom: 4px;
}

.conversation-research-budget-summary strong {
  color: var(--theme-text);
  font-size: 1.65rem;
  line-height: 1;
}

.conversation-research-budget-summary span {
  margin-top: 5px;
  color: var(--theme-text-muted);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .conversation-research-budget-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.conversation-research-empty {
  margin: 0;
  color: #93a4c0;
  font-size: 0.9rem;
}

.conversation-research-card-list,
.conversation-research-admitted-chunk-list {
  display: grid;
  gap: 10px;
}

.conversation-research-evidence-card,
.conversation-research-admitted-chunk-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(214, 168, 79, 0.38);
  border-radius: 8px;
  background: rgba(18, 27, 43, 0.76);
}

.conversation-research-admitted-chunk-card {
  gap: 10px;
}

.conversation-research-brief-card {
  border-color: rgba(244, 212, 137, 0.42);
}

.conversation-research-claim-fit-gap-card {
  border-color: rgba(248, 113, 113, 0.4);
}

.conversation-research-card-topline,
.conversation-research-card-meta,
.conversation-research-card-actions,
.conversation-research-link-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.conversation-research-card-domain,
.conversation-research-chunk-index,
.conversation-research-card-status {
  color: #f4d489;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-research-card-status {
  color: #b9c8e8;
}

.conversation-research-evidence-card h3,
.conversation-research-admitted-chunk-card h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.conversation-research-evidence-card p,
.conversation-research-admitted-chunk-card p {
  margin: 0;
  color: #d6e0ee;
  line-height: 1.48;
}

.conversation-research-chunk-subtitle {
  color: var(--theme-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.conversation-research-chunk-paragraphs {
  display: grid;
  gap: 8px;
}

.conversation-research-brief-callout,
.conversation-research-brief-list {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(122, 166, 218, 0.18);
  border-radius: 8px;
  background: rgba(10, 16, 30, 0.46);
}

.conversation-research-brief-callout strong,
.conversation-research-brief-list > strong {
  color: #f4d489;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-research-brief-callout span {
  color: var(--theme-text);
  font-weight: 700;
}

.conversation-research-brief-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) 1fr;
  gap: 8px;
}

.conversation-research-brief-list span {
  color: var(--theme-text-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.conversation-research-brief-list em {
  color: var(--theme-text);
  font-style: normal;
  overflow-wrap: anywhere;
}

.conversation-research-card-meta {
  color: var(--theme-text-muted);
  font-size: 0.78rem;
}

.conversation-research-card-link,
.conversation-research-source-link {
  color: #a8c8ff;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.conversation-research-card-link:hover,
.conversation-research-card-link:focus-visible,
.conversation-research-source-link:hover,
.conversation-research-source-link:focus-visible {
  color: var(--theme-primary-faint);
  outline: none;
  text-decoration: underline;
}

.conversation-research-packet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.conversation-research-packet-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(122, 166, 218, 0.18);
  border-radius: 8px;
  background: rgba(15, 27, 48, 0.58);
}

.conversation-research-packet-grid strong {
  color: var(--theme-text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.conversation-research-packet-grid span {
  color: var(--theme-text);
  font-weight: 800;
}

.conversation-research-subsection {
  display: grid;
  gap: 8px;
}

.conversation-research-subsection h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.92rem;
}

.conversation-research-details {
  padding: 10px 0 0;
  border-top: 1px solid rgba(122, 166, 218, 0.14);
}

.conversation-research-details summary {
  color: #dce8fb;
  cursor: pointer;
  font-weight: 800;
}

.conversation-research-diagnostic-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.conversation-research-diagnostic-list div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(122, 166, 218, 0.14);
  border-radius: 8px;
  background: rgba(10, 16, 30, 0.54);
}

.conversation-research-diagnostic-list strong {
  color: var(--theme-text);
}

.conversation-research-diagnostic-list span {
  color: var(--theme-text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .conversation-research-brief-list div {
    grid-template-columns: 1fr;
  }

  .home-automation-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-automation-banner-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .conversation-heading-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .conversation-heading-row--with-research {
    display: flex;
  }

  .conversation-research-divider {
    display: none;
  }

  .conversation-research-page-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.home-chat-file-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--theme-text-secondary);
  font-size: 0.82rem;
  padding-right: 10px;
}

.home-chat-project-select {
  max-width: 170px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-text);
}

.home-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.home-chat-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.home-chat-toggle-circle {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--theme-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-chat-toggle-circle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--theme-text);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.home-chat-toggle input:checked + .home-chat-toggle-circle::after { opacity: 1; }

.home-chat-mcp-controls {
  display: contents;
}

.home-chat-mcp-controls[hidden] {
  display: none !important;
}

.home-chat-mcp-controls.is-hidden {
  display: none;
}

.home-chat-elapsed {
  margin-left: auto;
  color: var(--theme-text-secondary);
  font-size: 0.85rem;
}

.home-chat-submit {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-text);
  font-size: 1rem;
  cursor: pointer;
}

.home-chat-submit:hover { background: var(--theme-border); }

.home-chat-submit-play {
  font-size: 0.92rem;
}

.home-chat-submit-stop {
  font-size: 0.86rem;
  background: #3a1f2b;
  border-color: #5a2f40;
}

.home-chat-submit-stop:hover {
  background: #4a2937;
}

.home-chat-hidden-form {
  display: none;
}

.home-chat-queue-banner {
  display: none;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2d7f5f;
  background: rgba(18, 69, 48, 0.34);
}

.home-chat-queue-banner.is-active {
  display: grid;
}

.home-chat-queue-banner-title {
  color: #e8fff2;
  font-weight: 700;
}

.home-chat-queue-banner-copy {
  color: #d4f7e3;
  line-height: 1.4;
}

.home-chat-queue-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-chat-queue-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(171, 240, 205, 0.22);
  background: rgba(8, 27, 19, 0.4);
  color: #dcffed;
  font-size: 0.82rem;
}

.home-chat-loading {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--theme-text-secondary);
  font-size: 0.9rem;
}

.home-chat-bar.is-loading .home-chat-loading { display: inline-flex; }

.home-chat-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--theme-surface-muted);
  border-top-color: var(--theme-primary-soft);
  animation: chat-spin 0.8s linear infinite;
}

@keyframes chat-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.home-memory-recall {
  margin: 14px 0 0;
  padding: 20px;
  border-radius: 12px;
  background: var(--theme-surface-lift);
  border: 1px solid var(--theme-border);
}

.home-memory-recall h4 {
  margin: 0 0 8px;
  color: var(--theme-text);
}

.home-conversation-memory {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 82.0%);
  border: 1px solid var(--theme-border);
}

.home-conversation-memory h4 {
  margin: 0 0 8px;
  text-align: left;
}

.home-memory-card-header {
  margin-bottom: 10px;
}

.home-memory-card-header h4 {
  margin-bottom: 4px;
}

.home-memory-card-header p {
  color: var(--theme-text-secondary);
  font-size: 0.92rem;
}

.home-conversation-memory p {
  margin: 0 0 8px;
}

.home-memory-tabs {
  display: block;
}

.home-memory-tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-memory-tab-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  margin: 0 8px 12px 0;
  padding: 10px 16px;
  border: 1px solid var(--color-border-control);
  border-radius: 999px;
  color: var(--theme-text-secondary);
  background: var(--color-surface-control);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.home-memory-tab-label:hover {
  border-color: color-mix(in srgb, var(--theme-primary-soft) 72.0%, transparent);
  color: var(--theme-text);
}

.home-memory-tab-input:checked + .home-memory-tab-label {
  color: var(--theme-text);
  background: linear-gradient(135deg, rgb(var(--theme-primary-rgb) / 68.0%), rgb(var(--theme-accent-rgb) / 34%));
  border-color: color-mix(in srgb, var(--theme-primary-soft) 82.0%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-primary-pale) 18.0%, transparent), 0 12px 28px rgb(var(--theme-surface-rgb) / 32.0%);
}

.home-memory-panels {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 12px;
}

.home-memory-panel {
  display: none;
}

.home-memory-tab-input--conversation:checked ~ .home-memory-panels .home-memory-panel--conversation,
.home-memory-tab-input--project:checked ~ .home-memory-panels .home-memory-panel--project,
.home-memory-tab-input--user:checked ~ .home-memory-panels .home-memory-panel--user {
  display: block;
}

.home-memory-panel h5 {
  margin: 0 0 8px;
  color: var(--theme-text);
  font-size: 1rem;
}

.home-memory-empty {
  color: var(--theme-text-muted);
}

.home-utility-queue {
  display: grid;
  gap: 12px;
}

.home-utility-queue-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.home-utility-queue-eyebrow {
  margin: 0 0 4px;
  color: var(--theme-primary-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-utility-queue-counts,
.home-utility-queue-actions,
.home-utility-queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-utility-queue-counts span,
.home-utility-queue-meta span,
.home-utility-queue-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--theme-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.home-utility-queue-counts span {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 26.0%, transparent);
  color: var(--theme-primary-faint);
}

.home-utility-queue-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-utility-queue-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgb(var(--theme-surface-rgb) / 52.0%);
}

.home-utility-queue-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.home-utility-queue-item h5 {
  margin: 0 0 4px;
  color: var(--theme-text);
  font-size: 0.98rem;
}

.home-utility-queue-summary,
.home-utility-queue-relevance {
  margin: 0;
  color: var(--theme-text-secondary);
}

.home-utility-queue-relevance {
  color: var(--theme-primary-pale);
  font-size: 0.88rem;
}

.home-utility-queue-status {
  white-space: nowrap;
}

.home-utility-queue-status.is-ready {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(21, 128, 61, 0.2);
}

.home-utility-queue-meta a {
  color: var(--theme-primary-pale);
}

.home-utility-queue-details {
  color: var(--theme-text-secondary);
}

.home-utility-queue-details summary {
  cursor: pointer;
  color: var(--theme-primary-pale);
  font-weight: 700;
}

.home-utility-queue-details pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 18.0%, transparent);
  color: var(--theme-primary-faint);
  font-size: 0.82rem;
}

.home-conversation-memory-section {
  margin-top: 6px;
}

.conversation-context-queue-page {
  display: grid;
  gap: 18px;
}

.conversation-context-queue-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
}

.conversation-context-queue-filter-form label {
  display: grid;
  gap: 6px;
  color: var(--theme-text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
}

.conversation-context-queue-filter-actions,
.conversation-context-queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.conversation-context-queue-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  color: var(--theme-text-secondary);
  font-size: 0.82rem;
}

.conversation-context-queue-pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 18.0%, transparent);
  color: var(--theme-primary-faint);
  font-size: 0.84rem;
}

.conversation-context-queue-items {
  display: grid;
  gap: 12px;
}

.conversation-context-queue-section-header h2 {
  margin: 0;
}

.conversation-context-queue-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conversation-context-queue-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
}

.conversation-context-queue-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.conversation-context-queue-item-header h3,
.conversation-context-queue-item-header p {
  margin: 0;
}

.conversation-context-queue-item-header p {
  margin-top: 4px;
  color: var(--theme-text-secondary);
}

.conversation-context-queue-definition-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 0;
}

.conversation-context-queue-definition-list div {
  display: grid;
  gap: 4px;
}

.conversation-context-queue-definition-list dt {
  color: var(--theme-primary-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conversation-context-queue-definition-list dd {
  margin: 0;
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.conversation-context-queue-evidence {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 22.0%, transparent);
  border-radius: 8px;
  background: rgba(30, 64, 175, 0.16);
}

.conversation-context-queue-evidence p {
  margin: 0;
  color: var(--theme-primary-faint);
}

.conversation-context-queue-source-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.conversation-context-queue-source-list a {
  color: var(--theme-primary-pale);
  overflow-wrap: anywhere;
}

.home-conversation-memory-section strong {
  display: inline-block;
  margin-bottom: 4px;
}

.home-conversation-memory-section ul {
  margin: 0;
  padding-left: 20px;
}

.home-conversation-memory-project {
  margin-bottom: 8px;
  color: var(--theme-primary-soft);
  font-size: 0.9rem;
}

.home-user-memory-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-user-memory-list li {
  display: grid;
  grid-template-columns: minmax(72px, 120px) 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgb(var(--theme-surface-rgb) / 52.0%);
}

.home-user-memory-kind {
  color: var(--theme-primary-soft);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-user-memory-text {
  color: var(--theme-text);
}

.home-memory-manual-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.home-memory-manual-form h5 {
  margin: 0 0 8px;
  color: var(--theme-text);
  font-size: 1rem;
}

.home-memory-form {
  display: grid;
  gap: 8px;
}

.home-memory-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.home-memory-form-row--entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-memory-form-select,
.home-memory-form-input {
  border: 1px solid var(--color-border-control);
  border-radius: 8px;
  background: var(--color-surface-control);
  color: var(--theme-text);
  font: inherit;
}

.home-memory-form-select {
  min-height: 38px;
  padding: 0 10px;
}

.home-memory-form-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
}

.home-memory-form-input::placeholder {
  color: var(--theme-text-muted);
}

.home-memory-form-submit {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 72.0%, transparent);
  border-radius: 8px;
  background: rgb(var(--theme-primary-rgb) / 72.0%);
  color: var(--theme-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.home-memory-form-submit:hover {
  background: rgb(var(--theme-primary-rgb) / 92.0%);
}

@media (max-width: 720px) {
  .home-memory-form-row--entry {
    grid-template-columns: 1fr;
  }
}

.conversation-file-grid {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.conversation-file-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 88px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--theme-border);
  background: rgba(30, 42, 68, 0.85);
  text-decoration: none;
}

.conversation-file-card:hover {
  background: rgba(35, 52, 86, 0.92);
  text-decoration: none;
}

.conversation-file-name {
  color: var(--theme-text);
  font-size: 0.85rem;
  word-break: break-word;
}

.conversation-file-version {
  margin-top: 8px;
  color: #d7b45a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.conversation-file-meta {
  margin-top: 8px;
  color: var(--theme-primary-soft);
  font-size: 1rem;
}

@media (max-width: 980px) {
  .conversation-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Footer
========================================================= */
.app-footer {
  background: var(--app-chrome-background);
  text-align: center;
  margin-top: auto; /* stick footer to bottom */
}

.footer-bar {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-chrome-background);
  color: var(--theme-text);
  font-size: 0.9rem;
  border-top: 1px solid var(--theme-surface-muted);
}

.footer-bar--with-project-actions {
  min-height: 62px;
  height: auto;
  justify-content: flex-start;
  gap: 16px;
  padding: 10px 18px;
  flex-wrap: wrap;
}

.footer-bar-copy {
  margin-left: auto;
}

.footer-project-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-project-actions form {
  margin: 0;
}


/* Sidebar conversation row and actions (merged) */
.sidebar-conversations {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.sidebar-project-tree {
  gap: 0;
}

.sidebar-conversation-item {
  position: relative;
  z-index: auto;
}

.sidebar-conversation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 0;
  position: relative;
  overflow: visible;
}

/* Conversation link (keep your new look, but improve click feel) */
.conversations-sidebar .sidebar-conversation-link {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;          /* match old rounding */
  background: #142036;
  color: var(--theme-text-muted);
  font-size: 0.84rem !important;
  font-weight: 500;
  border: 1px solid var(--theme-surface-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.sidebar-conversation-link--with-ticker {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.sidebar-conversation-link--with-ticker .conversation-ticker--sidebar {
  flex: 0 0 auto;
  max-width: 46%;
  color: #90a6c5;
  font-size: 0.76rem;
}

.sidebar-conversation-link--with-ticker .js-conversation-title-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-conversation-link.is-active .conversation-ticker--sidebar {
  color: #d5e4f7;
}

.sidebar-conversation-link:hover,
.sidebar-conversation-link:focus {
  background: var(--theme-surface-lift);
  color: #c5d4e8;
  border-color: var(--theme-border);         /* old button border tone on hover */
  outline: none;
}

.sidebar-conversation-link.is-active {
  background: #2f5d9b;
  border-color: #4b7ab8;
  color: var(--theme-text);
  padding: 8px 10px;
  font-size: 0.84rem !important;
  font-weight: 600;
  font-style: italic;
  box-shadow: 0 0 0 1px rgba(113, 164, 222, 0.28), 0 8px 16px rgba(10, 24, 46, 0.2);
}

.sidebar-project-category-badge {
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 116px;
  padding: 5px 8px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: #142036;
  color: var(--theme-text);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-project-category-badge--coder-forge {
  background: #142036;
}

.sidebar-project-category-badge--photography {
  background: #000;
  font-family: Didot, "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  font-weight: 600;
}

.sidebar-conversation-link--campaign-owned {
  position: relative;
  isolation: isolate;
  border-color: rgba(86, 202, 234, 0.24);
  box-shadow:
    0 0 0 1px rgb(var(--theme-accent-rgb) / 5.0%),
    0 0 14px rgba(79, 208, 255, 0.08);
}

.sidebar-conversation-link--campaign-owned::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg,
    rgba(106, 232, 255, 0.5) 0%,
    rgba(58, 150, 255, 0.34) 32%,
    rgb(var(--theme-accent-rgb) / 28.0%) 68%,
    rgb(var(--theme-accent-rgb) / 44.0%) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.95;
}

.sidebar-conversation-link.sidebar-conversation-link--campaign-owned:hover,
.sidebar-conversation-link.sidebar-conversation-link--campaign-owned:focus {
  color: #dff6ff;
  box-shadow:
    0 0 0 1px rgb(var(--theme-accent-rgb) / 8.0%),
    0 0 18px rgba(79, 208, 255, 0.12);
}

.sidebar-conversation-link.is-active.sidebar-conversation-link--campaign-owned {
  box-shadow:
    0 0 0 1px rgb(var(--theme-accent-rgb) / 10.0%),
    0 0 22px rgba(79, 208, 255, 0.16),
    0 8px 16px rgba(10, 24, 46, 0.2);
}

.sidebar-conversation-link--attention {
  position: relative;
  isolation: isolate;
}

.sidebar-conversation-link.sidebar-conversation-link--attention-green,
.sidebar-conversation-link.is-active.sidebar-conversation-link--attention-green {
  border-color: rgba(74, 222, 128, 0.46);
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.15);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.14),
    0 0 14px rgba(22, 163, 74, 0.16);
}

.sidebar-conversation-link.sidebar-conversation-link--attention-yellow,
.sidebar-conversation-link.is-active.sidebar-conversation-link--attention-yellow {
  border-color: rgba(251, 191, 36, 0.52);
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.17);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.16),
    0 0 14px rgba(245, 158, 11, 0.2);
}

.sidebar-conversation-link.sidebar-conversation-link--attention-red,
.sidebar-conversation-link.is-active.sidebar-conversation-link--attention-red {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fee2e2;
  background: rgba(185, 28, 28, 0.2);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.2),
    0 0 16px rgba(220, 38, 38, 0.3);
}

.sidebar-conversation-link.sidebar-conversation-link--attention-green:hover,
.sidebar-conversation-link.sidebar-conversation-link--attention-green:focus {
  border-color: rgba(74, 222, 128, 0.56);
  color: #dcfce7;
}

.sidebar-conversation-link.sidebar-conversation-link--attention-yellow:hover,
.sidebar-conversation-link.sidebar-conversation-link--attention-yellow:focus {
  border-color: rgba(251, 191, 36, 0.62);
  color: #fef3c7;
}

.sidebar-conversation-link.sidebar-conversation-link--attention-red:hover,
.sidebar-conversation-link.sidebar-conversation-link--attention-red:focus {
  border-color: rgba(248, 113, 113, 0.7);
  color: #fee2e2;
}

.sidebar-conversation-link--attention-border-only::after {
  content: none;
}

.sidebar-conversation-link--attention-gentle-pulse {
  animation: navbar-chat-green-pulse 4.4s ease-in-out infinite;
}

.sidebar-conversation-link--attention-gradual-blink {
  animation: navbar-chat-yellow-blink 2.9s ease-in-out infinite;
}

.sidebar-conversation-link--attention-urgent-blink {
  animation: navbar-chat-red-alert 1.4s ease-in-out infinite;
}

/* ---- Actions container ---- */
/* Default: inline actions appear on hover to the right */

.sidebar-conversation-actions {
  opacity: 0;
  display: flex;
  flex-direction: row;
  gap: 6px;
  margin-left: 4px;
  pointer-events: none;
  position: relative;
  z-index: 70;
  transition: opacity 0.15s ease;
}

.sidebar-conversation-item:hover .sidebar-conversation-actions,
.sidebar-conversation-item:focus-within .sidebar-conversation-actions {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

/* Optional: if you have forms in sidebar, keep them tight */
.sidebar-button-form { margin: 0; }

/* ---- Buttons (Rename/Delete) ---- */
/* Apply the old button styling but keep your new class names */
.sidebar-conversation-delete,
.sidebar-conversation-rename {
  display: inline-flex;          /* better alignment than block */
  align-items: center;
  justify-content: center;

  border-radius: 10px;           /* old */
  border: 1px solid var(--theme-border);     /* old */
  background: var(--theme-surface-lift);           /* old */
  color: var(--theme-text);

  padding: 6px 10px;             /* small-button feel */
  font-size: 0.85rem;
  line-height: 1;

  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
  user-select: none;
}

.sidebar-conversation-delete:hover,
.sidebar-conversation-rename:hover {
  background: var(--theme-border);
}

.sidebar-conversation-delete:active,
.sidebar-conversation-rename:active {
  transform: translateY(1px);
}

/* ---- Popover mode (optional) ---- */
/* If you add class="sidebar-conversation-actions popover" in your markup,
   this overrides inline display and becomes a floating menu. */
.sidebar-conversation-actions.popover {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) scale(0.98);

  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-muted);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;

  display: grid;                 /* in popover, stack buttons */
  gap: 8px;
  min-width: 160px;
  margin-left: 0;                /* override inline spacing */
}

/* Popover becomes visible on hover/focus */
.sidebar-conversation-item:hover .sidebar-conversation-actions.popover,
.sidebar-conversation-item:focus-within .sidebar-conversation-actions.popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

/* In popover mode, make buttons full-width like old sidebar buttons */
.sidebar-conversation-actions.popover .sidebar-conversation-delete,
.sidebar-conversation-actions.popover .sidebar-conversation-rename {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
}

/* Message Delta renders white space fine */
.message-delta {
  white-space: pre-wrap;
}

.message-attachments {
  margin-top: 4px;
  display: grid;
  gap: 8px;
}

.message-attachment-item a {
  font-size: 0.85rem;
}

.message-bubble--final-deliverable {
  width: min(520px, 100%);
  padding: 0;
  overflow: visible;
  border-color: rgba(214, 171, 72, 0.34);
  background: linear-gradient(145deg, rgba(31, 42, 68, 0.96), rgba(13, 21, 39, 0.98));
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.3), 0 0 24px rgba(214, 171, 72, 0.08);
}

.conversation-final-deliverable {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 24px 0;
}

.conversation-final-deliverable__divider {
  display: grid;
  grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
  gap: 14px;
  align-items: center;
  width: min(760px, 100%);
  margin-bottom: 10px;
}

.conversation-final-deliverable__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 171, 72, 0.52));
}

.conversation-final-deliverable__rule:last-child {
  background: linear-gradient(90deg, rgba(214, 171, 72, 0.52), transparent);
}

.conversation-final-deliverable__role {
  justify-content: center;
  max-width: 100%;
  margin: 0;
  color: rgba(239, 204, 118, 0.84);
  text-align: center;
}

.project-final-deliverable-attachment {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 17px 18px;
}

.project-final-deliverable-attachment__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 62px;
  border: 1px solid rgba(239, 204, 118, 0.54);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(246, 218, 145, 0.2), rgba(143, 103, 27, 0.08));
  box-shadow: inset 0 0 18px rgba(255, 226, 154, 0.08);
}

.project-final-deliverable-attachment__icon span {
  width: 23px;
  height: 29px;
  border: 1px solid rgba(255, 236, 186, 0.9);
  border-radius: 3px;
  background:
    linear-gradient(rgba(255, 236, 186, 0.72), rgba(255, 236, 186, 0.72)) 5px 8px / 12px 1px no-repeat,
    linear-gradient(rgba(255, 236, 186, 0.62), rgba(255, 236, 186, 0.62)) 5px 13px / 12px 1px no-repeat,
    linear-gradient(rgba(255, 236, 186, 0.52), rgba(255, 236, 186, 0.52)) 5px 18px / 9px 1px no-repeat;
}

.project-final-deliverable-attachment__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.project-final-deliverable-attachment__eyebrow,
.projects-final-deliverable-summary__eyebrow,
.projects-final-deliverable-file-label {
  color: rgba(239, 204, 118, 0.78);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-final-deliverable-attachment__title {
  max-width: 100%;
  margin-top: 3px;
  color: #f8f3e7;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.project-final-deliverable-attachment__title:hover,
.project-final-deliverable-attachment__title:focus {
  color: #fff1c7;
  text-decoration: underline;
}

.project-final-deliverable-attachment__meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  color: rgb(var(--theme-text-rgb) / 62%);
  font-size: 0.74rem;
}

.project-final-deliverable-attachment__download {
  margin-top: 9px;
  color: rgba(239, 204, 118, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.project-final-deliverable-attachment__download:hover,
.project-final-deliverable-attachment__download:focus {
  color: #fff1c7;
  text-decoration: underline;
}

.message-image-attachment {
  margin: 0;
  max-width: 380px;
}

.message-image-open {
  display: block;
  width: min(100%, 360px);
}

.message-image-thumbnail,
.message-image-thumbnail-fallback {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgb(var(--theme-surface-rgb) / 45.0%);
}

.message-image-thumbnail-fallback {
  padding: 18px;
  color: var(--theme-text-secondary);
  font-size: 0.85rem;
}

.message-attachment-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--theme-text-muted);
  font-size: 0.78rem;
}

.message-attachment-name {
  color: var(--theme-text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-artifact-version {
  color: #d7b45a;
  font-weight: 700;
}

.message-file-attachment .file-artifact-version {
  margin-left: 8px;
  font-size: 0.78rem;
}

.sidebar-project-actions {
  position: relative;
  margin-left: 4px;
  z-index: 120;
}

.sidebar-project-actions[open] {
  z-index: 10000;
}

.sidebar-project-menu {
  list-style: none;
  opacity: 0;
  pointer-events: none;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  padding: 6px 10px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.sidebar-project-menu::-webkit-details-marker {
  display: none;
}

.sidebar-project-menu:hover,
.sidebar-project-menu:focus {
  background: var(--theme-border);
}

.sidebar-conversation-row:hover .sidebar-project-menu,
.sidebar-conversation-row:focus-within .sidebar-project-menu,
.sidebar-agent-item:hover .sidebar-project-menu,
.sidebar-agent-item:focus-within .sidebar-project-menu,
.sidebar-project-actions[open] .sidebar-project-menu {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-project-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-muted);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10001;
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.sidebar-project-actions[open] .sidebar-project-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* In the right-side agent list, center menus on the hamburger trigger (overlay style). */
.sidebar-agent-actions .sidebar-project-popover {
  top: 50%;
  right: calc(100% + 8px);
  bottom: auto;
  transform: translateY(-50%) scale(0.98);
}

.sidebar-project-actions[open].sidebar-agent-actions .sidebar-project-popover {
  transform: translateY(-50%) scale(1);
}

.sidebar-project-popover .sidebar-conversation-delete,
.sidebar-project-popover .sidebar-conversation-rename {
  width: 100%;
}

/* Let the action-bar conversation drawer grow to fit long conversation names. */
.dashboard-conversations-panel {
  --dashboard-conversations-panel-max-width: min(760px, calc(100vw - 130px));
  width: fit-content;
  min-width: min(390px, var(--dashboard-conversations-panel-max-width));
  max-width: var(--dashboard-conversations-panel-max-width);
  overflow: visible;
  z-index: 1300;
}

body.action-bar-collapsed .dashboard-conversations-panel {
  --dashboard-conversations-panel-max-width: min(760px, calc(100vw - 64px));
  width: fit-content;
  min-width: min(390px, var(--dashboard-conversations-panel-max-width));
  max-width: var(--dashboard-conversations-panel-max-width);
}

.dashboard-conversations-panel > .conversations-sidebar,
.dashboard-conversations-panel .sidebar-conversations,
.dashboard-conversations-panel .sidebar-conversation-row {
  width: max-content;
  min-width: 100%;
  max-width: var(--dashboard-conversations-panel-max-width);
  overflow: visible;
}

.dashboard-conversations-panel .sidebar-conversation-link {
  flex: 0 1 auto;
  width: max-content;
  max-width: calc(var(--dashboard-conversations-panel-max-width) - 72px);
}

.dashboard-conversations-panel .sidebar-conversation-link--with-ticker .js-conversation-title-label {
  flex: 0 1 auto;
}

.dashboard-conversations-panel .sidebar-conversation-item:has(.sidebar-project-actions[open]),
.dashboard-conversations-panel .sidebar-project-actions[open] {
  z-index: 1301;
}

.dashboard-conversations-panel .sidebar-project-actions[open] .sidebar-project-popover {
  z-index: 1302;
}

/* Match conversation drawer behavior for project and folder action menus. */
.projects-action-panel {
  overflow: visible;
  z-index: 1300;
}

.projects-action-panel > .conversations-sidebar {
  overflow: visible;
}

.projects-action-panel .sidebar-project-item:has(.sidebar-project-actions[open]),
.projects-action-panel .sidebar-project-folder-item:has(.sidebar-folder-actions[open]),
.projects-action-panel .sidebar-sidebar-folder-item:has(.sidebar-folder-actions[open]),
.projects-action-panel .sidebar-scope-tree-node:has(.sidebar-project-actions[open]),
.projects-action-panel .sidebar-scope-tree-node:has(.sidebar-folder-actions[open]) {
  z-index: 1301;
}

.projects-action-panel .sidebar-project-actions[open],
.projects-action-panel .sidebar-folder-actions[open] {
  z-index: 1302;
}

.projects-action-panel .sidebar-project-actions[open] .sidebar-project-popover,
.projects-action-panel .sidebar-folder-actions[open] .sidebar-folder-popover {
  z-index: 1303;
}

.sidebar-folder-create-row {
  margin: 10px 0 9px;
}

.sidebar-create-actions {
  margin: 10px 0 9px;
  display: grid;
  gap: 8px;
}

.sidebar-folder-create-button {
  width: 100%;
  justify-content: center;
}

.task-row-actions {
  position: relative;
  display: inline-block;
  z-index: 120;
}

.task-row-actions[open] {
  z-index: 5000;
}

.task-row-menu {
  position: relative;
  z-index: 1;
  list-style: none;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  padding: 6px 10px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.task-row-menu::-webkit-details-marker {
  display: none;
}

.task-row-menu:hover,
.task-row-menu:focus {
  background: var(--theme-border);
}

.task-row-popover {
  position: absolute;
  right: 0;
  top: auto;
  bottom: calc(100% + 6px);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-muted);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2;
  display: grid;
  gap: 8px;
  min-width: 140px;
}

.task-row-actions[open] .task-row-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.task-row-action-link {
  width: 100%;
  margin: 0;
  display: inline-flex;
  justify-content: center;
}

.task-row-action-form {
  margin: 0;
}

.sidebar-project-folders {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 0 0 0 16px;
  display: grid;
  gap: 8px;
  overflow: visible;
}

.sidebar-project-item > .sidebar-conversation-row {
  gap: 8px;
}

.sidebar-project-tree > .sidebar-project-item + .sidebar-project-item > .sidebar-conversation-row,
.sidebar-project-group-projects > .sidebar-project-item + .sidebar-project-item > .sidebar-conversation-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.sidebar-project-tree > .sidebar-sidebar-folder-item + .sidebar-sidebar-folder-item > .sidebar-sidebar-folder-row,
.sidebar-project-tree > .sidebar-sidebar-folder-item + .sidebar-project-item > .sidebar-conversation-row,
.sidebar-project-tree > .sidebar-project-item + .sidebar-sidebar-folder-item > .sidebar-sidebar-folder-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.sidebar-scope-tree-marker {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(112, 158, 218, 0.32);
  color: var(--theme-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
}

.sidebar-scope-tree-marker--folder {
  background: rgba(45, 121, 94, 0.72);
  border-color: rgba(110, 232, 165, 0.46);
}

.sidebar-scope-tree-marker--campaign {
  background: rgba(38, 101, 153, 0.72);
  border-color: rgba(112, 186, 255, 0.48);
}

.sidebar-scope-tree-marker--project {
  background: rgba(123, 90, 42, 0.72);
  border-color: rgba(246, 196, 92, 0.48);
}

.sidebar-scope-tree-marker--conversation {
  background: rgba(83, 64, 157, 0.72);
  border-color: rgba(184, 151, 255, 0.5);
}

.sidebar-sidebar-folder-item {
  position: relative;
}

.sidebar-sidebar-folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.sidebar-sidebar-folder-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sidebar-sidebar-folder-collapse-toggle,
.sidebar-sidebar-folder-collapse-spacer {
  width: 12px;
  min-width: 12px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-sidebar-folder-collapse-spacer {
  width: 12px;
  min-width: 12px;
}

.sidebar-sidebar-folder-collapse-toggle {
  cursor: pointer;
  color: var(--theme-text-secondary);
  user-select: none;
}

.sidebar-sidebar-folder-collapse-toggle::before {
  content: "▾";
  font-size: 0.95rem;
  line-height: 1;
}

.sidebar-sidebar-folder-toggle-checkbox:not(:checked) ~ .sidebar-sidebar-folder-row .sidebar-sidebar-folder-collapse-toggle::before {
  content: "▸";
}

.sidebar-sidebar-folder-name {
  flex: 1 1 auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: #142033;
  border: 1px solid #263a58;
  color: #8ea4c5;
  font-weight: 600;
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-sidebar-folder-name--toggle {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.sidebar-sidebar-folder-name--link {
  text-decoration: none;
}

.sidebar-sidebar-folder-name--link:hover,
.sidebar-sidebar-folder-name--link:focus-visible,
.sidebar-sidebar-folder-name--toggle:hover,
.sidebar-sidebar-folder-name--toggle:focus-visible {
  background: #1a2940;
  border-color: #32506f;
  color: #c3d4eb;
}

.sidebar-project-group-projects {
  list-style: none;
  margin: 10px 0 0 0;
  padding: 0 0 0 16px;
  display: grid;
  gap: 8px;
}

.sidebar-project-tree > .sidebar-sidebar-folder-item > .sidebar-project-group-projects {
  margin-top: 10px;
}

.sidebar-sidebar-folder-toggle-checkbox:not(:checked) ~ .sidebar-project-group-projects {
  display: none;
}

.sidebar-project-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sidebar-project-collapse-toggle,
.sidebar-project-collapse-spacer {
  width: 12px;
  min-width: 12px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-project-collapse-spacer {
  width: 12px;
  min-width: 12px;
}

.sidebar-project-collapse-toggle {
  cursor: pointer;
  color: var(--theme-text-secondary);
  user-select: none;
}

.sidebar-project-collapse-toggle::before {
  content: "▾";
  font-size: 0.95rem;
  line-height: 1;
}

.sidebar-project-toggle-checkbox:not(:checked) ~ .sidebar-conversation-row .sidebar-project-collapse-toggle::before {
  content: "▸";
}

.sidebar-project-toggle-checkbox:not(:checked) ~ .sidebar-project-folders {
  display: none;
}

.sidebar-project-toggle-checkbox:not(:checked) ~ .sidebar-project-group-projects {
  display: none;
}

.sidebar-project-toggle-checkbox:not(:checked) ~ .sidebar-project-conversations-list {
  display: none;
}

.sidebar-project-conversations-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 8px;
}

.sidebar-conversation-item--nested .sidebar-conversation-row--conversation {
  margin-left: 20px;
}

.sidebar-legacy-conversations {
  margin-bottom: 50px;
}

.sidebar-conversations-section-title {
  margin-top: 50px;
}

.sidebar-projects-section-title {
  margin-bottom: 10px;
}

.sidebar-scope-role-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(112, 158, 218, 0.28);
  color: var(--theme-text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  max-width: 74px;
  overflow: hidden;
  padding: 4px 6px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-scope-role-chip--mounted {
  border-color: rgba(128, 216, 170, 0.4);
  color: #c7f7dc;
}

.sidebar-project-folder-item {
  position: relative;
  z-index: auto;
}

.sidebar-project-folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: visible;
}

.sidebar-folder-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sidebar-folder-collapse-toggle,
.sidebar-folder-collapse-spacer {
  width: 16px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-folder-collapse-toggle {
  cursor: pointer;
  color: #a5b4c8;
  user-select: none;
}

.sidebar-folder-collapse-toggle::before {
  content: "▾";
  font-size: 0.85rem;
  line-height: 1;
}

.sidebar-folder-toggle-checkbox:not(:checked) ~ .sidebar-project-folder-row .sidebar-folder-collapse-toggle::before {
  content: "▸";
}

.sidebar-folder-toggle-checkbox:not(:checked) ~ .sidebar-project-subfolders {
  display: none;
}

.sidebar-project-folder-link {
  flex: 1 1 auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--theme-surface);
  border: 1px solid #22324f;
  color: #91a8c8;
  font-size: 0.84rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-project-folder-link:hover,
.sidebar-project-folder-link:focus {
  background: #16233a;
  color: #bfd0e7;
  border-color: var(--theme-border);
}

.sidebar-project-folder-link.is-active {
  background: #2f5d9b;
  border-color: #4b7ab8;
  color: var(--theme-text);
}

.sidebar-project-folder-delete {
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}

.sidebar-project-folder-delete:hover {
  background: var(--theme-border);
}

.sidebar-folder-actions {
  position: relative;
  margin-left: 4px;
  z-index: 140;
}

.sidebar-folder-actions[open] {
  z-index: 10000;
}

.sidebar-project-folder-item:has(.sidebar-folder-actions[open]) {
  z-index: 9000;
}

.sidebar-sidebar-folder-item:has(.sidebar-folder-actions[open]) {
  z-index: 9000;
}

.sidebar-folder-menu {
  list-style: none;
  opacity: 0;
  pointer-events: none;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  padding: 6px 10px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.sidebar-folder-menu::-webkit-details-marker {
  display: none;
}

.sidebar-folder-menu:hover,
.sidebar-folder-menu:focus {
  background: var(--theme-border);
}

.sidebar-project-folder-row:hover .sidebar-folder-menu,
.sidebar-project-folder-row:focus-within .sidebar-folder-menu,
.sidebar-sidebar-folder-row:hover .sidebar-folder-menu,
.sidebar-sidebar-folder-row:focus-within .sidebar-folder-menu,
.sidebar-folder-actions[open] .sidebar-folder-menu {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-folder-actions[open] .sidebar-folder-menu {
  position: relative;
  z-index: 320;
}

.sidebar-folder-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-muted);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10001;
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.sidebar-folder-actions[open] .sidebar-folder-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sidebar-folder-popover .sidebar-conversation-delete,
.sidebar-folder-popover .sidebar-conversation-rename {
  width: 100%;
}

.projects-page {
  min-height: 60vh;
  position: relative;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .projects-page {
  min-height: calc(100dvh - 56px);
}

.projects-main-card,
.projects-topology-shell {
  width: 100%;
  max-width: 1320px;
  box-sizing: border-box;
  margin: 24px auto;
  padding: 22px;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .projects-page > .card,
html.project-fullscreen-enabled body.project-fullscreen-capable .projects-main-card,
html.project-fullscreen-enabled body.project-fullscreen-capable .projects-topology-shell {
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  box-sizing: border-box;
  margin: 0 auto;
  max-width: none;
  min-height: calc(100dvh - 56px);
  padding: 0;
  width: 100%;
}

html.project-fullscreen-enabled body.project-fullscreen-capable .projects-index-content .projects-main-card {
  margin-top: 0;
}

.projects-main-card--landing {
  min-height: calc(100vh - 230px);
  display: flex;
  flex-direction: column;
}

.projects-main-card-wide {
  max-width: 1440px;
}

.projects-project-shell,
.projects-topology-shell {
  display: grid;
  gap: 18px;
  align-content: start;
  align-items: stretch;
}

.projects-index-content {
  padding-top: 8px;
}

.projects-index-content .projects-main-card {
  margin-top: 0;
}

.projects-main-card h2,
.projects-main-card h3 {
  margin: 0 0 10px;
  text-align: center;
}

.projects-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.projects-project-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0 0 18px;
}

.projects-project-heading-main {
  min-width: 0;
}

.projects-project-heading-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  margin: 0;
  color: var(--theme-text);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.18;
  text-align: left;
}

.projects-main-card .projects-project-heading-title {
  margin: 0;
  text-align: left;
}

.projects-project-heading-ticker {
  flex: 0 0 auto;
  color: var(--theme-text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projects-project-heading-separator {
  flex: 0 0 auto;
  color: rgb(var(--theme-text-rgb) / 80%);
}

.projects-project-heading-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.projects-project-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.projects-project-heading-row--with-research {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
}

.projects-project-heading-row--with-research .projects-project-heading-main {
  justify-self: start;
}

.projects-project-heading-row--with-research .projects-project-heading-actions {
  justify-self: end;
}

.projects-project-heading-actions .deep-synthesis-status-badge {
  margin: 0;
}

.projects-title-row h2 {
  margin: 0;
  text-align: left;
}

.projects-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.projects-title-action-form {
  margin: 0;
}

.projects-title-row--utility-actions {
  justify-content: flex-start;
  margin: -4px 0 14px;
}

.projects-runs-init-btn,
.projects-runs-tests-btn {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.projects-runs-init-btn {
  background: #06753c;
  border-color: #86c7ea;
  color: #e9fff7;
  box-shadow: none;
}

.projects-runs-init-btn:hover {
  background: #08884a;
}

.projects-runs-tests-btn {
  background: #9a8a43;
  border-color: #9ac4ef;
  color: #fffbe3;
  box-shadow: none;
}

.projects-runs-tests-btn:hover {
  background: #aa9950;
}

/* Project-scoped provider usage and observed-rate cost projection. */
.project-usage-eyebrow {
  margin: 0 0 5px;
  color: rgb(var(--theme-accent-rgb) / 78%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.project-usage-stat {
  display: flex;
  flex-direction: column;
  min-height: 144px;
  padding: 18px;
  border: 1px solid rgb(var(--theme-border-choice-rgb) / 62%);
  border-radius: 16px;
  background: linear-gradient(145deg, rgb(var(--theme-surface-rgb) / 98%), rgb(var(--theme-canvas-rgb) / 92%));
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.16);
}

.project-usage-stat--deepseek {
  border-color: rgba(84, 145, 255, 0.42);
  background: linear-gradient(145deg, rgba(31, 72, 145, 0.3), rgb(var(--theme-surface-rgb) / 96%));
}

.project-usage-stat--cost {
  border-color: rgba(239, 177, 69, 0.42);
  background: linear-gradient(145deg, rgba(112, 73, 12, 0.3), rgb(var(--theme-surface-rgb) / 96%));
}

.project-usage-stat__label {
  color: rgb(var(--theme-text-rgb) / 68%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-usage-stat strong {
  margin: auto 0 5px;
  color: rgb(var(--theme-text-rgb));
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.project-usage-stat > span:last-child {
  color: rgb(var(--theme-text-rgb) / 66%);
  font-size: 0.78rem;
}

.project-usage-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.project-usage-confidence {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid rgb(var(--theme-border-choice-rgb) / 52%);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58%);
  font-size: 0.82rem;
}

.project-usage-section-heading {
  margin-bottom: 12px;
}

.project-usage-table th,
.project-usage-table td {
  white-space: nowrap;
}

.project-usage-table code {
  font-size: 0.78rem;
}

.project-usage-role,
.project-usage-paid-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgb(var(--theme-border-choice-rgb) / 64%);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
}

.project-usage-paid-badge {
  margin-left: 5px;
  border-color: rgba(239, 177, 69, 0.5);
  color: #f4c96f;
}

.project-usage-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.project-usage-day {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid rgb(var(--theme-border-choice-rgb) / 52%);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58%);
}

.project-usage-day span,
.project-usage-day small {
  color: rgb(var(--theme-text-rgb) / 64%);
}

@media (max-width: 1050px) {
  .project-usage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .project-usage-summary {
    grid-template-columns: 1fr;
  }

  .project-usage-method {
    align-items: stretch;
    flex-direction: column;
  }

  .project-usage-confidence {
    min-width: 0;
  }
}

.projects-index-nav-row {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.projects-index-nav-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.projects-index-nav-row--outlined-pills {
  margin-bottom: 18px;
}

.projects-index-nav-row--outlined-pills .projects-index-nav-actions {
  gap: 18px;
}

.projects-index-nav-row--outlined-pills .navbar-button {
  min-height: 44px;
  padding: 9px 24px;
  border: 2px solid rgba(226, 235, 255, 0.88);
  border-radius: 999px;
  background: transparent;
  color: #eef5ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(191, 219, 254, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(2, 8, 23, 0.22);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.projects-index-nav-row--outlined-pills .navbar-button:hover,
.projects-index-nav-row--outlined-pills .navbar-button:focus {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.98);
  color: var(--theme-text);
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(191, 219, 254, 0.26),
    0 14px 28px rgba(2, 8, 23, 0.26);
  transform: translateY(-1px);
}

.organization-page {
  margin: 0 auto;
  width: 100%;
  max-width: 1040px;
  padding: 22px 18px 44px;
}

.organization-page-header h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: 0.01em;
}

.organization-page-header p {
  margin: 8px 0 0;
  color: var(--theme-text-secondary);
  opacity: 0.9;
}

.organization-summary-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--theme-text-secondary);
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
}

.organization-filter-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px auto;
  gap: 10px;
  align-items: end;
}

.organization-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.organization-filter-field label {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--theme-text-secondary);
}

.organization-filter-input,
.organization-filter-select {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-control);
  color: var(--theme-text);
  padding: 0 12px;
}

.organization-filter-actions {
  display: flex;
  gap: 8px;
}

.organization-filter-button,
.organization-filter-link {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--color-border-control);
  padding: 0 14px;
  color: var(--theme-text);
  text-decoration: none;
  background: var(--color-surface-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  cursor: pointer;
}

.organization-filter-button:hover,
.organization-filter-link:hover {
  border-color: var(--color-border-active);
  background: var(--color-surface-card-lifted);
}

.organization-campaign-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.organization-campaign-card {
  position: relative;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 21, 48, 0.92) 0%, rgba(7, 17, 39, 0.95) 100%);
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.35);
  overflow: hidden;
}

.organization-campaign-card--campaign {
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(9, 21, 48, 0.94) 0%, rgba(7, 17, 39, 0.97) 100%) padding-box,
    linear-gradient(135deg,
      rgba(106, 232, 255, 0.5) 0%,
      rgba(58, 150, 255, 0.34) 32%,
      rgb(var(--theme-accent-rgb) / 28.0%) 68%,
      rgb(var(--theme-accent-rgb) / 44.0%) 100%) border-box;
  box-shadow:
    0 16px 36px rgba(2, 8, 22, 0.38),
    0 0 0 1px rgb(var(--theme-accent-rgb) / 7.0%),
    0 0 24px rgba(68, 190, 255, 0.08);
}

.organization-campaign-card.is-active-campaign {
  border-color: rgba(127, 196, 255, 0.85);
  box-shadow: 0 16px 36px rgba(20, 59, 111, 0.4);
}

.organization-campaign-card--campaign.is-active-campaign {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(10, 24, 54, 0.97) 0%, rgba(7, 18, 41, 0.99) 100%) padding-box,
    linear-gradient(135deg,
      rgba(138, 243, 255, 0.76) 0%,
      rgba(84, 183, 255, 0.54) 35%,
      rgba(87, 255, 207, 0.46) 72%,
      rgba(170, 255, 227, 0.62) 100%) border-box;
  box-shadow:
    0 18px 40px rgba(11, 35, 65, 0.42),
    0 0 0 1px rgb(var(--theme-accent-rgb) / 10.0%),
    0 0 32px rgba(79, 208, 255, 0.16);
}

.organization-campaign-header {
  width: 100%;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 182px 18px 20px;
  cursor: pointer;
}

.organization-campaign-header:hover,
.organization-campaign-header:focus-visible {
  background: rgba(95, 161, 248, 0.08);
  outline: none;
}

.organization-campaign-card--campaign .organization-campaign-header:hover,
.organization-campaign-card--campaign .organization-campaign-header:focus-visible {
  background: linear-gradient(90deg, rgba(61, 160, 255, 0.1) 0%, rgba(52, 237, 186, 0.08) 100%);
}

.organization-campaign-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-campaign-title-row h2 {
  margin: 0;
  font-size: 1.32rem;
}

.organization-campaign-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(158, 195, 242, 0.38);
  color: var(--theme-text-secondary);
  background: rgba(72, 118, 173, 0.24);
}

.organization-campaign-header-actions {
  position: absolute;
  top: 16px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.organization-campaign-inline-form {
  margin: 0;
}

.organization-campaign-status-delete {
  text-decoration: none;
  border-color: rgba(236, 128, 128, 0.5);
  color: #ffd7d7;
  background: rgba(153, 40, 40, 0.36);
}

.organization-campaign-status-delete:hover,
.organization-campaign-status-delete:focus-visible {
  background: rgba(183, 44, 44, 0.48);
  border-color: rgba(250, 170, 170, 0.68);
  outline: none;
}

.organization-campaign-status-sync {
  cursor: pointer;
  border-color: rgba(128, 216, 170, 0.48);
  color: #d9ffec;
  background: rgba(30, 112, 74, 0.34);
}

.organization-campaign-status-sync:hover,
.organization-campaign-status-sync:focus-visible {
  background: rgba(36, 136, 88, 0.46);
  border-color: rgba(164, 238, 197, 0.7);
  outline: none;
}

.organization-front-page-actions .sidebar-project-menu {
  position: static;
  opacity: 1;
  visibility: visible;
}

.organization-front-page-actions .sidebar-project-popover {
  right: 0;
  left: auto;
}

.organization-campaign-meta {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.organization-campaign-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid rgba(115, 164, 226, 0.4);
  background: rgba(42, 82, 134, 0.3);
  color: #c9e1ff;
  font-size: 0.8rem;
}

.organization-campaign-chevron {
  font-size: 1.3rem;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform 240ms ease;
  color: #b7d5ff;
}

.organization-campaign-card.is-expanded .organization-campaign-chevron,
.organization-scope-card.is-expanded .organization-campaign-chevron,
.organization-scope-du-tree-panel.is-expanded .organization-campaign-chevron {
  transform: rotate(0deg);
}

.organization-campaign-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 320ms ease, opacity 220ms ease;
}

.organization-campaign-tree {
  border-top: 1px solid rgba(114, 163, 223, 0.28);
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.organization-folder-row {
  border-left: 1px solid rgba(136, 177, 224, 0.22);
  padding: 3px 0 3px 12px;
}

.organization-folder-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d4e4fa;
  font-size: 0.97rem;
}

.organization-folder-icon {
  color: #87b9ff;
}

.organization-folder-children {
  margin-top: 8px;
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.organization-folder-filter-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.organization-folder-surface-card {
  margin-top: 22px;
}

.organization-folder-surface-body {
  border-top: 1px solid rgba(114, 163, 223, 0.28);
}

.organization-folder-sections {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.organization-folder-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.organization-folder-section-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-text);
}

.organization-folder-unit-list {
  margin-top: 0;
  width: 100%;
  gap: 18px;
}

.organization-folder-unit-card {
  margin-top: 0;
}

.organization-folder-unit-card--scope {
  position: relative;
}

.organization-folder-unit-card--scope::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  border: 1px dashed transparent;
  pointer-events: none;
}

.organization-folder-unit-card--scope.organization-scope-card--verified,
.organization-folder-unit-card--scope.organization-scope-card--valid {
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.35), 0 0 0 2px rgba(63, 201, 127, 0.72), 0 0 0 5px rgba(31, 122, 73, 0.35);
}

.organization-folder-unit-card--scope.organization-scope-card--verified::after,
.organization-folder-unit-card--scope.organization-scope-card--valid::after {
  border-color: rgba(141, 247, 190, 0.8);
}

.organization-folder-unit-card--scope.organization-scope-card--invalid {
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.35), 0 0 0 2px rgba(245, 94, 94, 0.74), 0 0 0 5px rgba(153, 37, 37, 0.35);
}

.organization-folder-unit-card--scope.organization-scope-card--invalid::after {
  border-color: rgba(255, 164, 164, 0.78);
}

.organization-folder-unit-card.organization-scope-card--valid:not(.organization-folder-unit-card--scope) {
  box-shadow: 0 12px 26px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(70, 207, 138, 0.42);
}

.organization-folder-unit-card.organization-scope-card--warning:not(.organization-folder-unit-card--scope) {
  box-shadow: 0 12px 26px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(246, 196, 92, 0.46);
}

.organization-folder-unit-card.organization-scope-card--invalid:not(.organization-folder-unit-card--scope) {
  box-shadow: 0 12px 26px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(245, 94, 94, 0.46);
}

.organization-folder-unit-card.organization-scope-card--neutral:not(.organization-folder-unit-card--scope) {
  box-shadow: 0 12px 26px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(114, 163, 223, 0.22);
}

.organization-folder-unit-header {
  padding-right: 20px;
}

.organization-tree-read-model-page {
  width: min(1320px, calc(100vw - 48px));
  margin: 24px auto 56px;
}

.organization-scope-summary-row {
  margin-top: 16px;
}

.organization-scope-compact-key {
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(112, 158, 218, 0.22);
  border-radius: 999px;
  background: rgba(9, 19, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.organization-scope-compact-key-item {
  min-width: 0;
  color: #c8dcf8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.organization-scope-compact-key .organization-scope-card-marker {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 0.68rem;
}

.organization-summary-chip--warning {
  border-color: rgba(246, 196, 92, 0.58);
  color: #fff2d2;
  background: rgba(133, 96, 18, 0.34);
}

.organization-scope-root-drop-zone {
  margin-top: 20px;
  border: 1px dashed rgba(128, 216, 170, 0.52);
  border-radius: 8px;
  background: rgba(16, 42, 38, 0.42);
  color: #d9ffec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.organization-scope-root-drop-zone.is-scope-drop-target {
  border-color: rgba(164, 238, 197, 0.88);
  background: rgba(23, 74, 52, 0.56);
  box-shadow: 0 0 0 2px rgba(128, 216, 170, 0.22);
}

.organization-scope-root-drop-zone-title {
  color: #f1fff8;
  font-size: 0.9rem;
  font-weight: 800;
}

.organization-scope-root-drop-zone-copy {
  color: #a9ddc2;
  font-size: 0.78rem;
  font-weight: 700;
}

.organization-scope-organizer-section {
  width: min(1540px, calc(100vw - 120px));
  margin: 10px 50% 0;
  transform: translateX(-50%);
}

.organization-scope-details-section {
  margin-top: 34px;
}

.organization-scope-section-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.organization-scope-section-heading h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.organization-scope-section-heading--details {
  border-top: 1px solid rgba(114, 163, 223, 0.22);
  padding-top: 22px;
}

.organization-scope-root-drop-zone--compact {
  margin-top: 0;
  min-height: 38px;
  padding: 8px 12px;
}

.organization-scope-compact-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.organization-scope-compact-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-left-width: 5px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 32, 63, 0.94), rgba(8, 20, 42, 0.94));
  box-shadow: 0 12px 26px rgba(2, 8, 22, 0.26);
  cursor: grab;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.organization-scope-compact-card--nested {
  border-left-width: 4px;
  box-shadow: none;
}

.organization-scope-compact-card--folder {
  border-left-color: rgba(110, 232, 165, 0.72);
}

.organization-scope-compact-card--campaign {
  border-left-color: rgba(112, 186, 255, 0.76);
}

.organization-scope-compact-card--project {
  border-left-color: rgba(246, 196, 92, 0.72);
}

.organization-scope-compact-card--conversation {
  border-left-color: rgba(184, 151, 255, 0.74);
}

.organization-scope-compact-card:hover,
.organization-scope-compact-card:focus-within {
  border-color: rgba(128, 184, 255, 0.58);
  box-shadow: 0 14px 30px rgba(2, 8, 22, 0.32), 0 0 0 1px rgba(104, 168, 255, 0.12);
  transform: translateY(-1px);
}

.organization-scope-compact-card.is-scope-dragging {
  cursor: grabbing;
  opacity: 0.58;
}

.organization-scope-compact-card.is-scope-drop-target {
  border-color: rgba(128, 216, 170, 0.82);
  box-shadow: 0 0 0 2px rgba(128, 216, 170, 0.26), 0 20px 48px rgba(0, 0, 0, 0.28);
}

.organization-scope-compact-card-drag-preview {
  position: fixed;
  top: -1000px;
  left: -1000px;
  z-index: 9999;
  pointer-events: none;
  transform: none !important;
  opacity: 0.96;
}

.organization-scope-compact-card-main {
  min-width: 0;
  min-height: 68px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.organization-scope-compact-card--nested .organization-scope-compact-card-main {
  min-height: 58px;
  padding: 8px;
}

.organization-scope-compact-card .organization-scope-card-marker {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  font-size: 0.76rem;
}

.organization-scope-compact-card--nested .organization-scope-card-marker {
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
}

.organization-scope-compact-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.organization-scope-compact-card-title {
  color: var(--theme-text);
  display: -webkit-box;
  font-size: 0.92rem;
  font-weight: 780;
  line-height: 1.16;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.organization-scope-compact-card--nested .organization-scope-compact-card-title {
  font-size: 0.86rem;
}

.organization-scope-compact-card-count {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(126, 166, 218, 0.34);
  background: rgba(38, 62, 101, 0.32);
  color: var(--theme-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.organization-scope-compact-card-children {
  border-top: 1px solid rgba(114, 163, 223, 0.18);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  background: rgba(4, 12, 28, 0.28);
}

.organization-scope-compact-card-children .organization-scope-compact-card-children {
  grid-template-columns: 1fr;
}

.organization-scope-card-tree {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organization-scope-card {
  --scope-depth: 0;
  position: relative;
  border: 1px solid var(--theme-panel-border);
  border-radius: 8px;
  background: rgba(9, 19, 39, 0.92);
  box-shadow: 0 12px 28px rgba(2, 8, 22, 0.28);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.organization-scope-card[draggable="true"] {
  cursor: grab;
}

.organization-scope-card.is-scope-dragging {
  cursor: grabbing;
  opacity: 0.58;
}

.organization-scope-card.is-scope-drop-target {
  border-color: rgba(128, 216, 170, 0.82);
  box-shadow: 0 0 0 2px rgba(128, 216, 170, 0.26), 0 20px 56px rgba(0, 0, 0, 0.3);
}

.organization-scope-card--folder {
  border-left: 5px solid rgba(110, 232, 165, 0.72);
}

.organization-scope-card--campaign {
  border-left: 5px solid rgba(112, 186, 255, 0.76);
}

.organization-scope-card--project {
  border-left: 5px solid rgba(246, 196, 92, 0.72);
}

.organization-scope-card--conversation {
  border-left: 5px solid rgba(184, 151, 255, 0.74);
}

.organization-scope-card--calendar {
  border-left: 5px solid rgba(230, 75, 102, 0.78);
}

.organization-scope-card--orphaned,
.organization-scope-card--cycle {
  border-color: rgba(246, 196, 92, 0.72);
  box-shadow: 0 12px 28px rgba(2, 8, 22, 0.28), 0 0 0 1px rgba(246, 196, 92, 0.28);
}

.organization-scope-card-header {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

.organization-scope-card-header:hover,
.organization-scope-card-header:focus-visible {
  background: rgba(95, 161, 248, 0.08);
  outline: none;
}

.organization-scope-card-marker {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: #f4f9ff;
  border: 1px solid rgba(190, 218, 255, 0.34);
  background: rgba(41, 74, 118, 0.56);
}

.organization-scope-card-marker--folder {
  background: rgba(26, 117, 75, 0.48);
}

.organization-scope-card-marker--campaign {
  background: rgba(35, 98, 158, 0.5);
}

.organization-scope-card-marker--project {
  background: rgba(137, 94, 24, 0.48);
}

.organization-scope-card-marker--conversation {
  background: rgba(85, 62, 151, 0.5);
}

.organization-scope-card-marker--calendar {
  background: rgba(142, 33, 58, 0.58);
}

.organization-scope-card-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.organization-scope-card-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.organization-scope-card-title {
  color: var(--theme-text);
  font-size: 1.02rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.organization-scope-card-subtitle {
  color: #aecaef;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.organization-scope-card-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-top: 1px solid rgba(114, 163, 223, 0.24);
  transition: max-height 320ms ease, opacity 220ms ease;
}

.organization-scope-card-facts {
  margin: 0;
  padding: 14px 16px 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.organization-scope-card-facts div {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(112, 158, 218, 0.22);
  background: rgba(16, 31, 59, 0.54);
  padding: 9px 10px;
}

.organization-scope-card-facts dt {
  margin: 0 0 3px;
  color: #91b8e9;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.organization-scope-card-facts dd {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.organization-scope-card-legacy {
  margin: 8px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.organization-scope-card-legacy span {
  border-radius: 999px;
  border: 1px solid rgba(126, 166, 218, 0.28);
  background: rgba(38, 62, 101, 0.32);
  color: #bdd5f4;
  padding: 3px 8px;
  font-size: 0.74rem;
}

.organization-scope-card-actions {
  padding: 10px 16px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.organization-scope-card-open-link {
  min-width: 74px;
  text-align: center;
}

.organization-scope-card-action-button {
  border: 1px solid rgba(128, 216, 170, 0.48);
  border-radius: 8px;
  background: rgba(30, 112, 74, 0.34);
  color: #d9ffec;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
  min-height: 30px;
  padding: 5px 10px;
}

.organization-scope-card-action-button:hover,
.organization-scope-card-action-button:focus-visible {
  background: rgba(36, 136, 88, 0.46);
  border-color: rgba(164, 238, 197, 0.7);
  outline: none;
}

.organization-scope-card-action-button--secondary {
  border-color: rgba(129, 171, 223, 0.48);
  background: rgba(47, 77, 119, 0.34);
  color: #deebff;
}

.organization-scope-card-move-form {
  margin: 0 16px 14px;
  border-top: 1px solid rgba(114, 163, 223, 0.18);
  padding-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.organization-scope-card-move-form label {
  color: #91b8e9;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.organization-scope-card-parent-select {
  min-width: 0;
  border: 1px solid rgba(126, 166, 218, 0.36);
  border-radius: 8px;
  background: rgba(10, 20, 39, 0.92);
  color: var(--theme-text);
  min-height: 32px;
  padding: 5px 8px;
}

.organization-scope-card-children {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.organization-scope-card-children .organization-scope-card {
  margin-left: min(calc(var(--scope-depth) * 12px), 72px);
}

@media (max-width: 1180px) {
  .organization-scope-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .organization-tree-read-model-page {
    width: min(100%, calc(100vw - 24px));
    margin: 16px auto 40px;
  }

  .organization-scope-organizer-section {
    width: min(100%, calc(100vw - 24px));
  }

  .organization-scope-compact-key {
    border-radius: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .organization-scope-compact-grid,
  .organization-scope-compact-card-children {
    grid-template-columns: 1fr;
  }

  .organization-scope-card-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .organization-scope-card-header .organization-campaign-chevron {
    display: none;
  }

  .organization-scope-root-drop-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .organization-scope-card-facts {
    grid-template-columns: 1fr;
  }

  .organization-scope-card-move-form {
    grid-template-columns: 1fr;
  }

  .organization-scope-card-children .organization-scope-card {
    margin-left: 0;
  }
}

.front-page-view {
  width: min(1120px, calc(100vw - 64px));
  margin: 30px auto 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.front-page-nav-row {
  display: flex;
  justify-content: flex-start;
}

.front-page-nav-details {
  position: relative;
}

.front-page-nav-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 320px;
  max-width: min(520px, calc(100vw - 48px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(99, 146, 214, 0.32);
  background: linear-gradient(180deg, rgba(12, 20, 38, 0.98), rgba(8, 14, 27, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  z-index: 20;
}

.front-page-nav-details:not([open]) .front-page-nav-popover {
  display: none;
}

.front-page-nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.front-page-nav-title {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9bc3f8;
}

.front-page-nav-link,
.front-page-nav-empty {
  font-size: 0.96rem;
}

.front-page-nav-link {
  color: #e5f1ff;
  text-decoration: none;
}

.front-page-nav-link:hover,
.front-page-nav-link:focus-visible {
  color: var(--theme-text);
  text-decoration: underline;
  outline: none;
}

.front-page-nav-empty {
  margin: 0;
  color: #88a8d0;
}

.front-page-card {
  padding: 28px 30px 32px;
  border-radius: 22px;
  border: 1px solid var(--theme-panel-border);
  background: rgba(13, 20, 37, 0.9);
  box-shadow: 0 18px 42px rgba(2, 8, 22, 0.34);
}

.front-page-card h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 3.7vw, 3.2rem);
}

.front-page-subheader-label {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fbaf5;
}

.front-page-subheader-name {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  color: var(--theme-text);
}

.front-page-section {
  margin-top: 28px;
}

.front-page-section h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.front-page-updated-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9fc6fb;
}

.front-page-updated-value {
  margin: 4px 0 0;
  color: #d6e7ff;
}

.front-page-overview-copy {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #e3edf9;
  line-height: 1.75;
}

.front-page-overview-copy p {
  margin: 0;
}

.organization-folder-unit-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(9, 21, 48, 0.88) 0%, rgba(7, 17, 39, 0.94) 100%) padding-box,
    linear-gradient(135deg,
      rgba(106, 232, 255, 0.5) 0%,
      rgba(58, 150, 255, 0.34) 32%,
      rgb(var(--theme-accent-rgb) / 28.0%) 68%,
      rgb(var(--theme-accent-rgb) / 44.0%) 100%) border-box;
  box-shadow:
    0 0 0 1px rgb(var(--theme-accent-rgb) / 5.0%),
    0 0 14px rgba(79, 208, 255, 0.08);
  color: #dff6ff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.organization-scope-verification-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.organization-scope-verification-chip--verified {
  color: #dbffe8;
  border-color: rgba(110, 232, 165, 0.64);
  background: rgba(23, 127, 74, 0.42);
}

.organization-scope-verification-chip--invalid {
  color: #ffe4e4;
  border-color: rgba(255, 148, 148, 0.64);
  background: rgba(146, 37, 37, 0.42);
}

.organization-scope-verification-chip--valid {
  color: #dbffe8;
  border-color: rgba(110, 232, 165, 0.64);
  background: rgba(23, 127, 74, 0.42);
}

.organization-scope-verification-chip--warning {
  color: #fff2d2;
  border-color: rgba(245, 196, 92, 0.64);
  background: rgba(133, 96, 18, 0.38);
}

.organization-scope-verification-chip--neutral {
  color: var(--theme-text);
  border-color: rgba(129, 171, 223, 0.42);
  background: rgba(42, 69, 109, 0.3);
}

.organization-scope-audit-strip {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(114, 163, 223, 0.26);
  border-bottom: 1px solid rgba(114, 163, 223, 0.26);
  padding: 10px 16px;
}

.organization-scope-audit-strip--verified {
  background: linear-gradient(90deg, rgba(23, 127, 74, 0.2), rgba(12, 35, 25, 0.12));
}

.organization-scope-audit-strip--invalid {
  background: linear-gradient(90deg, rgba(146, 37, 37, 0.22), rgba(43, 11, 11, 0.12));
}

.organization-scope-audit-strip--valid {
  background: linear-gradient(90deg, rgba(23, 127, 74, 0.2), rgba(12, 35, 25, 0.12));
}

.organization-scope-audit-strip--warning {
  background: linear-gradient(90deg, rgba(133, 96, 18, 0.2), rgba(48, 33, 7, 0.12));
}

.organization-scope-audit-strip--neutral {
  background: linear-gradient(90deg, rgba(52, 79, 120, 0.2), rgba(12, 22, 41, 0.12));
}

.organization-scope-audit-strip-text {
  margin: 0;
  color: var(--theme-text-secondary);
  font-size: 0.9rem;
  line-height: 1.35;
}

.organization-scope-audit-strip-label {
  display: inline-block;
  margin-right: 6px;
  color: var(--theme-text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.organization-scope-audit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.organization-scope-audit-link:hover,
.organization-scope-audit-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(3, 9, 24, 0.4);
}

.organization-scope-audit-link--verified {
  color: #deffeb;
  border-color: rgba(110, 232, 165, 0.72);
  background: rgba(26, 131, 80, 0.5);
}

.organization-scope-audit-link--invalid {
  color: #ffe3e3;
  border-color: rgba(250, 144, 144, 0.72);
  background: rgba(158, 39, 39, 0.5);
}

.organization-scope-audit-link--valid {
  color: #deffeb;
  border-color: rgba(110, 232, 165, 0.72);
  background: rgba(26, 131, 80, 0.5);
}

.organization-scope-audit-link--warning {
  color: #fff0cf;
  border-color: rgba(246, 196, 92, 0.72);
  background: rgba(145, 101, 17, 0.46);
}

.organization-scope-audit-link--neutral {
  color: #deebff;
  border-color: rgba(129, 171, 223, 0.48);
  background: rgba(47, 77, 119, 0.34);
}

.organization-scope-audit-strip-root {
  display: inline-block;
  margin-left: 8px;
  color: #f0f8ff;
  font-weight: 600;
}

.organization-folder-unit-body {
  border-top: 1px solid rgba(114, 163, 223, 0.28);
}

.organization-folder-unit-rows {
  display: flex;
  flex-direction: column;
}

.organization-folder-surface-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}

.organization-folder-du-tree {
  margin-top: 12px;
  border-top: 1px solid rgba(92, 137, 193, 0.26);
  padding: 14px 0 8px;
}

.organization-folder-du-tree-title {
  margin: 0 0 8px;
  padding: 0 20px;
  color: var(--theme-text);
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.organization-folder-du-tree-children {
  padding-top: 0;
}

.organization-scope-tree-row {
  gap: 14px;
  border-left: 4px solid transparent;
  border-radius: 12px;
}

.organization-scope-tree-row--valid {
  background: rgba(24, 86, 56, 0.12);
}

.organization-scope-tree-row--warning {
  background: rgba(120, 83, 21, 0.16);
}

.organization-scope-tree-row--invalid {
  background: rgba(120, 34, 34, 0.16);
}

.organization-scope-tree-row--neutral {
  background: rgba(53, 80, 118, 0.14);
}

.organization-scope-tree-row--project {
  border-left-color: rgba(110, 186, 255, 0.72);
  background: linear-gradient(90deg, rgba(39, 90, 150, 0.22), rgba(20, 47, 88, 0.08));
}

.organization-scope-tree-row--campaign {
  border-left-color: rgba(110, 232, 165, 0.72);
  background: linear-gradient(90deg, rgba(28, 115, 70, 0.22), rgba(14, 48, 31, 0.08));
}

.organization-scope-tree-row--conversation {
  border-left-color: rgba(184, 151, 255, 0.76);
  background: linear-gradient(90deg, rgba(79, 57, 132, 0.24), rgba(28, 18, 54, 0.08));
}

.organization-scope-tree-row-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.organization-scope-tree-row-reason {
  color: var(--theme-text);
  font-size: 0.82rem;
  line-height: 1.28;
}

.organization-scope-tree-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.organization-scope-tree-open-link {
  white-space: nowrap;
}

.organization-scope-tree-row-content {
  border-left: 1px solid rgba(114, 163, 223, 0.16);
  padding-left: 10px;
}

.organization-scope-tree-row-content--root {
  border-left-color: rgba(110, 232, 165, 0.34);
}

.organization-scope-tree-row-content--scope-node {
  border-left-color: rgba(120, 194, 255, 0.28);
}

.organization-scope-tree-row-content--project {
  border-left-color: rgba(110, 186, 255, 0.34);
}

.organization-scope-tree-row-content--campaign {
  border-left-color: rgba(110, 232, 165, 0.34);
}

.organization-scope-tree-row-content--conversation {
  border-left-color: rgba(184, 151, 255, 0.34);
}

.organization-scope-explorer-section {
  margin-top: 6px;
}

.organization-scope-explorer-title {
  margin-bottom: 2px;
}

.organization-scope-du-tree-panel-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organization-scope-du-tree-panel {
  border-radius: 16px;
  border: 1px solid var(--theme-panel-border);
  background: linear-gradient(142deg, rgba(9, 23, 52, 0.88), rgba(6, 17, 42, 0.94));
  box-shadow: 0 16px 30px rgba(2, 8, 22, 0.34);
  overflow: hidden;
}

.organization-scope-du-tree-panel--valid {
  box-shadow: 0 16px 30px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(70, 207, 138, 0.34);
}

.organization-scope-du-tree-panel--warning {
  box-shadow: 0 16px 30px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(246, 196, 92, 0.34);
}

.organization-scope-du-tree-panel--invalid {
  box-shadow: 0 16px 30px rgba(2, 8, 22, 0.34), 0 0 0 1px rgba(245, 94, 94, 0.34);
}

.organization-scope-du-tree-panel-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
}

.organization-scope-du-tree-panel-toggle:hover,
.organization-scope-du-tree-panel-toggle:focus-visible {
  background: rgba(95, 161, 248, 0.08);
  outline: none;
}

.organization-scope-du-tree-panel-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.organization-scope-du-tree-panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.organization-scope-du-tree-panel-title-row h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.1rem;
}

.organization-scope-du-tree-panel-meta {
  gap: 6px;
}

.organization-scope-du-tree-panel-body {
  border-top: 1px solid rgba(114, 163, 223, 0.26);
}

.organization-scope-du-tree-panel-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(114, 163, 223, 0.2);
}

.organization-scope-du-tree-panel-strip p {
  margin: 0;
  color: #d8ecff;
  font-size: 0.88rem;
  line-height: 1.35;
}

.organization-scope-du-tree-panel-strip strong {
  color: var(--theme-text);
}

.organization-scope-du-tree-panel-strip--valid {
  background: linear-gradient(90deg, rgba(23, 127, 74, 0.18), rgba(12, 35, 25, 0.12));
}

.organization-scope-du-tree-panel-strip--warning {
  background: linear-gradient(90deg, rgba(133, 96, 18, 0.18), rgba(48, 33, 7, 0.12));
}

.organization-scope-du-tree-panel-strip--invalid {
  background: linear-gradient(90deg, rgba(146, 37, 37, 0.18), rgba(43, 11, 11, 0.12));
}

.organization-scope-du-tree-panel-strip--neutral {
  background: linear-gradient(90deg, rgba(52, 79, 120, 0.18), rgba(12, 22, 41, 0.12));
}

.organization-scope-du-tree-panel-derived {
  margin-top: 0;
}

.organization-scope-du-tree-conversation-row {
  margin: 10px 12px 14px;
}

.organization-scope-audit-page {
  max-width: 1120px;
  margin: 0 auto;
}

.organization-scope-audit-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.organization-scope-audit-back-link {
  width: fit-content;
}

.organization-scope-audit-card {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid var(--theme-panel-border);
  background: linear-gradient(142deg, rgba(9, 23, 52, 0.9), rgba(6, 17, 42, 0.95));
  box-shadow: 0 22px 38px rgba(2, 8, 22, 0.42);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.organization-scope-audit-card--verified {
  box-shadow: 0 22px 38px rgba(2, 8, 22, 0.42), 0 0 0 2px rgba(70, 207, 138, 0.44);
}

.organization-scope-audit-card--invalid {
  box-shadow: 0 22px 38px rgba(2, 8, 22, 0.42), 0 0 0 2px rgba(239, 92, 92, 0.44);
}

.organization-scope-audit-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.organization-scope-audit-card-title-row h2 {
  margin: 0;
  font-size: 1.85rem;
  color: var(--theme-text);
}

.organization-scope-audit-status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 5px 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  font-weight: 700;
}

.organization-scope-audit-status-chip--verified {
  color: #dfffe9;
  border-color: rgba(121, 239, 175, 0.7);
  background: rgba(24, 130, 78, 0.42);
}

.organization-scope-audit-status-chip--invalid {
  color: #ffe1e1;
  border-color: rgba(250, 146, 146, 0.7);
  background: rgba(153, 35, 35, 0.44);
}

.organization-scope-audit-summary {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
  line-height: 1.45;
}

.organization-scope-audit-detail {
  margin: 0;
  color: var(--theme-text-secondary);
  font-size: 0.94rem;
  line-height: 1.4;
}

.organization-scope-audit-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.organization-scope-audit-meta-item {
  border-radius: 10px;
  border: 1px solid rgba(103, 153, 216, 0.3);
  background: rgba(10, 26, 57, 0.58);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.organization-scope-audit-meta-label {
  color: #a7c8ee;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.organization-scope-audit-meta-value {
  color: #eff7ff;
  font-size: 0.9rem;
}

.organization-scope-audit-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.organization-scope-audit-section h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.organization-scope-audit-tree {
  border-radius: 14px;
  border: 1px solid rgba(103, 153, 216, 0.3);
  background: rgba(11, 27, 58, 0.5);
  overflow: hidden;
}

.organization-scope-audit-tree-folder-card {
  border-top: 1px solid rgba(92, 137, 193, 0.18);
}

.organization-scope-audit-tree-folder-card:first-child {
  border-top: 0;
}

.organization-scope-audit-tree-folder-card--root {
  box-shadow: inset 0 0 0 1px rgba(110, 232, 165, 0.24);
}

.organization-scope-audit-tree-folder-card--node {
  box-shadow: inset 0 0 0 1px rgba(110, 186, 255, 0.16);
}

.organization-scope-audit-tree-toggle {
  min-height: 74px;
}

.organization-scope-audit-tree-toggle--root {
  background: linear-gradient(90deg, rgba(18, 70, 46, 0.26), rgba(8, 21, 46, 0.08));
}

.organization-scope-audit-tree-toggle--node {
  background: linear-gradient(90deg, rgba(26, 61, 112, 0.18), rgba(8, 21, 46, 0.06));
}

.organization-scope-audit-tree-body {
  background: rgba(8, 21, 46, 0.42);
}

.organization-scope-audit-tree-children {
  padding-top: 0;
}

.organization-scope-audit-tree-leaf-row {
  min-height: 68px;
}

.organization-scope-audit-rule-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.organization-scope-audit-rule-item {
  border-radius: 12px;
  border: 1px solid rgba(103, 153, 216, 0.3);
  background: rgba(11, 27, 58, 0.55);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.organization-scope-audit-rule-item--passed {
  border-color: rgba(100, 224, 158, 0.36);
}

.organization-scope-audit-rule-item--failed {
  border-color: rgba(242, 118, 118, 0.42);
}

.organization-scope-audit-rule-title-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.organization-scope-audit-rule-title-row h4 {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.97rem;
}

.organization-scope-audit-rule-chip {
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 2px 9px;
}

.organization-scope-audit-rule-chip--passed {
  color: #dcffea;
  border-color: rgba(109, 233, 166, 0.6);
  background: rgba(23, 127, 74, 0.36);
}

.organization-scope-audit-rule-chip--failed {
  color: #ffe2e2;
  border-color: rgba(245, 145, 145, 0.6);
  background: rgba(147, 37, 37, 0.36);
}

.organization-scope-audit-rule-description,
.organization-scope-audit-rule-message {
  margin: 0;
  color: #bfd9f8;
  font-size: 0.9rem;
  line-height: 1.35;
}

.organization-scope-audit-rule-message {
  color: #ebf5ff;
}

.organization-scope-audit-rule-issues {
  margin: 0;
  padding-left: 18px;
  color: #f9d1d1;
  font-size: 0.84rem;
  line-height: 1.35;
}

.organization-scope-audit-rule-issues code,
.organization-scope-audit-entity-subtitle code {
  color: #ffdede;
}

.organization-scope-audit-entity-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--theme-text);
  font-size: 0.92rem;
}

.organization-scope-audit-entity-title {
  display: block;
  color: var(--theme-text);
}

.organization-scope-audit-entity-subtitle {
  display: block;
  color: #b9d4f4;
  font-size: 0.84rem;
}

.organization-folder-tree-node,
.organization-folder-tree-entity-row {
  border-top: 0;
}

.organization-folder-tree-node-toggle,
.organization-folder-tree-node-leaf,
.organization-folder-tree-entity-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(92, 137, 193, 0.26);
  color: inherit;
  text-align: left;
  background: transparent;
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 80px;
  padding: 24px 20px;
}

.organization-folder-tree-node-toggle {
  cursor: pointer;
}

.organization-folder-tree-node-toggle:hover,
.organization-folder-tree-node-toggle:focus-visible {
  background: rgba(95, 161, 248, 0.08);
  outline: none;
}

.organization-folder-tree-guides {
  display: inline-flex;
  align-items: stretch;
  align-self: stretch;
  gap: 6px;
  min-height: 100%;
  margin-right: 2px;
}

.organization-folder-tree-guide-line {
  width: 0;
  height: 100%;
  border-left: 1px solid rgba(136, 177, 224, 0.42);
}

.organization-folder-tree-guides--root {
  min-width: 10px;
}

.organization-folder-tree-guides--scope-node .organization-folder-tree-guide-line {
  border-left-color: rgba(110, 186, 255, 0.54);
}

.organization-folder-tree-guides--project .organization-folder-tree-guide-line {
  border-left-color: rgba(110, 186, 255, 0.58);
}

.organization-folder-tree-guides--campaign .organization-folder-tree-guide-line {
  border-left-color: rgba(110, 232, 165, 0.58);
}

.organization-folder-tree-guides--conversation .organization-folder-tree-guide-line {
  border-left-color: rgba(184, 151, 255, 0.62);
}

.organization-folder-tree-row-arrow,
.organization-folder-tree-row-marker {
  width: 14px;
  flex: 0 0 14px;
  line-height: 1;
  margin-top: 2px;
  color: #8fbef7;
}

.organization-folder-tree-row-arrow {
  transform: rotate(0deg);
  transition: transform 220ms ease;
}

.organization-folder-tree-row-marker {
  width: 22px;
  flex: 0 0 22px;
  height: 22px;
  margin-top: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f7fbff;
  background: rgba(73, 106, 150, 0.42);
  border: 1px solid rgba(136, 177, 224, 0.42);
}

.organization-folder-tree-row-marker--root {
  background: rgba(23, 127, 74, 0.5);
  border-color: rgba(110, 232, 165, 0.72);
}

.organization-folder-tree-row-marker--scope-node {
  background: rgba(45, 97, 171, 0.44);
  border-color: rgba(110, 186, 255, 0.68);
}

.organization-folder-tree-row-marker--project {
  background: rgba(39, 90, 150, 0.44);
  border-color: rgba(110, 186, 255, 0.68);
}

.organization-folder-tree-row-marker--campaign {
  background: rgba(28, 115, 70, 0.46);
  border-color: rgba(110, 232, 165, 0.68);
}

.organization-folder-tree-row-marker--conversation {
  background: rgba(79, 57, 132, 0.5);
  border-color: rgba(184, 151, 255, 0.76);
}

.organization-folder-tree-node-card.is-expanded > .organization-folder-tree-node-toggle .organization-folder-tree-row-arrow {
  transform: rotate(90deg);
}

.organization-folder-tree-row-content {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.organization-folder-tree-row-title,
.organization-folder-tree-row-title-link {
  color: var(--theme-text);
  font-size: 0.97rem;
  line-height: 1.18;
  text-decoration: none;
}

.organization-folder-tree-row-title-link:hover,
.organization-folder-tree-row-title-link:focus-visible {
  color: var(--theme-text);
  text-decoration: underline;
}

.organization-folder-tree-row-subtitle {
  font-size: 0.79rem;
  color: var(--theme-text-muted);
  line-height: 1.1;
  min-height: 1.1em;
}

.organization-folder-tree-row-subtitle.is-empty {
  visibility: hidden;
}

.organization-folder-tree-node-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 320ms ease, opacity 220ms ease;
}

.organization-folder-tree-node-children {
  border-top: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.organization-folder-tree-entity-row {
  border-radius: 8px;
}

.organization-folder-tree-unit-row {
  background: rgba(35, 69, 120, 0.12);
}

.organization-folder-unit-tag--top-scope {
  color: #dcffea;
}

.organization-folder-unit-tag--scope-node {
  color: var(--theme-text);
}

.organization-folder-unit-tag--project {
  color: var(--theme-text);
}

.organization-folder-unit-tag--campaign {
  color: #dcffea;
}

.organization-folder-unit-tag--conversation {
  color: #efe6ff;
}

.organization-folder-tree-entity-row.is-active-project {
  background: rgba(74, 128, 196, 0.28);
  border: 1px solid rgba(118, 177, 245, 0.45);
}

.organization-folder-ungrouped {
  border-top: 1px solid rgba(92, 137, 193, 0.3);
  padding-bottom: 6px;
}

.organization-folder-ungrouped-title {
  margin: 0;
  padding: 12px 18px 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--theme-text);
}

.organization-folder-ungrouped-list {
  display: flex;
  flex-direction: column;
}

.organization-project-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.93rem;
  border-radius: 8px;
  padding: 5px 8px;
}

.organization-project-row.is-active-project {
  background: rgba(74, 128, 196, 0.28);
  border: 1px solid rgba(118, 177, 245, 0.45);
}

.organization-project-icon {
  color: #79bbff;
  opacity: 0.92;
}

.organization-project-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-project-link {
  color: var(--theme-text);
  text-decoration: none;
}

.organization-project-link:hover,
.organization-project-link:focus-visible {
  color: var(--theme-text);
  text-decoration: underline;
}

.organization-project-campaign-link {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(153, 196, 246, 0.46);
  background: rgba(44, 90, 146, 0.34);
  color: #d6ebff;
  text-decoration: none;
  font-size: 0.76rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.organization-project-campaign-link:hover,
.organization-project-campaign-link:focus-visible {
  color: var(--theme-text);
  background: rgba(58, 114, 182, 0.45);
}

.organization-folder-conversation-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.organization-folder-conversation-subtitle {
  font-size: 0.79rem;
  color: var(--theme-text-muted);
  line-height: 1.1;
}

.organization-project-open-link {
  margin-left: auto;
  font-size: 0.78rem;
  color: #b4d6ff;
  text-decoration: none;
  border: 1px solid rgba(114, 161, 219, 0.42);
  border-radius: 999px;
  padding: 1px 8px;
  background: rgba(29, 66, 112, 0.36);
}

.organization-folder-tree-row-open {
  align-self: flex-end;
  margin-bottom: 0;
}

.organization-project-open-link:hover,
.organization-project-open-link:focus-visible {
  color: var(--theme-text);
  background: rgba(45, 93, 155, 0.44);
}

.organization-campaign-empty {
  margin: 0;
  min-height: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid rgba(114, 163, 223, 0.28);
  color: var(--theme-text-secondary);
  font-size: 0.95rem;
  line-height: 1.35;
}

.organization-proposals-section {
  border-top: 1px solid rgba(114, 163, 223, 0.28);
  padding: 12px 20px 18px;
}

.organization-proposals-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.organization-proposals-header h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--theme-text);
}

.organization-proposal-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.organization-proposal-item {
  border: 1px solid rgba(105, 154, 219, 0.34);
  border-radius: 10px;
  background: rgba(11, 27, 58, 0.58);
  padding: 10px 11px;
}

.organization-proposal-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-proposal-title-row h4 {
  margin: 0;
  font-size: 0.92rem;
  color: #e4f1ff;
}

.organization-proposal-status {
  border-radius: 999px;
  border: 1px solid rgba(130, 177, 233, 0.4);
  padding: 1px 8px;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.organization-disposition-status {
  border-radius: 999px;
  border: 1px solid rgba(130, 177, 233, 0.4);
  padding: 1px 8px;
  font-size: 0.73rem;
  letter-spacing: 0.02em;
}

.organization-disposition-status-create {
  color: var(--theme-accent-soft);
  border-color: color-mix(in srgb, var(--theme-accent-soft) 50.0%, transparent);
  background: rgba(21, 109, 95, 0.33);
}

.organization-disposition-status-attach {
  color: #d5e7ff;
  border-color: rgba(135, 185, 255, 0.48);
  background: rgba(49, 91, 147, 0.34);
}

.organization-disposition-status-ungrouped {
  color: #ffeecb;
  border-color: rgba(255, 205, 130, 0.5);
  background: rgba(128, 92, 38, 0.32);
}

.organization-disposition-status-unknown {
  color: #d9e7f8;
  background: rgba(64, 89, 122, 0.3);
}

.organization-proposal-status-proposed {
  color: #d6e8ff;
  background: rgba(62, 98, 147, 0.28);
}

.organization-proposal-status-review {
  color: #ffe6bf;
  border-color: rgba(255, 194, 120, 0.42);
  background: rgba(137, 90, 29, 0.28);
}

.organization-proposal-status-approved {
  color: #ccffd7;
  border-color: rgba(117, 226, 154, 0.46);
  background: rgba(40, 110, 66, 0.32);
}

.organization-proposal-status-rejected {
  color: #ffc9c9;
  border-color: rgba(255, 137, 137, 0.5);
  background: rgba(126, 39, 39, 0.32);
}

.organization-proposal-status-attached {
  color: #e6ddff;
  border-color: rgba(178, 151, 255, 0.48);
  background: rgba(90, 68, 142, 0.32);
}

.organization-proposal-meta,
.organization-proposal-objective,
.organization-proposal-dependency,
.organization-proposal-preflight,
.organization-proposal-folder,
.organization-proposal-disposition-reason {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #c5dcfa;
}

.organization-proposal-link {
  color: var(--theme-text);
  text-decoration: none;
}

.organization-proposal-link:hover,
.organization-proposal-link:focus-visible {
  color: var(--theme-text);
  text-decoration: underline;
}

.organization-proposal-empty {
  margin: 10px 0 0;
  color: #b9d2f1;
  font-size: 0.88rem;
}

.organization-review-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(120, 166, 227, 0.28);
}

.organization-review-history-title {
  margin: 0;
  font-size: 0.8rem;
  color: var(--theme-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.organization-review-history-time {
  color: #97bde9;
  font-size: 0.78rem;
}

.organization-proposal-controls {
  margin-top: 10px;
  border-top: 1px solid rgba(108, 156, 221, 0.25);
  padding-top: 10px;
}

.organization-proposal-control-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.organization-proposal-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.organization-proposal-control-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: #c3d8f4;
}

.organization-proposal-control-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(123, 168, 225, 0.4);
  background: rgba(15, 31, 64, 0.75);
  color: var(--theme-text);
  padding: 6px 8px;
  font-size: 0.83rem;
}

.organization-proposal-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-proposal-action {
  border: 1px solid rgba(126, 170, 227, 0.45);
  background: rgba(44, 78, 128, 0.45);
  color: #e1efff;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 4px 10px;
  cursor: pointer;
}

.organization-proposal-action:hover,
.organization-proposal-action:focus-visible {
  background: rgba(62, 104, 164, 0.58);
}

.organization-proposal-action-approve {
  border-color: rgba(116, 230, 153, 0.5);
  background: rgba(38, 109, 66, 0.4);
}

.organization-proposal-action-reject {
  border-color: rgba(255, 141, 141, 0.52);
  background: rgba(124, 47, 47, 0.42);
}

.organization-empty-state {
  margin-top: 24px;
  border-style: dashed;
  border-color: var(--color-border-control);
  border-radius: 14px;
  padding: 24px;
}

.organization-empty-state h2 {
  margin: 0;
  font-size: 1.25rem;
}

.organization-empty-state p {
  margin: 8px 0 0;
  color: var(--theme-text-secondary);
}

@media (max-width: 860px) {
  .organization-page {
    padding: 16px 12px 30px;
  }

  .organization-filter-form {
    grid-template-columns: 1fr;
  }

  .organization-folder-filter-form {
    grid-template-columns: 1fr;
  }

  .organization-folder-sections {
    margin-top: 18px;
    gap: 22px;
  }

  .organization-folder-section-title {
    font-size: 1.28rem;
  }

  .organization-campaign-header {
    padding: 14px 14px 14px;
    padding-right: 14px;
    padding-top: 62px;
  }

  .organization-campaign-header-actions {
    top: 12px;
    right: 14px;
  }

  .organization-campaign-tree {
    padding: 12px 14px 14px;
  }

  .organization-proposals-section {
    padding: 10px 14px 14px;
  }
}

/* Team admission */
.team-creation-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 20, 0.56);
  backdrop-filter: blur(3px);
}

.team-creation-alert-overlay.is-dismissing {
  transition: opacity 0.2s ease;
}

.team-creation-alert-overlay.is-dismissed {
  opacity: 0;
}

.team-creation-alert {
  position: relative;
  width: min(620px, 100%);
  border: 1px solid rgba(109, 225, 169, 0.62);
  border-radius: 8px;
  background: #0b2130;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.48);
  color: #edf9ff;
  padding: 26px 52px 26px 26px;
  text-align: center;
}

.team-creation-alert__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(188, 220, 238, 0.34);
  border-radius: 50%;
  background: #102c3d;
  color: #dceef8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.team-creation-alert__close:hover,
.team-creation-alert__close:focus-visible {
  border-color: #dff5ff;
  background: #173c50;
  color: var(--theme-text);
}

.team-creation-alert__status {
  margin: 0 0 7px;
  color: #78e3af;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-creation-alert h2 {
  margin: 0;
  font-size: 1.35rem;
}

.team-creation-alert > p:last-child {
  margin: 12px 0 0;
  color: #c5d9e7;
  font-size: 0.96rem;
  line-height: 1.5;
}

.team-creation-alert strong {
  color: var(--theme-text);
}

.organization-team-setup-action {
  margin-top: 18px;
}

.organization-team-setup-button,
.team-setup__primary,
.team-invitation__primary {
  min-height: 42px;
  border: 1px solid var(--color-border-control);
  border-radius: 6px;
  background: var(--color-surface-control);
  color: var(--theme-text);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.organization-team-setup-button:hover,
.organization-team-setup-button:focus-visible,
.team-setup__primary:hover,
.team-setup__primary:focus-visible,
.team-invitation__primary:hover,
.team-invitation__primary:focus-visible {
  border-color: var(--color-border-active);
  background: var(--color-surface-card-lifted);
  color: var(--theme-text);
  text-decoration: none;
}

.organization-team-directory {
  margin-top: 22px;
  padding: 18px;
}

.organization-team-directory__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.organization-team-directory__heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.organization-team-directory__heading span,
.organization-team-directory__empty {
  color: var(--theme-text-muted);
  font-size: 0.86rem;
}

.organization-team-directory__empty {
  margin: 0;
  padding: 10px 0;
}

.organization-team-directory__list {
  display: grid;
  gap: 8px;
}

.organization-team-directory__item {
  border: 1px solid var(--color-border-control);
  border-radius: 6px;
  background: var(--color-surface-card);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.organization-team-directory__item h3,
.organization-team-directory__item p,
.organization-team-directory__item dl,
.organization-team-directory__item dt,
.organization-team-directory__item dd {
  margin: 0;
}

.organization-team-directory__item h3 {
  font-size: 1rem;
}

.organization-team-directory__item p {
  margin-top: 5px;
  color: var(--theme-text-secondary);
  font-size: 0.85rem;
}

.organization-team-directory__item dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 24px;
}

.organization-team-directory__item dt {
  color: var(--theme-text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.organization-team-directory__item dd {
  margin-top: 3px;
  color: var(--theme-text);
  font-size: 0.86rem;
}

.team-setup,
.team-invitation {
  width: min(680px, calc(100% - 32px));
  margin: 34px auto 56px;
}

.team-setup__header,
.team-invitation {
  color: var(--theme-text);
}

.team-setup__header > p,
.team-invitation__status {
  margin: 18px 0 6px;
  color: #7dbaf4;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-setup__header h1,
.team-invitation h1 {
  margin: 0;
  font-size: 1.65rem;
}

.team-setup__header > span,
.team-invitation > p:not(.team-invitation__status) {
  display: block;
  margin-top: 8px;
  color: #aec2df;
}

.team-setup__back,
.team-setup__secondary,
.team-invitation__secondary {
  color: #bdd8f5;
  font-size: 0.86rem;
  text-decoration: none;
}

.team-setup__back:hover,
.team-setup__secondary:hover,
.team-invitation__secondary:hover {
  color: var(--theme-text);
  text-decoration: underline;
}

.team-setup__progress {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid rgba(122, 166, 218, 0.28);
}

.team-setup__progress span {
  padding: 0 2px 10px;
  color: #778fab;
  font-size: 0.78rem;
}

.team-setup__progress span:last-child {
  text-align: right;
}

.team-setup__progress .is-active,
.team-setup__progress .is-complete {
  border-bottom: 2px solid #83c3ff;
  color: #d9edff;
}

.team-setup__progress .is-complete {
  border-bottom-color: #66d9a3;
  color: #9ae8c2;
}

.team-setup__existing {
  margin-top: 18px;
  border: 1px solid rgba(122, 166, 218, 0.34);
  border-radius: 8px;
  background: rgba(7, 19, 41, 0.72);
  padding: 18px;
}

.team-setup__section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.team-setup__section-heading h2,
.team-setup__form-title {
  margin: 0;
  font-size: 0.98rem;
}

.team-setup__section-heading span {
  color: var(--theme-text-muted);
  font-size: 0.76rem;
}

.team-setup__existing-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.team-setup__existing-button {
  min-width: 0;
  min-height: 62px;
  border: 1px solid rgba(122, 184, 240, 0.46);
  border-radius: 6px;
  background: #0b213b;
  color: #e9f5ff;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
}

.team-setup__existing-button:hover,
.team-setup__existing-button:focus-visible {
  border-color: #b9dcfa;
  background: #123052;
  color: var(--theme-text);
  text-decoration: none;
}

.team-setup__existing-button span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 700;
}

.team-setup__existing-button small {
  color: #91accd;
  font-size: 0.72rem;
}

.team-setup__form-title {
  margin-bottom: 18px;
  color: var(--theme-text);
}

.team-setup__form,
.team-invitation__facts {
  margin-top: 18px;
  border: 1px solid rgba(122, 166, 218, 0.34);
  border-radius: 8px;
  background: rgba(7, 19, 41, 0.82);
  padding: 22px;
}

.team-setup__lead,
.team-setup__summary {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(122, 166, 218, 0.25);
  padding-bottom: 16px;
}

.team-setup__lead span,
.team-setup__summary span,
.team-setup__field > span {
  display: block;
  margin-bottom: 6px;
  color: #9db6d7;
  font-size: 0.75rem;
  font-weight: 700;
}

.team-setup__lead strong,
.team-setup__lead small {
  display: block;
}

.team-setup__lead small,
.team-setup__field small {
  margin-top: 5px;
  color: #7f99bb;
  font-size: 0.76rem;
}

.team-setup__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.team-setup__summary strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.team-setup__name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.team-setup__field {
  display: block;
  margin-bottom: 16px;
}

.team-setup__field input,
.team-setup__field textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(122, 166, 218, 0.42);
  border-radius: 5px;
  background: #08172e;
  color: var(--theme-text);
  padding: 10px 11px;
  font: inherit;
  font-size: 0.9rem;
}

.team-setup__field input {
  height: 42px;
}

.team-setup__field textarea {
  min-height: 108px;
  resize: vertical;
}

.team-setup__field input:focus,
.team-setup__field textarea:focus {
  border-color: #83c3ff;
  outline: 2px solid rgba(131, 195, 255, 0.18);
  outline-offset: 1px;
}

.team-setup__error {
  margin-bottom: 18px;
  border: 1px solid rgba(255, 128, 128, 0.5);
  border-radius: 5px;
  background: rgba(112, 25, 36, 0.34);
  color: #ffd3d7;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.team-setup__actions,
.team-invitation__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.team-setup__actions {
  margin-top: 6px;
}

.team-invitation {
  border-top: 3px solid #6aaee9;
  border-radius: 0 0 8px 8px;
  background: rgba(7, 19, 41, 0.86);
  padding: 28px;
}

.team-invitation__status--verified {
  color: #70dfa9;
}

.team-invitation__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.team-invitation__facts div,
.team-invitation__facts dt,
.team-invitation__facts dd {
  margin: 0;
}

.team-invitation__facts dt {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.team-invitation__facts dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 0.9rem;
}

.team-invitation__actions {
  margin-top: 22px;
}

.team-invitation__actions form {
  margin: 0;
}

@media (max-width: 700px) {
  body.team-surface-screen {
    overflow-x: hidden;
  }

  .organization-team-directory__item {
    grid-template-columns: 1fr;
  }

  .organization-team-directory__item dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .team-setup,
  .team-invitation {
    width: min(100% - 20px, 680px);
    margin-top: 20px;
  }

  .team-setup__form,
  .team-invitation {
    padding: 18px;
  }

  .team-setup__name-grid,
  .team-setup__summary,
  .team-invitation__facts,
  .team-setup__existing-list {
    grid-template-columns: 1fr;
  }

  .team-setup__actions,
  .team-invitation__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .team-setup__secondary,
  .team-invitation__secondary {
    text-align: center;
  }
}

.projects-index-title-row h2 {
  margin: 0 0 10px;
  text-align: center;
}

.projects-index-title-row--selected {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 2px;
}

.projects-index-title-row--selected h2 {
  grid-column: 2;
  margin: 0;
}

.projects-index-title-action {
  justify-self: start;
}

.projects-index-title-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.projects-title-new-project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(101, 132, 180, 0.58);
  border-radius: 4px;
  background: rgb(var(--theme-surface-rgb) / 22.0%);
  color: #c4d2e7;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.projects-title-new-project-link:hover,
.projects-title-new-project-link:focus {
  border-color: color-mix(in srgb, var(--theme-primary-soft) 72.0%, transparent);
  background: rgba(30, 41, 59, 0.42);
  color: var(--theme-text);
  text-decoration: none;
}

.projects-landing-intro {
  max-width: 840px;
  margin: 0 auto 10px;
  text-align: center;
  color: #b8cae6;
  line-height: 1.55;
}

.projects-sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.projects-sidebar-actions .sidebar-button.sidebar-button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  line-height: 1;
  white-space: nowrap;
}

.projects-sidebar-organization-row {
  display: flex;
  justify-content: flex-start;
  margin: 0 -12px 8px;
}

.projects-sidebar-organization-row .sidebar-button {
  width: 100%;
  border-radius: 0;
  padding: 6px 10px;
}

.projects-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.projects-landing-split {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, auto));
  gap: 28px;
  flex: 1 1 auto;
  align-content: center;
  min-height: clamp(460px, calc(100vh - 420px), 620px);
  max-width: 1240px;
  width: 100%;
  margin: 10px auto 0;
  padding: 18px clamp(48px, 8vw, 150px) 40px;
  box-sizing: border-box;
}

.projects-section-grid--setup {
  margin-bottom: 16px;
}

.projects-section-grid--code-builder {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.projects-section-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: var(--color-surface-card);
  padding: 14px;
  min-width: 0;
}

.projects-section-card--landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 24px 28px;
  border-radius: 18px;
  border-color: var(--theme-panel-border);
  box-shadow: 0 18px 44px rgba(4, 11, 27, 0.26);
}

.projects-section-card--landing-top {
  background:
    radial-gradient(circle at top right, rgb(var(--theme-primary-rgb) / 14%), transparent 36%),
    linear-gradient(135deg, color-mix(in srgb, var(--theme-surface) 96%, transparent), color-mix(in srgb, var(--theme-surface-lift) 92%, transparent));
}

.projects-section-card--landing-bottom {
  background:
    radial-gradient(circle at bottom right, rgb(var(--theme-accent-rgb) / 10%), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, var(--theme-surface) 96%, transparent), color-mix(in srgb, var(--theme-surface) 84%, var(--theme-accent)));
}

.projects-section-card--status {
  margin-top: 16px;
}

.projects-section-card--sources {
  margin-top: 16px;
  background:
    radial-gradient(circle at top left, rgb(var(--theme-primary-rgb) / 16%), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--theme-surface) 98%, transparent), color-mix(in srgb, var(--theme-surface-deep) 96%, transparent));
}

.projects-section-card--code-builder-log {
  grid-column: 1 / -1;
}

.projects-section-card--code-builder-inspector {
  grid-column: 1 / -1;
}

.projects-code-builder-log {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(134, 199, 234, 0.3);
  border-radius: 10px;
  background: rgba(3, 10, 22, 0.72);
  color: var(--theme-primary-faint);
}

.projects-section-card h3 {
  text-align: left;
  margin: 0 0 10px;
}

.projects-section-card--research-intelligence {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 32px);
  border-color: rgb(var(--theme-accent-rgb) / 56%);
  background:
    radial-gradient(circle at 92% 0%, rgb(var(--theme-accent-rgb) / 22%), transparent 34%),
    radial-gradient(circle at 0% 100%, rgb(var(--theme-primary-rgb) / 13%), transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-surface-lift) 92%, transparent), color-mix(in srgb, var(--theme-surface-deep) 96%, transparent));
  box-shadow: 0 22px 55px rgba(2, 8, 20, 0.34), inset 0 1px 0 rgb(255 255 255 / 5%);
}

.projects-section-card--research-setup-primary {
  margin: 18px 0 16px;
}

.projects-research-opportunity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.projects-research-opportunity-eyebrow {
  margin: 0 0 8px;
  color: var(--theme-accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.projects-section-card--research-intelligence .projects-research-opportunity-header h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.projects-research-opportunity-intro {
  max-width: 690px;
  margin: 11px 0 0;
  color: var(--theme-text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.projects-research-opportunity-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgb(var(--theme-accent-rgb) / 48%);
  border-radius: 999px;
  background: rgb(var(--theme-accent-rgb) / 13%);
  color: var(--theme-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-research-opportunity-spotlight {
  margin-top: 24px;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid rgb(var(--theme-accent-rgb) / 38%);
  border-radius: 16px;
  background: color-mix(in srgb, var(--theme-surface-deep) 76%, transparent);
  box-shadow: inset 4px 0 0 rgb(var(--theme-accent-rgb) / 76%);
}

.projects-research-opportunity-setting {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.projects-research-opportunity-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--theme-primary-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.projects-research-opportunity-setting label {
  color: var(--theme-text);
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  font-weight: 750;
}

.projects-research-opportunity-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.projects-research-opportunity-input.projects-modal-input {
  width: 132px;
  min-height: 74px;
  padding: 8px 12px;
  border-width: 2px;
  border-color: rgb(var(--theme-accent-rgb) / 68%);
  background: rgb(2 8 20 / 58%);
  color: var(--theme-text);
  font-size: 2.15rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.projects-research-opportunity-input.projects-modal-input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgb(var(--theme-accent-rgb) / 18%);
}

.projects-research-opportunity-value > span {
  color: var(--theme-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.projects-research-opportunity-explanation {
  max-width: 800px;
  margin: 18px 0 0;
  color: var(--theme-text-muted);
  line-height: 1.55;
}

.projects-research-opportunity-slider-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.projects-research-opportunity-slider {
  --research-opportunity-track-rest: rgb(var(--theme-primary-rgb) / 20%);
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: grab;
}

.projects-research-opportunity-slider:active {
  cursor: grabbing;
}

.projects-research-opportunity-slider::-webkit-slider-runnable-track {
  height: 10px;
  border: 1px solid rgb(var(--theme-accent-rgb) / 30%);
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--theme-accent) 0%,
    var(--theme-accent) var(--research-opportunity-progress, 0%),
    var(--research-opportunity-track-rest) var(--research-opportunity-progress, 0%),
    var(--research-opportunity-track-rest) 100%
  );
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 42%);
}

.projects-research-opportunity-slider::-moz-range-track {
  height: 10px;
  border: 1px solid rgb(var(--theme-accent-rgb) / 30%);
  border-radius: 999px;
  background: var(--research-opportunity-track-rest);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 42%);
}

.projects-research-opportunity-slider::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--theme-accent);
}

.projects-research-opportunity-slider::-webkit-slider-thumb {
  width: 34px;
  height: 34px;
  margin-top: -13px;
  appearance: none;
  -webkit-appearance: none;
  border: 5px solid var(--theme-accent);
  border-radius: 50%;
  background: var(--theme-surface-deep);
  box-shadow:
    0 0 0 4px rgb(var(--theme-accent-rgb) / 16%),
    0 8px 18px rgb(0 0 0 / 48%);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.projects-research-opportunity-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 5px solid var(--theme-accent);
  border-radius: 50%;
  background: var(--theme-surface-deep);
  box-shadow:
    0 0 0 4px rgb(var(--theme-accent-rgb) / 16%),
    0 8px 18px rgb(0 0 0 / 48%);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.projects-research-opportunity-slider:hover::-webkit-slider-thumb,
.projects-research-opportunity-slider:focus-visible::-webkit-slider-thumb,
.projects-research-opportunity-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow:
    0 0 0 7px rgb(var(--theme-accent-rgb) / 20%),
    0 10px 22px rgb(0 0 0 / 52%);
}

.projects-research-opportunity-slider:hover::-moz-range-thumb,
.projects-research-opportunity-slider:focus-visible::-moz-range-thumb,
.projects-research-opportunity-slider:active::-moz-range-thumb {
  transform: scale(1.1);
  box-shadow:
    0 0 0 7px rgb(var(--theme-accent-rgb) / 20%),
    0 10px 22px rgb(0 0 0 / 52%);
}

.projects-research-opportunity-slider:focus-visible {
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgb(var(--theme-accent-rgb) / 22%);
}

.projects-research-opportunity-live-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 142px;
  color: var(--theme-text-muted);
  font-size: 0.75rem;
}

.projects-research-opportunity-live-value strong {
  color: var(--theme-accent);
  font-size: 1.35rem;
  line-height: 1;
}

.projects-research-opportunity-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.projects-research-opportunity-scale span {
  padding-top: 9px;
  border-top: 2px solid rgb(var(--theme-primary-rgb) / 24%);
  color: var(--theme-text-muted);
  font-size: 0.72rem;
}

.projects-research-opportunity-scale span:last-child {
  border-top-color: rgb(var(--theme-accent-rgb) / 72%);
  color: var(--theme-accent);
}

.projects-research-opportunity-scale strong {
  display: block;
  margin-bottom: 2px;
  color: var(--theme-text);
  font-size: 0.88rem;
}

.projects-research-opportunity-consequence {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgb(var(--theme-accent-rgb) / 9%);
  color: var(--theme-text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.projects-research-opportunity-consequence strong {
  color: var(--theme-accent);
  white-space: nowrap;
}

.projects-research-supporting-controls {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgb(var(--theme-primary-rgb) / 18%);
}

.projects-research-supporting-controls h4 {
  margin: 0 0 16px;
  color: var(--theme-text);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .projects-research-opportunity-header,
  .projects-research-opportunity-setting {
    align-items: stretch;
    flex-direction: column;
  }

  .projects-research-opportunity-badge {
    align-self: flex-start;
  }

  .projects-research-opportunity-value {
    align-items: center;
  }

  .projects-research-opportunity-slider-shell {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .projects-research-opportunity-scale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-research-opportunity-consequence {
    grid-template-columns: 1fr;
  }
}

.projects-section-card--landing h3 {
  font-family: var(--font-family-ui);
  font-weight: 500;
  margin: 0;
  font-size: clamp(1.95rem, 2.7vw, 2.8rem);
  line-height: 1.05;
}

.projects-landing-card-body {
  display: grid;
  gap: 10px;
  align-content: start;
}

.projects-landing-card-label {
  margin: 0;
  color: var(--theme-primary-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.projects-landing-card-subheader {
  margin: -2px 0 0;
  color: #bfd0e8;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.projects-landing-card-detail {
  margin: 0;
  max-width: 780px;
  color: #d9e6f7;
  font-size: 1.02rem;
  line-height: 1.6;
}

.code-builder-inspector-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.code-builder-inspector-heading h3 {
  margin: 0;
}

.code-builder-inspector-status {
  flex: 0 0 auto;
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--theme-primary-faint);
  background: rgba(30, 64, 119, 0.38);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.code-builder-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
}

.code-builder-inspector-row {
  min-width: 0;
}

.code-builder-inspector-row dt {
  color: #9fb6d4;
  font-size: 0.76rem;
  margin-bottom: 2px;
}

.code-builder-inspector-row dd {
  margin: 0;
  min-width: 0;
}

.code-builder-inspector-row code {
  display: block;
  overflow-wrap: anywhere;
  color: #e5edf7;
  background: rgba(8, 15, 30, 0.62);
  border: 1px solid rgba(117, 154, 202, 0.24);
  border-radius: 6px;
  padding: 4px 6px;
}

.code-builder-inspector-diagnostics {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 8px;
  background: rgba(73, 53, 18, 0.25);
  color: #fde68a;
}

.code-builder-inspector-diagnostics p {
  margin: 0;
}

.code-builder-inspector-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.code-builder-inspector-detail {
  border: 1px solid rgba(134, 199, 234, 0.26);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.42);
  overflow: hidden;
}

.code-builder-inspector-detail--diagnostic {
  border-color: rgba(250, 204, 21, 0.34);
}

.code-builder-inspector-detail summary {
  cursor: pointer;
  padding: 9px 11px;
  color: var(--theme-primary-faint);
  font-weight: 700;
}

.code-builder-inspector-pre {
  max-height: 420px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px solid rgba(134, 199, 234, 0.18);
  color: var(--theme-primary-faint);
  background: rgba(3, 10, 22, 0.72);
}

.projects-sources-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.projects-source-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.projects-source-summary-card {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-primary-pale) 20.0%, transparent);
  color: var(--theme-primary-soft);
}

.projects-source-summary-card strong {
  color: var(--theme-text);
  font-size: 1.65rem;
}

.projects-source-add {
  margin-top: 14px;
}

.projects-source-add > summary {
  cursor: pointer;
  list-style: none;
}

.projects-source-add > summary::-webkit-details-marker {
  display: none;
}

.projects-source-toggle {
  display: inline-flex;
  width: fit-content;
}

.projects-source-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(260px, 1.7fr) minmax(170px, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-primary-pale) 20.0%, transparent);
}

.projects-source-form-field--wide {
  grid-column: span 2;
}

.projects-source-form-actions {
  display: flex;
  align-items: flex-end;
}

.projects-source-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.projects-source-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(240px, 1.8fr) minmax(150px, 1fr) minmax(110px, 0.8fr) minmax(160px, 1fr) minmax(90px, 0.6fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(30, 64, 175, 0.32), rgb(var(--theme-accent-rgb) / 20.0%)),
    rgb(var(--theme-surface-rgb) / 72.0%);
  color: var(--theme-primary-faint);
}

.projects-source-row--header {
  padding-top: 2px;
  padding-bottom: 2px;
  background: transparent;
  color: var(--theme-primary-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-source-name {
  color: var(--theme-text);
  font-weight: 700;
}

.projects-source-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-source-url--link,
.projects-source-location-link {
  color: var(--theme-accent-soft);
}

.projects-source-row > span {
  min-width: 0;
}

.projects-source-row > span > small {
  display: block;
  margin-top: 4px;
  color: var(--theme-text-secondary);
}

.projects-source-row--candidate {
  grid-template-columns: minmax(260px, 1.8fr) minmax(180px, 1.15fr) minmax(115px, 0.7fr) minmax(180px, 1fr) minmax(110px, 0.65fr);
}

.projects-source-row--raw-data {
  grid-template-columns: minmax(180px, 1.3fr) minmax(110px, 0.7fr) minmax(80px, 0.5fr) minmax(180px, 1.2fr) minmax(170px, 1fr);
}

.projects-source-chip {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.projects-source-chip--enabled {
  background: rgb(var(--theme-accent-rgb) / 20.0%);
  color: var(--theme-accent-soft);
}

.projects-source-chip--paused {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.projects-source-chip--neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.projects-source-chip--admitted {
  background: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
}

.projects-source-empty {
  padding: 13px 14px;
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 62.0%);
  color: var(--theme-text-secondary);
}

@media (max-width: 1180px) {
  .projects-source-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-source-form,
  .projects-source-row {
    grid-template-columns: 1fr;
  }

  .projects-source-form-field--wide {
    grid-column: auto;
  }

  .projects-source-row--header {
    display: none;
  }
}

@media (max-width: 680px) {
  .projects-source-summary {
    grid-template-columns: 1fr;
  }
}

.projects-status-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.projects-status-subtitle {
  margin: 4px 0 0;
  color: var(--theme-primary-pale);
  opacity: 0.85;
}

.projects-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.projects-status-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 18.0%, transparent);
}

.projects-status-item--wide {
  grid-column: 1 / -1;
}

.projects-status-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
}

.projects-status-value {
  color: var(--theme-text);
  line-height: 1.5;
}

.projects-status-value-warning {
  color: #facc15;
  font-weight: 600;
}

.projects-status-summary {
  margin: 14px 0 0;
  color: var(--theme-primary-faint);
  line-height: 1.6;
}

.projects-status-actions {
  margin-top: 14px;
}

.projects-status-actions strong {
  color: var(--theme-text);
}

.projects-status-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--theme-primary-faint);
}

.projects-status-list li + li {
  margin-top: 6px;
}

.projects-checkpoints-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.projects-final-deliverable-card {
  margin-bottom: 18px;
  border: 1px solid rgba(214, 171, 72, 0.32);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(24, 35, 58, 0.96), rgba(9, 17, 32, 0.98));
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28), 0 0 26px rgba(214, 171, 72, 0.06);
}

.projects-final-deliverable-disclosure > summary {
  list-style: none;
}

.projects-final-deliverable-disclosure > summary::-webkit-details-marker {
  display: none;
}

.projects-final-deliverable-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  color: #f8f3e7;
  cursor: pointer;
  user-select: none;
}

.projects-final-deliverable-summary > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.projects-final-deliverable-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.projects-final-deliverable-summary__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(239, 204, 118, 0.92);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.projects-final-deliverable-summary__status::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(239, 204, 118, 0.35);
  border-radius: 999px;
  color: #f6d98e;
  font-size: 1rem;
  line-height: 1;
}

.projects-final-deliverable-disclosure[open] .projects-final-deliverable-summary__status::after {
  content: "\2212";
}

.projects-final-deliverable-content {
  padding: 0 22px 24px;
  border-top: 1px solid rgba(214, 171, 72, 0.18);
}

.projects-final-deliverable-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 18px;
}

.projects-final-deliverable-toolbar h3 {
  margin: 5px 0 0;
  color: #f8f3e7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.25;
}

.projects-final-deliverable-download {
  flex: 0 0 auto;
}

.projects-final-deliverable-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.projects-final-deliverable-title-link {
  color: inherit;
  text-decoration-color: rgba(239, 204, 118, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.projects-final-deliverable-title-link:hover,
.projects-final-deliverable-title-link:focus-visible {
  color: var(--theme-text);
  text-decoration-color: rgba(239, 204, 118, 0.9);
}

.projects-deliverable-shell {
  min-height: calc(100dvh - 56px);
}

.projects-deliverable-page .projects-final-deliverable-card {
  margin-bottom: 0;
}

.projects-final-deliverable-card--reader .projects-final-deliverable-content {
  min-height: calc(100dvh - 280px);
}

.projects-final-deliverable-card--reader .projects-final-deliverable-document {
  max-width: 1080px;
  min-height: calc(100dvh - 410px);
}

.projects-final-deliverable-document {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(219, 228, 246, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  color: #1c2738;
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.26);
}

.projects-final-deliverable-document .message-markdown {
  gap: 1rem;
  color: #1c2738;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.72;
}

.projects-final-deliverable-document .message-markdown h2,
.projects-final-deliverable-document .message-markdown h3,
.projects-final-deliverable-document .message-markdown h4 {
  color: #101827;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
}

.projects-final-deliverable-document .message-markdown h2 {
  margin-top: 0.65rem;
  font-size: 1.55rem;
}

.projects-final-deliverable-document .message-markdown h3 {
  margin-top: 0.5rem;
  font-size: 1.25rem;
}

.projects-final-deliverable-document .message-markdown a {
  color: #1d4f91;
}

.projects-final-deliverable-document .message-markdown-table {
  border-color: rgba(51, 65, 85, 0.24);
  color: #1c2738;
}

.projects-final-deliverable-document .message-markdown-table th,
.projects-final-deliverable-document .message-markdown-table td {
  border-color: rgba(51, 65, 85, 0.18);
}

.projects-final-deliverable-document .message-markdown-table th {
  background: rgba(226, 232, 240, 0.72);
  color: #111827;
}

.projects-final-deliverable-pending {
  margin: 22px 0 0;
  color: rgb(var(--theme-text-rgb) / 76%);
  line-height: 1.6;
}

@media (max-width: 760px) {
  .message-bubble--final-deliverable {
    width: 100%;
    max-width: 100%;
  }

  .project-final-deliverable-attachment {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
  }

  .project-final-deliverable-attachment__icon {
    width: 44px;
    height: 54px;
  }

  .projects-final-deliverable-summary,
  .projects-final-deliverable-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .projects-final-deliverable-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .projects-final-deliverable-document {
    padding: 22px 18px;
  }
}

.projects-checkpoint-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.projects-checkpoint-card {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
  padding: 14px;
}

.projects-checkpoint-card--list {
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
}

.projects-checkpoint-card__visual {
  min-width: 0;
}

.projects-checkpoint-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.projects-checkpoint-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--theme-text);
}

.projects-checkpoint-image,
.projects-checkpoint-hero-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 20.0%, transparent);
  object-fit: cover;
}

.projects-checkpoint-image {
  aspect-ratio: 16 / 10;
}

.projects-checkpoint-hero-image {
  max-height: 360px;
}

.projects-checkpoint-placeholder,
.projects-checkpoint-hero-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 180px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--theme-primary-soft) 35.0%, transparent);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgb(var(--theme-surface-rgb) / 96.0%));
  color: var(--theme-primary-faint);
  padding: 20px;
  text-align: center;
}

.projects-checkpoint-hero {
  display: grid;
  gap: 16px;
}

.projects-checkpoint-hero-placeholder {
  min-height: 280px;
}

.projects-checkpoint-summary {
  margin: 0;
  color: var(--theme-primary-faint);
  line-height: 1.6;
}

.projects-checkpoint-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.projects-checkpoint-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.projects-checkpoint-detail-note {
  display: block;
  margin-top: 6px;
  color: var(--theme-primary-soft);
  opacity: 0.9;
}

.projects-node-list {
  display: grid;
  gap: 12px;
}

.projects-node-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
  padding: 14px;
}

.projects-node-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.projects-node-subtitle {
  margin: 4px 0 0;
  opacity: 0.8;
}

.projects-node-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.projects-node-metadata span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--theme-primary-faint);
  font-size: 0.86rem;
  min-width: 0;
}

.projects-knowledge-list {
  display: grid;
  gap: 14px;
}

.projects-knowledge-card,
.projects-knowledge-run-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 50.0%);
  padding: 14px;
}

.projects-knowledge-header,
.projects-knowledge-run-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.projects-knowledge-subtitle {
  margin: 4px 0 0;
  opacity: 0.84;
}

.projects-knowledge-summary {
  margin: 12px 0;
  color: #dbe7fb;
  line-height: 1.5;
}

.projects-knowledge-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.projects-knowledge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.72);
  color: var(--theme-primary-faint);
  font-size: 0.84rem;
}

.projects-knowledge-chip-info {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 30.0%, transparent);
  color: var(--theme-primary-pale);
}

.projects-knowledge-chip-success {
  border-color: rgba(74, 222, 128, 0.28);
  color: #bbf7d0;
}

.projects-knowledge-chip-warning {
  border-color: rgba(250, 204, 21, 0.3);
  color: #fde68a;
}

.projects-knowledge-chip-danger {
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

.projects-knowledge-runs {
  margin-top: 12px;
}

.projects-knowledge-runs h4 {
  margin: 0 0 10px;
}

.projects-knowledge-run-list {
  display: grid;
  gap: 10px;
}

.projects-knowledge-empty {
  margin: 12px 0 0;
  opacity: 0.84;
}

.run-timeline-list {
  display: grid;
  gap: 16px;
}

.run-timeline-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: rgba(9, 18, 34, 0.55);
  padding: 16px;
}

.run-timeline-header,
.run-task-header,
.run-graph-node-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.run-timeline-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.run-timeline-header h4 {
  margin: 0 0 4px;
}

.run-timeline-subtitle,
.run-task-meta,
.run-graph-node-meta {
  opacity: 0.82;
  font-size: 0.92rem;
}

.run-task-operator,
.operator-decision-row,
.task-list-inline-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.run-task-operator,
.task-list-inline-badges {
  margin-top: 8px;
}

.operator-decision-summary,
.task-list-inline-meta {
  opacity: 0.86;
  font-size: 0.88rem;
  line-height: 1.35;
}

.task-list-title-stack {
  display: grid;
  gap: 4px;
}

.task-list-inline-meta {
  max-width: 32ch;
}

.run-timeline-events {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.run-timeline-event-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.run-timeline-icon {
  width: 22px;
  text-align: center;
  flex: 0 0 22px;
}

.run-task-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.run-task-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.run-task-card-pending {
  border-color: var(--theme-panel-border);
}

.run-task-card-blocked {
  border-color: rgba(255, 120, 120, 0.32);
  background: rgba(120, 15, 15, 0.12);
}

.run-task-card-done {
  border-color: rgba(110, 210, 170, 0.25);
}

.run-task-card-active {
.provider-settings-page .provider-long-value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .provider-settings-page .provider-long-value {
    white-space: normal;
  }
}
  border-color: rgba(123, 170, 255, 0.28);
}

.run-task-events {
  margin: 10px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.run-task-events li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.run-payload-panel {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 10px;
}

.run-payload-panel-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.68;
  font-weight: 700;
}

.run-payload-block {
  display: grid;
  gap: 10px;
}

.run-payload-block-nested {
  margin-top: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.run-payload-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.run-payload-key,
.run-payload-group-label {
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0.88;
}

.run-payload-value {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.run-payload-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.run-payload-pill-info {
  color: var(--theme-text-secondary);
  border-color: rgba(123, 170, 255, 0.22);
}

.run-payload-pill-success {
  color: #b7f5d8;
  border-color: rgba(110, 210, 170, 0.24);
}

.run-payload-pill-warning {
  color: #f9dd9b;
  border-color: rgba(246, 196, 92, 0.24);
}

.run-payload-pill-danger {
  color: #ffb4b4;
  border-color: rgba(255, 120, 120, 0.24);
}

.run-payload-pill-neutral {
  color: #d8e0f0;
  border-color: rgba(255, 255, 255, 0.16);
}

.run-payload-group {
  display: grid;
  gap: 8px;
}

.run-payload-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.run-payload-list li {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.run-payload-code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-family-mono);
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.run-detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.run-detail-summary-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.run-detail-summary-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.run-detail-latest-event {
  margin-top: 8px;
}

.run-graph {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.run-graph-node {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.run-graph-node-pending {
  border-color: rgba(255, 255, 255, 0.12);
}

.run-graph-node-blocked {
  border-color: rgba(255, 120, 120, 0.32);
}

.run-graph-node-done {
  border-color: rgba(110, 210, 170, 0.25);
}

.run-graph-node-active {
  border-color: rgba(123, 170, 255, 0.28);
}

.run-graph-edge {
  text-align: center;
  opacity: 0.85;
  font-size: 0.9rem;
}

.run-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.run-state-badge-done {
  color: #a7f3d0;
  border-color: rgba(110, 210, 170, 0.26);
}

.run-state-badge-blocked {
  color: #ffb4b4;
  border-color: rgba(255, 120, 120, 0.26);
}

.run-state-badge-active {
  color: var(--theme-text-secondary);
  border-color: rgba(123, 170, 255, 0.26);
}

.run-state-badge-pending {
  color: #d5def0;
  border-color: rgba(255, 255, 255, 0.16);
}

.projects-section-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.projects-section-card--landing .projects-section-actions {
  align-self: end;
  justify-content: flex-end;
  margin-bottom: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgb(var(--theme-surface-rgb) / 55.0%);
  color: #dbe6f8;
  font-size: 0.95rem;
}

.projects-feature-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.editor-surface {
  height: 560px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  overflow: hidden;
}

.workspace-row.is-file {
  cursor: pointer;
}

.workspace-row.is-file:hover {
  background: rgba(255,255,255,0.04);
}

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-status {
  opacity: 0.85;
}

.editor-status[data-level="ok"] { color: #86efac; }
.editor-status[data-level="warn"] { color: #fde68a; }
.editor-status[data-level="error"] { color: #fca5a5; }

@media (max-width: 760px) {
  .projects-index-nav-row {
    margin-bottom: 10px;
  }

  .projects-index-nav-row--outlined-pills .projects-index-nav-actions {
    gap: 10px;
  }

  .projects-index-nav-row--outlined-pills .navbar-button {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .projects-index-title-row--selected {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
  }

  .projects-index-title-row--selected h2 {
    grid-column: 1;
  }

  .projects-index-title-action {
    justify-self: start;
  }

  .projects-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-project-heading-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .projects-project-heading-row--with-research {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .projects-project-heading-row--with-research .projects-project-heading-main,
  .projects-project-heading-row--with-research .projects-project-heading-actions {
    justify-self: center;
  }

  .projects-project-heading-row--with-research .conversation-research-divider {
    display: none;
  }

  .projects-project-heading-title {
    justify-content: center;
    text-align: center;
  }

  .projects-project-heading-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .projects-title-row h2 {
    text-align: center;
  }

  .projects-title-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .run-payload-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.projects-selected-label {
  margin: 8px 0 4px;
  text-align: center;
  color: var(--theme-text-secondary);
}

.projects-notice,
.projects-alert {
  position: relative;
  max-width: 680px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.projects-notice {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #dcfce7;
}

.projects-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fee2e2;
}

.home-project-warning p {
  margin: 0;
}

.home-project-warning-actions {
  margin-top: 12px;
}

.home-project-warning-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-project-responder-alert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.home-project-responder-alert strong {
  color: #fecaca;
}

.dismissible-banner {
  position: relative;
  transition: opacity 220ms ease, transform 220ms ease;
}

.dismissible-banner.is-dismissed {
  opacity: 0;
  transform: translateY(-8px);
}

.dismissible-banner.is-auto-dismissing {
  transition-duration: 3s;
  transition-timing-function: ease;
}

.dismissible-banner-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 45.0%);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transform: var(--dismissible-banner-close-transform, none);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.dismissible-banner-close:hover,
.dismissible-banner-close:focus-visible {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(191, 219, 254, 0.48);
  transform: var(--dismissible-banner-close-hover-transform, translateY(-1px));
  outline: none;
}

.dismissible-banner-close-glyph {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  font-size: 0;
  line-height: 0;
}

.dismissible-banner-close-glyph::before,
.dismissible-banner-close-glyph::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.dismissible-banner-close-glyph::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dismissible-banner-close-glyph::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dismissible-banner-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dismissible-banner-title {
  display: block;
}

.projects-notice.dismissible-banner,
.projects-alert.dismissible-banner,
.mcp-dashboard-flash.dismissible-banner {
  padding-right: 50px;
}

.projects-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 17, 0.65);
  backdrop-filter: blur(1px);
}

.projects-modal-card {
  width: min(560px, calc(100vw - 40px));
  padding: 20px;
  border-radius: 12px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.projects-modal-card h3 {
  margin: 0 0 14px;
  text-align: center;
}

.projects-modal-section-heading {
  margin-top: 18px !important;
}

.projects-modal-label {
  display: block;
  margin: 0 0 6px;
  color: var(--theme-text);
  font-weight: 600;
}

.projects-modal-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--theme-border-choice);
  background: var(--theme-surface-deep);
  color: var(--theme-text);
  padding: 10px 12px;
}

.projects-modal-textarea {
  min-height: 140px;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}

.projects-modal-help {
  margin: 10px 0 0;
  color: var(--theme-text-secondary);
  font-size: 0.95rem;
  line-height: 1.35;
}

.projects-autonomy-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.projects-autonomy-quick-pick {
  border: 1px solid #365176;
  background: rgba(22, 32, 54, 0.95);
  color: var(--theme-text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.projects-autonomy-quick-pick:hover {
  background: rgba(34, 50, 79, 0.98);
  border-color: #4f7097;
}

.projects-autonomy-quick-pick.is-active {
  background: #17324c;
  border-color: #7fb0dd;
  box-shadow: 0 0 0 1px rgba(127, 176, 221, 0.25);
  transform: translateY(-1px);
}

.blueprint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blueprint-editor-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--theme-border-choice);
  background: var(--theme-surface-deep);
  color: var(--theme-text);
  padding: 10px 12px;
  font-family: var(--font-family-mono);
  line-height: 1.4;
}

.blueprint-danger-row {
  justify-content: flex-start;
  margin-top: 8px;
}

.projects-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.conversation-delete-confirmation-card {
  width: min(560px, calc(100vw - 40px));
  text-align: left;
}

.conversation-delete-confirmation-overlay {
  z-index: 20050;
}

.conversation-delete-confirmation-overlay[hidden] {
  display: none !important;
}

.conversation-delete-confirmation-card h3 {
  text-align: center;
}

.conversation-delete-confirmation-actions {
  flex-wrap: wrap;
}

.dashboard-section {
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-campaign-note {
  margin: 0 0 14px;
  color: var(--color-text-secondary);
  font-size: 0.96rem;
}

.dashboard-campaign-note em {
  color: var(--theme-text);
  font-style: italic;
  letter-spacing: 0.01em;
}

.dashboard-eyebrow,
.dashboard-card-eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
}

.dashboard-hero {
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgb(var(--theme-primary-rgb) / 12%), transparent 34%),
    linear-gradient(135deg, var(--color-surface-card-lifted), color-mix(in srgb, var(--theme-surface-deep) 90%, transparent));
}

.dashboard-hero h1 {
  margin: 0;
  font-family: var(--font-family-ui);
  font-weight: 500;
  text-align: left;
}

.dashboard-hero-copy {
  margin: 10px 0 0;
  max-width: 700px;
  color: var(--color-text-secondary);
}

.dashboard-hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-cards-row {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: var(--color-surface-card);
  padding: 20px;
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-card-header h3,
.dashboard-activity-card h3 {
  margin: 0;
  text-align: left;
}

.dashboard-card-stat {
  min-width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-control);
  border: 1px solid var(--color-border-control);
  color: #e0f2fe;
  font-size: 1.4rem;
  font-weight: 700;
}

.dashboard-card-stat--danger {
  background: rgba(220, 38, 38, 0.18);
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecaca;
}

.dashboard-card-copy {
  margin: 0;
  color: var(--color-text-secondary);
}

.temporal-hil-review__surface {
  border: 1px solid var(--theme-panel-border);
  border-radius: 8px;
  background: rgba(13, 23, 42, 0.72);
  padding: 18px;
}

.temporal-hil-review__surface-header,
.temporal-hil-review__surface-summary {
  display: grid;
  gap: 12px;
}

.temporal-hil-review__surface-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.temporal-hil-review__surface-header h3 {
  margin: 0;
}

.temporal-hil-review__status-pill {
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 42.0%, transparent);
  border-radius: 999px;
  color: var(--theme-primary-pale);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.temporal-hil-review__surface-copy,
.temporal-hil-review__surface-warning {
  color: var(--theme-primary-faint);
  line-height: 1.5;
  margin: 12px 0 0;
}

.temporal-hil-review__surface-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.temporal-hil-review__surface-summary div {
  min-width: 0;
}

.temporal-hil-review__surface-summary dt {
  color: var(--theme-primary-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.temporal-hil-review__surface-summary dd {
  color: var(--theme-text);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.temporal-hil-review__surface-panel {
  margin-top: 14px;
}

.temporal-hil-review__surface-panel h4 {
  color: var(--theme-text);
  margin: 0 0 8px;
}

.temporal-hil-review__surface-warning {
  border-top: 1px solid rgba(125, 166, 255, 0.24);
  padding-top: 12px;
}

.temporal-hil-review__decision {
  border: 1px solid rgba(74, 222, 128, 0.24);
  border-radius: 8px;
  background: rgba(13, 42, 31, 0.42);
  padding: 18px;
}

.temporal-hil-review__grant-issuance {
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 28.0%, transparent);
  border-radius: 8px;
  background: rgba(15, 35, 62, 0.44);
  padding: 18px;
}

.temporal-hil-review__fill-proof {
  border: 1px solid rgb(var(--theme-accent-rgb) / 28.0%);
  border-radius: 8px;
  background: rgba(15, 52, 57, 0.42);
  padding: 18px;
}

.temporal-hil-review__decision-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.temporal-hil-review__decision-header h3 {
  margin: 0;
}

.temporal-hil-review__decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.temporal-hil-review__decision-form {
  margin: 0;
}

.submission-review-home,
.submission-review-show {
  margin: 24px;
}

.submission-review-home__list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.submission-review-home__item {
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr) auto;
  padding: 16px;
}

.submission-review-home__item:not(.submission-review-home__item--compact) .navbar-button {
  background: var(--color-accent-warm-soft);
  border-color: var(--color-accent-warm-border);
  color: #fff7d6;
}

.submission-review-home__item h3 {
  color: var(--theme-text);
  margin: 0;
}

.submission-review-home__item--compact {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr) auto;
}

.submission-review-home__selected-option {
  color: var(--theme-primary-pale);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 8px 0 0;
}

.submission-review-home__section-title {
  color: var(--theme-text);
  font-size: 1rem;
  margin: 18px 0 0;
}

.submission-review-home__facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.submission-review-home__facts dt {
  color: var(--theme-primary-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.submission-review-home__facts dd {
  color: var(--theme-text);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.submission-review-show__actions {
  margin-bottom: 16px;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.mailbox-workspace {
  background: rgb(var(--theme-canvas-rgb) / 72%);
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 0;
}

.main-content-area.action-bar-layout > .home-content.inbox-content {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.home-content.inbox-content .home-content-inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.mailbox-nav {
  background: var(--color-surface-card);
  border-right: 1px solid var(--color-border-subtle);
  box-sizing: border-box;
  min-width: 0;
  padding: 18px 12px;
}

.mailbox-nav__compose {
  align-items: center;
  background: var(--theme-primary);
  border: 1px solid var(--color-border-active);
  border-radius: 8px;
  color: var(--theme-text);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  width: 132px;
}

.mailbox-nav__compose:hover,
.mailbox-nav__compose:focus-visible {
  background: var(--theme-primary-soft);
  border-color: var(--theme-primary-pale);
  color: var(--theme-canvas-deep);
}

.mailbox-nav__folders {
  display: grid;
  gap: 2px;
  margin-top: 18px;
}

.mailbox-nav__link {
  align-items: center;
  border-left: 3px solid transparent;
  color: var(--theme-text-secondary);
  display: grid;
  font-size: 0.84rem;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 0 10px;
  text-decoration: none;
}

.mailbox-nav__link:hover,
.mailbox-nav__link:focus-visible {
  background: rgb(var(--theme-primary-rgb) / 14%);
  color: var(--theme-text);
}

.mailbox-nav__link.is-active {
  background: rgb(var(--theme-primary-rgb) / 24%);
  border-left-color: var(--theme-primary-soft);
  color: var(--theme-text);
  font-weight: 750;
}

.mailbox-nav__link strong {
  color: var(--theme-primary-soft);
  font-size: 0.72rem;
}

.mailbox-nav__link--category {
  padding-left: 20px;
}

.mailbox-nav__section-label {
  color: var(--theme-text-muted);
  font-size: 0.69rem;
  font-weight: 750;
  margin: 17px 10px 5px;
  text-transform: uppercase;
}

.mailbox-main {
  min-width: 0;
  padding: 18px 18px 32px;
}

.mailbox-main__heading {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 4px 14px;
}

.mailbox-main__heading p {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.mailbox-main__heading h1 {
  color: var(--theme-text);
  font-size: 1.18rem;
  margin: 0;
  text-align: left;
}

.mailbox-main__counts {
  color: var(--theme-text-muted);
  display: flex;
  font-size: 0.74rem;
  gap: 15px;
}

.mailbox-main__counts strong {
  color: var(--theme-text);
}

.mailbox-list-form {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  min-height: 420px;
  overflow: hidden;
}

.mailbox-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  gap: 7px;
  min-height: 50px;
  padding: 0 12px;
}

.mailbox-toolbar__select {
  align-items: center;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.mailbox-toolbar input[type="checkbox"],
.mailbox-row input[type="checkbox"] {
  accent-color: var(--theme-primary);
  height: 16px;
  margin: 0;
  width: 16px;
}

.mailbox-toolbar__button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--color-border-control);
  border-radius: 6px;
  color: var(--theme-text-secondary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.73rem;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  text-decoration: none;
}

.mailbox-toolbar__button:hover,
.mailbox-toolbar__button:focus-visible {
  background: var(--color-surface-control);
  border-color: var(--color-border-active);
  color: var(--theme-text);
}

.mailbox-toolbar__button:disabled {
  cursor: default;
  opacity: 0.38;
}

.mailbox-toolbar__button--danger:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
}

.mailbox-toolbar__selection {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  margin-left: 5px;
}

.mailbox-toolbar__range {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  margin-left: auto;
}

.mailbox-list {
  width: 100%;
}

.mailbox-row {
  align-items: center;
  background: rgb(var(--theme-surface-rgb) / 76%);
  border-bottom: 1px solid var(--color-border-subtle);
  display: grid;
  gap: 10px;
  grid-template-columns: 30px 8px minmax(112px, 0.24fr) minmax(220px, 1fr) 68px;
  min-height: 48px;
  padding: 0 12px;
}

.mailbox-row:hover {
  background: rgb(var(--theme-primary-rgb) / 12%);
}

.mailbox-row.is-unread {
  background: rgb(var(--theme-primary-rgb) / 18%);
}

.mailbox-row.is-unread:hover {
  background: rgb(var(--theme-primary-rgb) / 24%);
}

.mailbox-row__select {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.mailbox-row__status {
  background: rgb(var(--theme-text-rgb) / 44%);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.mailbox-row.is-unread .mailbox-row__status {
  background: var(--theme-primary-soft);
}

.mailbox-row.is-action-required .mailbox-row__status {
  background: #e8b85c;
}

.mailbox-row__correspondent {
  color: var(--theme-text);
  font-size: 0.79rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-row__content {
  min-width: 0;
}

.mailbox-row__content > div:first-child {
  align-items: baseline;
  display: flex;
  min-width: 0;
}

.mailbox-row__subject {
  color: var(--theme-text);
  flex: 0 1 auto;
  font-size: 0.8rem;
  font-weight: 720;
  max-width: 52%;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-row__subject:hover,
.mailbox-row__subject:focus-visible {
  text-decoration: underline;
}

.mailbox-row__preview {
  color: var(--theme-text-muted);
  flex: 1 1 auto;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-row__labels {
  display: flex;
  gap: 6px;
  margin-top: 3px;
  overflow: hidden;
}

.mailbox-row__labels span {
  background: rgb(var(--theme-primary-rgb) / 12%);
  border-radius: 4px;
  color: var(--theme-text-muted);
  flex: 0 0 auto;
  font-size: 0.62rem;
  padding: 2px 5px;
}

.mailbox-row__labels .is-attention {
  background: rgba(214, 168, 79, 0.2);
  color: #f5d58d;
}

.mailbox-row__time {
  color: var(--theme-text-muted);
  font-size: 0.71rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.mailbox-empty {
  align-content: center;
  color: var(--theme-text-muted);
  display: grid;
  justify-items: center;
  min-height: 360px;
  padding: 28px;
  text-align: center;
}

.mailbox-empty h2 {
  color: var(--theme-text);
  font-size: 1rem;
  margin: 0;
}

.mailbox-empty p {
  margin: 7px 0 0;
}

.mailbox-compose {
  background: var(--theme-surface);
  border: 1px solid var(--color-border-control);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.46);
  color: var(--theme-text);
  height: min(610px, calc(100vh - 92px));
  inset: auto 24px 0 auto;
  margin: 0;
  max-height: none;
  max-width: calc(100vw - 32px);
  padding: 0;
  width: 560px;
}

.mailbox-compose::backdrop {
  background: rgb(var(--theme-canvas-rgb) / 42%);
}

.mailbox-compose__form {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  height: 100%;
}

.mailbox-compose__header {
  align-items: center;
  background: rgb(var(--theme-primary-rgb) / 16%);
  display: flex;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
}

.mailbox-compose__header h2 {
  font-size: 0.82rem;
  margin: 0;
}

.mailbox-compose__close {
  background: transparent;
  border: 0;
  color: var(--theme-text-muted);
  cursor: pointer;
  font-size: 0.72rem;
}

.mailbox-compose__error {
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
  margin: 0;
  padding: 9px 14px;
}

.mailbox-compose__field {
  align-items: center;
  border-bottom: 1px solid var(--color-border-subtle);
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 42px;
  padding: 0 14px;
}

.mailbox-compose__field span {
  color: var(--theme-text-muted);
  font-size: 0.76rem;
}

.mailbox-compose__field input,
.mailbox-compose__body textarea {
  background: transparent;
  border: 0;
  color: var(--theme-text);
  font: inherit;
  outline: 0;
  width: 100%;
}

.mailbox-compose__body {
  display: block;
  min-height: 0;
  padding: 14px;
}

.mailbox-compose__body textarea {
  box-sizing: border-box;
  height: 100%;
  line-height: 1.5;
  resize: none;
}

.mailbox-compose__footer {
  align-items: center;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  gap: 8px;
  min-height: 54px;
  padding: 0 14px;
}

.mailbox-compose__send,
.mailbox-compose__draft {
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  min-height: 34px;
  padding: 0 15px;
}

.mailbox-compose__send {
  background: var(--theme-primary);
  border: 1px solid var(--color-border-active);
  color: var(--theme-text);
  font-weight: 750;
}

.mailbox-compose__draft {
  background: transparent;
  border: 1px solid var(--color-border-control);
  color: var(--theme-primary-faint);
}

.mailbox-reader {
  min-width: 0;
  padding: 18px;
}

.mailbox-reader__message {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  margin-top: 12px;
  min-height: 360px;
  padding: 24px;
}

.mailbox-reader__message header > p {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.mailbox-reader__message h1 {
  color: var(--theme-text);
  font-size: 1.3rem;
  margin: 7px 0 14px;
}

.mailbox-reader__message dl {
  color: var(--theme-text-muted);
  display: grid;
  font-size: 0.76rem;
  gap: 5px;
  margin: 0;
}

.mailbox-reader__message dl div {
  display: grid;
  gap: 8px;
  grid-template-columns: 42px minmax(0, 1fr);
}

.mailbox-reader__message dd {
  color: var(--theme-text);
  margin: 0;
}

.mailbox-reader__body {
  border-top: 1px solid var(--color-border-subtle);
  color: var(--theme-text);
  line-height: 1.65;
  margin-top: 20px;
  padding-top: 20px;
}

@media (max-width: 760px) {
  .temporal-hil-review__surface-header,
  .temporal-hil-review__surface-summary,
  .temporal-hil-review__decision-header {
    grid-template-columns: 1fr;
  }

  .temporal-hil-review__status-pill {
    justify-self: start;
  }

  .submission-review-home,
  .submission-review-show {
    margin: 16px;
  }

  .submission-review-home__item {
    grid-template-columns: 1fr;
  }

  .mailbox-workspace {
    align-content: start;
    grid-template-columns: 1fr;
  }

  .mailbox-nav {
    border-bottom: 1px solid var(--color-border-subtle);
    border-right: 0;
    padding: 12px;
  }

  .mailbox-nav__compose {
    min-height: 38px;
    width: 112px;
  }

  .mailbox-nav__folders {
    display: flex;
    margin-top: 10px;
    overflow-x: auto;
  }

  .mailbox-nav__link,
  .mailbox-nav__link--category {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 0 10px;
  }

  .mailbox-nav__section-label {
    align-self: center;
    flex: 0 0 auto;
    margin: 0 8px;
  }

  .mailbox-main {
    padding: 12px;
  }

  .mailbox-main__heading {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .mailbox-toolbar {
    overflow-x: auto;
  }

  .mailbox-toolbar__selection {
    display: none;
  }

  .mailbox-row {
    gap: 7px;
    grid-template-columns: 26px 7px minmax(0, 1fr) 50px;
    padding: 0 8px;
  }

  .mailbox-row__correspondent {
    display: none;
  }

  .mailbox-row__labels {
    display: none;
  }

  .mailbox-compose {
    height: calc(100vh - 76px);
    inset: auto 8px 0 8px;
    max-width: none;
    width: auto;
  }
}

.dashboard-metric-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.dashboard-metric-list li {
  color: var(--theme-primary-faint);
}

.dashboard-human-review-list {
  margin-top: 12px;
}

.dashboard-human-review-list li {
  display: grid;
  gap: 3px;
}

.dashboard-human-review-list span,
.dashboard-human-review-decisions {
  color: var(--theme-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-human-review-decisions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.dashboard-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.75);
  color: var(--theme-primary-faint);
  padding: 4px 10px;
  font-size: 0.85rem;
}

.dashboard-card-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-calendar-summary-card {
  margin-bottom: 24px;
}

.dashboard-calendar-summary-header {
  align-items: center;
}

.dashboard-calendar-view-link {
  flex: 0 0 auto;
}

.dashboard-calendar-summary-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.dashboard-mini-calendar {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(8, 18, 40, 0.46);
  padding: 14px;
}

.dashboard-mini-calendar--large {
  background: rgb(var(--theme-surface-rgb) / 38.0%);
}

.dashboard-mini-calendar-header {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  color: #e0f2fe;
  font-weight: 800;
}

.dashboard-mini-calendar-weekdays,
.dashboard-mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-mini-calendar-weekdays span {
  color: rgb(var(--theme-text-rgb) / 76%);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.dashboard-mini-calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 999px;
  color: var(--theme-text);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-mini-calendar-day:hover,
.dashboard-mini-calendar-day:focus-visible {
  background: color-mix(in srgb, var(--theme-primary-pale) 16.0%, transparent);
  outline: none;
}

.dashboard-mini-calendar-day.is-muted {
  color: rgb(var(--theme-text-rgb) / 78%);
}

.dashboard-mini-calendar-day.is-today {
  background: var(--theme-primary);
  color: var(--theme-text);
}

.dashboard-mini-calendar-dots {
  position: absolute;
  bottom: 4px;
  display: flex;
  gap: 2px;
}

.dashboard-mini-calendar-dots i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
}

.dashboard-calendar-upcoming {
  min-width: 0;
}

.dashboard-calendar-upcoming-header h4 {
  margin: 0 0 10px;
  color: var(--theme-text);
  font-size: 0.95rem;
}

.dashboard-calendar-upcoming-list,
.dashboard-calendar-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-calendar-upcoming-item,
.dashboard-calendar-agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dashboard-calendar-upcoming-item:hover strong,
.dashboard-calendar-agenda-item:hover strong {
  color: var(--theme-primary-soft);
}

.dashboard-calendar-agenda-item--task strong::after {
  content: " task";
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-calendar-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  flex: 0 0 auto;
}

.dashboard-calendar-event-dot--task {
  border-radius: 3px;
}

.dashboard-calendar-upcoming-body,
.dashboard-calendar-agenda-item span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dashboard-calendar-upcoming-body strong,
.dashboard-calendar-agenda-item strong {
  color: var(--theme-text);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-upcoming-body small,
.dashboard-calendar-agenda-item small {
  color: rgb(var(--theme-text-rgb) / 78%);
  font-size: 0.78rem;
}

.dashboard-calendar-empty {
  margin: 0;
  color: rgb(var(--theme-text-rgb) / 78%);
  font-size: 0.9rem;
}

.dashboard-calendar-page {
  display: grid;
  grid-template-columns: minmax(236px, 296px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: min(calc(100% + 96px), 1760px);
  margin: 0 -48px -8px;
  padding: 0;
  color: var(--theme-text);
}

.dashboard-calendar-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.dashboard-calendar-greeting {
  padding: 0 4px 2px;
}

.dashboard-calendar-greeting h1 {
  margin: 0;
  color: var(--theme-text);
  font-family: var(--font-family-ui);
  font-size: clamp(1.16rem, 1.1vw, 1.42rem);
  font-weight: 500;
  line-height: 1.25;
}

.dashboard-calendar-shell {
  min-width: 0;
  overflow: hidden;
}

.dashboard-calendar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 16px 20px;
}

.dashboard-calendar-topbar-heading {
  min-width: 0;
}

.dashboard-calendar-topbar-heading h1 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-calendar-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.dashboard-calendar-search-form {
  display: flex;
  align-items: center;
  min-width: min(350px, 34vw);
  margin: 0;
}

.dashboard-calendar-search-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px 0 0 12px;
  background: rgba(8, 18, 40, 0.58);
  color: var(--theme-text);
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.dashboard-calendar-search-input::placeholder {
  color: rgb(var(--theme-text-rgb) / 60%);
}

.dashboard-calendar-search-input:focus {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 72.0%, transparent);
}

.dashboard-calendar-search-submit {
  min-height: 40px;
  border: 1px solid rgb(var(--theme-primary-rgb) / 90.0%);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: var(--theme-primary);
  color: var(--theme-text);
  padding: 0 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-calendar-shell-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(276px, 320px);
  min-width: 0;
}

.dashboard-calendar-panel,
.dashboard-calendar-shell {
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 86.0%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.dashboard-calendar-panel {
  padding: 16px;
}

.dashboard-calendar-main {
  min-width: 0;
}

.dashboard-calendar-visible-calendars {
  display: grid;
  gap: 10px;
  padding: 2px 4px 4px;
}

.dashboard-calendar-visible-calendars-header {
  display: grid;
  gap: 2px;
}

.dashboard-calendar-visible-calendars .dashboard-calendar-filter-form {
  gap: 8px;
}

.dashboard-calendar-visible-calendars .dashboard-calendar-toggle {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgb(var(--theme-surface-rgb) / 38.0%);
  padding: 5px 7px;
}

.dashboard-calendar-layer-divider {
  height: 1px;
  margin: 2px 0;
  background: rgba(148, 163, 184, 0.14);
}

.dashboard-calendar-toggle--layer {
  justify-content: flex-start;
}

.dashboard-calendar-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-calendar-panel-header h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
}

.dashboard-calendar-filter-form {
  display: grid;
  gap: 10px;
}

.dashboard-calendar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e0f2fe;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-calendar-toggle--with-color {
  justify-content: space-between;
  cursor: default;
}

.dashboard-calendar-toggle-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.dashboard-calendar-toggle input {
  accent-color: var(--theme-primary);
}

.dashboard-calendar-toggle-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.dashboard-calendar-toggle-color--tasks {
  border-radius: 3px;
  background: #f59e0b;
}

.dashboard-calendar-color-input {
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgb(var(--theme-surface-rgb) / 60.0%);
  cursor: pointer;
}

.dashboard-calendar-color-form {
  display: none;
}

.dashboard-calendar-board {
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-height: 0;
}

.dashboard-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-calendar-nav,
.dashboard-calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dashboard-calendar-actions form {
  margin: 0;
}

.dashboard-calendar-nav h1 {
  margin: 0 0 0 8px;
  color: var(--theme-text);
  font-size: 1.2rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-calendar-toolbar-button,
.dashboard-calendar-icon-button,
.dashboard-calendar-new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.dashboard-calendar-toolbar-button,
.dashboard-calendar-icon-button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgb(var(--theme-surface-rgb) / 86.0%);
  color: var(--theme-primary-faint);
  padding: 0 12px;
}

.dashboard-calendar-icon-button {
  width: 38px;
  padding: 0;
  font-size: 1.25rem;
}

.dashboard-calendar-refresh-button {
  white-space: nowrap;
}

.dashboard-calendar-refresh-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.dashboard-calendar-refresh-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--theme-primary-pale);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-calendar-refresh-status small {
  color: var(--theme-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-calendar-refresh-status--error,
.dashboard-calendar-refresh-status--needs_reconnect {
  color: #fecaca;
}

.dashboard-calendar-refresh-status--refreshed,
.dashboard-calendar-refresh-status--up_to_date {
  color: #bbf7d0;
}

.dashboard-calendar-new-button {
  border: 1px solid rgb(var(--theme-primary-rgb) / 90.0%);
  background: var(--theme-primary);
  color: var(--theme-text);
  padding: 0 14px;
  box-shadow: 0 12px 28px rgb(var(--theme-primary-rgb) / 28.0%);
}

.dashboard-calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-calendar-weekday {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: rgb(var(--theme-text-rgb) / 78%);
  font-size: 0.72rem;
  font-weight: 900;
}

.dashboard-calendar-day-cell {
  min-height: clamp(88px, 11.2vh, 122px);
  padding: 8px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(8, 18, 40, 0.28);
  min-width: 0;
}

.dashboard-calendar-day-cell:nth-child(7n + 7) {
  border-right: 0;
}

.dashboard-calendar-day-cell.is-muted {
  background: rgba(8, 18, 40, 0.14);
  color: rgb(var(--theme-text-rgb) / 80%);
}

.dashboard-calendar-day-cell.is-today {
  outline: 2px solid rgb(var(--theme-primary-rgb) / 90.0%);
  outline-offset: -2px;
  background: rgb(var(--theme-primary-rgb) / 8.0%);
}

.dashboard-calendar-day-cell.is-selected {
  background:
    linear-gradient(135deg, rgb(var(--theme-primary-rgb) / 14.0%), rgba(8, 18, 40, 0.2)),
    rgba(8, 18, 40, 0.28);
}

.dashboard-calendar-day-number {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
  color: var(--theme-text);
  font-weight: 800;
}

.dashboard-calendar-day-number-link {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.dashboard-calendar-day-number-link:hover,
.dashboard-calendar-day-number-link:focus-visible {
  background: color-mix(in srgb, var(--theme-primary-pale) 16.0%, transparent);
  color: var(--theme-primary-pale);
  outline: none;
}

.dashboard-calendar-day-cell.is-today .dashboard-calendar-day-number-link {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--theme-primary);
  color: var(--theme-text);
}

.dashboard-calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dashboard-calendar-event-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border-left: 3px solid var(--event-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--theme-text);
  text-decoration: none;
}

.dashboard-calendar-event-chip:hover,
.dashboard-calendar-event-chip:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.dashboard-calendar-event-chip--compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-left-width: 2px;
  border-radius: 6px;
  background: transparent;
}

.dashboard-calendar-event-chip--compact:hover,
.dashboard-calendar-event-chip--compact:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-calendar-event-chip--task {
  border-left-style: dashed;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgb(var(--theme-primary-rgb) / 8.0%)),
    rgb(var(--theme-surface-rgb) / 42.0%);
}

.dashboard-calendar-event-chip--compact.dashboard-calendar-event-chip--task {
  background: transparent;
}

.dashboard-calendar-event-chip--task span::before {
  content: "Task / ";
}

.dashboard-calendar-event-chip--compact.dashboard-calendar-event-chip--task span::before {
  content: "";
}

.dashboard-calendar-event-chip span {
  color: var(--event-color);
  font-size: 0.68rem;
  font-weight: 900;
}

.dashboard-calendar-event-chip--compact span {
  min-width: 30px;
  font-size: 0.68rem;
}

.dashboard-calendar-event-chip strong {
  overflow: hidden;
  color: var(--theme-text);
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-event-chip--compact strong {
  font-size: 0.7rem;
  font-weight: 800;
}

.dashboard-calendar-more-events {
  color: rgb(var(--theme-text-rgb) / 74%);
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-calendar-day-panel {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  scroll-margin-top: 92px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(135deg, rgb(var(--theme-primary-rgb) / 8.0%), rgb(var(--theme-surface-rgb) / 12.0%)),
    rgba(8, 18, 40, 0.2);
}

.dashboard-calendar-day-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 10px;
}

.dashboard-calendar-day-panel-header h2 {
  margin: 2px 0 0;
  color: var(--theme-text);
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: left;
}

.dashboard-calendar-day-panel-date-link {
  color: inherit;
  text-decoration: none;
}

.dashboard-calendar-day-panel-date-link:hover,
.dashboard-calendar-day-panel-date-link:focus-visible {
  color: var(--theme-primary-pale);
  outline: none;
}

.dashboard-calendar-day-panel-count {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 30.0%, transparent);
  border-radius: 999px;
  background: rgb(var(--theme-primary-rgb) / 14.0%);
  color: var(--theme-primary-pale);
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-calendar-day-list,
.dashboard-calendar-day-detail {
  min-height: 0;
  overflow-y: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
}

.dashboard-calendar-day-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.dashboard-calendar-day-card {
  display: grid;
  grid-template-columns: minmax(76px, 108px) minmax(0, 1fr) minmax(92px, auto);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-left: 3px solid var(--event-color);
  border-radius: 8px;
  background: rgb(var(--theme-surface-rgb) / 66.0%);
  color: var(--theme-text);
  padding: 10px 12px;
  text-decoration: none;
}

.dashboard-calendar-day-card:hover,
.dashboard-calendar-day-card:focus-visible {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 42.0%, transparent);
  background: rgba(21, 34, 59, 0.9);
  outline: none;
  text-decoration: none;
}

.dashboard-calendar-day-card--task {
  border-left-style: dashed;
}

.dashboard-calendar-day-card-time {
  color: var(--event-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-calendar-day-card-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-calendar-day-card-main strong,
.dashboard-calendar-day-card-main small,
.dashboard-calendar-day-card-kind {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-day-card-main strong {
  color: var(--theme-text);
  font-size: 0.88rem;
}

.dashboard-calendar-day-card-main small {
  color: rgb(var(--theme-text-rgb) / 76%);
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-calendar-day-card-kind {
  justify-self: end;
  max-width: 150px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(8, 18, 40, 0.56);
  color: rgb(var(--theme-text-rgb) / 84%);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.dashboard-calendar-day-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}

.dashboard-calendar-day-back-link {
  align-self: flex-start;
  min-height: 34px;
}

.dashboard-calendar-day-detail-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--theme-panel-border);
  border-left: 3px solid var(--event-color);
  border-radius: 8px;
  background: rgb(var(--theme-surface-rgb) / 68.0%);
  padding: 14px;
}

.dashboard-calendar-day-detail-card--task {
  border-left-style: dashed;
}

.dashboard-calendar-day-detail-card h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.24rem;
  line-height: 1.2;
  text-align: left;
}

.dashboard-calendar-day-detail-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-calendar-day-detail-lines p,
.dashboard-calendar-day-detail-copy p {
  margin: 0;
}

.dashboard-calendar-day-detail-lines p {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-calendar-day-detail-lines strong {
  color: rgb(var(--theme-text-rgb) / 72%);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-calendar-day-detail-lines span {
  overflow: hidden;
  color: var(--theme-text);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-day-detail-copy {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 12px;
  color: rgb(var(--theme-text-rgb) / 88%);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dashboard-calendar-day-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  padding: 0 16px 16px;
  text-align: center;
}

.dashboard-calendar-detail-panel {
  padding: 16px 18px;
}

.dashboard-calendar-day-agenda-panel h2 {
  margin: 2px 0 0;
  color: var(--theme-text);
  font-size: 1.05rem;
  line-height: 1.25;
  text-align: left;
}

.dashboard-calendar-day-agenda-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.dashboard-calendar-day-agenda-item {
  display: grid;
  grid-template-columns: minmax(58px, auto) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid var(--event-color);
  border-radius: 8px;
  background: rgba(8, 18, 40, 0.34);
  color: var(--theme-text);
  padding: 8px 10px;
  text-decoration: none;
}

.dashboard-calendar-day-agenda-item:hover,
.dashboard-calendar-day-agenda-item:focus-visible {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 38.0%, transparent);
  background: rgba(21, 34, 59, 0.72);
  outline: none;
  text-decoration: none;
}

.dashboard-calendar-day-agenda-item--task {
  border-left-style: dashed;
}

.dashboard-calendar-day-agenda-time {
  color: var(--event-color);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-calendar-day-agenda-separator {
  color: rgb(var(--theme-text-rgb) / 68%);
  font-weight: 800;
}

.dashboard-calendar-day-agenda-title {
  overflow: hidden;
  color: var(--theme-text);
  font-size: 0.88rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-right-header {
  display: grid;
  padding: 16px 18px 12px;
}

.dashboard-calendar-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 204px);
  max-height: calc(100dvh - 204px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-left: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-calendar-details--event-form {
  max-height: none;
  overflow-y: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
}

.dashboard-calendar-shell .dashboard-calendar-board,
.dashboard-calendar-shell .dashboard-calendar-detail-panel,
.dashboard-calendar-shell .dashboard-calendar-right-header {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-calendar-shell .dashboard-calendar-detail-panel,
.dashboard-calendar-shell .dashboard-calendar-right-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-calendar-shell .dashboard-calendar-detail-panel:last-child {
  border-bottom: 0;
}

.dashboard-calendar-right-header-row,
.dashboard-calendar-project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-calendar-right-header h2,
.dashboard-calendar-project-card-header h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1.05rem;
  line-height: 1.25;
  text-align: left;
}

.dashboard-calendar-profile-link,
.dashboard-calendar-project-member-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 34.0%, transparent);
  background: linear-gradient(135deg, rgba(21, 94, 117, 0.68), rgba(88, 28, 135, 0.62));
  color: var(--theme-text);
  text-decoration: none;
  flex: 0 0 auto;
}

.dashboard-calendar-profile-link {
  width: 44px;
  height: 44px;
  box-shadow: 0 14px 32px rgba(5, 10, 22, 0.24);
}

.dashboard-calendar-profile-link:hover,
.dashboard-calendar-profile-link:focus-visible {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 78.0%, transparent);
  outline: none;
}

.dashboard-calendar-profile-image,
.dashboard-calendar-project-member-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.dashboard-calendar-profile-link .profile-picture-initials {
  font-size: 0.9rem;
}

.dashboard-calendar-right-new-button {
  justify-self: end;
  min-width: 122px;
  width: auto;
}

.dashboard-calendar-project-title-link {
  color: inherit;
  text-decoration: none;
}

.dashboard-calendar-project-title-link:hover,
.dashboard-calendar-project-title-link:focus-visible {
  color: var(--theme-primary-soft);
  outline: none;
}

.dashboard-calendar-project-status {
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 30.0%, transparent);
  border-radius: 999px;
  background: rgb(var(--theme-primary-rgb) / 16.0%);
  color: var(--theme-primary-pale);
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-calendar-project-members {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-calendar-project-member {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-calendar-project-member-avatar {
  width: 38px;
  height: 38px;
}

.dashboard-calendar-project-member-avatar span {
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-calendar-project-member > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-calendar-project-member strong {
  overflow: hidden;
  color: var(--theme-text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-project-member small {
  color: rgb(var(--theme-text-rgb) / 72%);
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-calendar-project-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.dashboard-calendar-project-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(8, 18, 40, 0.42);
  padding: 10px 8px;
  color: rgb(var(--theme-text-rgb) / 78%);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.dashboard-calendar-project-stat strong {
  color: var(--theme-text);
  font-size: 1rem;
}

.dashboard-calendar-detail-section--first {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.dashboard-calendar-project-detail-lines {
  margin-top: 14px;
}

.dashboard-calendar-detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgb(var(--theme-text-rgb) / 82%);
  font-size: 0.86rem;
  font-weight: 800;
}

.dashboard-calendar-detail-eyebrow span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.dashboard-calendar-detail-panel h2 {
  margin: 14px 0;
  color: var(--theme-text);
  font-size: 1.45rem;
  line-height: 1.18;
  text-align: left;
}

.dashboard-calendar-detail-panel .dashboard-calendar-project-card-header h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.dashboard-calendar-detail-lines {
  display: grid;
  gap: 10px;
}

.dashboard-calendar-detail-lines p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.dashboard-calendar-detail-lines strong {
  color: rgb(var(--theme-text-rgb) / 72%);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-calendar-detail-lines span {
  color: var(--theme-text);
  font-size: 0.92rem;
}

.dashboard-calendar-detail-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-calendar-detail-section h3 {
  margin: 0 0 8px;
  color: var(--theme-text);
  font-size: 0.96rem;
  text-align: left;
}

.dashboard-calendar-detail-section p,
.dashboard-calendar-detail-section li {
  color: rgb(var(--theme-text-rgb) / 86%);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dashboard-calendar-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.dashboard-calendar-detail-actions form {
  margin: 0;
}

.dashboard-calendar-form-panel {
  overflow: hidden;
}

.dashboard-calendar-event-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.dashboard-calendar-context-note {
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 24.0%, transparent);
  border-radius: 10px;
  background: rgb(var(--theme-primary-rgb) / 12.0%);
  padding: 10px 12px;
}

.dashboard-calendar-context-note strong {
  color: rgb(var(--theme-text-rgb) / 78%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-calendar-context-note span {
  color: var(--theme-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-calendar-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.dashboard-calendar-form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.dashboard-calendar-form-field label,
.dashboard-calendar-form-check {
  color: rgb(var(--theme-text-rgb) / 78%);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-calendar-form-field input,
.dashboard-calendar-form-field select,
.dashboard-calendar-form-field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(8, 18, 40, 0.68);
  color: var(--theme-text);
  font: inherit;
  padding: 10px 12px;
}

.dashboard-calendar-form-field textarea {
  resize: vertical;
}

.dashboard-calendar-form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: #e0f2fe;
  cursor: pointer;
}

.dashboard-calendar-form-check input {
  accent-color: var(--theme-primary);
}

.dashboard-calendar-form-errors {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.24);
  padding: 10px 12px;
}

.dashboard-calendar-form-errors p {
  margin: 0;
  color: #fecaca;
  font-size: 0.86rem;
}

.dashboard-calendar-danger-zone {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-calendar-danger-zone form {
  margin: 0;
}

.dashboard-calendar-danger-button {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
}

.tasks-calendar-visibility-toggle {
  align-self: stretch;
  justify-content: center;
}

.tasks-calendar-visibility-toggle span {
  color: var(--theme-text);
  font-weight: 800;
}

.tasks-calendar-visibility-toggle input {
  width: auto;
  accent-color: var(--theme-primary);
}

.tasks-schedule-mode-control,
.tasks-schedule-intent-note {
  grid-column: 1 / -1;
}

.tasks-schedule-mode-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 420px);
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 28.0%, transparent);
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.58);
}

.tasks-schedule-mode-option {
  position: relative;
  cursor: pointer;
}

.tasks-schedule-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tasks-schedule-mode-option span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--theme-text-muted);
  font-weight: 800;
  text-align: center;
}

.tasks-schedule-mode-option input:checked + span {
  background: var(--theme-primary);
  color: var(--theme-text);
  box-shadow: 0 10px 22px rgb(var(--theme-primary-rgb) / 24.0%);
}

.task-schedule-date-panel[hidden],
.task-schedule-time-panel[hidden],
.task-schedule-recurrence-panel[hidden],
.tasks-schedule-intent-note[hidden],
[data-task-schedule-target="calendarPanel"][hidden] {
  display: none;
}

.mcp-dashboard-page {
  position: relative;
  min-height: calc(100vh - var(--app-navbar-height));
  width: calc(100% + 80px);
  margin: -12px -40px -16px;
  padding: 36px 0 60px;
}

/* Keep primary product surfaces inside the same readable gutter as Jobs Catalog. */
.mcp-dashboard-page.dashboard-page-contained {
  width: 100%;
  margin: 0;
  padding: 0 0 60px;
}

.mcp-dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mcp-dashboard-shell > .dashboard-hero {
  margin-bottom: 0;
}

.mcp-dashboard-metrics-dock {
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: rgba(8, 15, 26, 0.8);
  padding: 14px;
}

.mcp-dashboard-metrics-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.mcp-dashboard-metrics-dock-header h2 {
  margin: 0;
  text-align: left;
  font-size: 1.15rem;
  line-height: 1.25;
}

.mcp-dashboard-metrics-dock-header p {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.88rem;
}

.mcp-dashboard-metrics-dock .dashboard-card-grid {
  margin-bottom: 0;
}

.mcp-dashboard-metrics-dock .dashboard-card-header h3 {
  font-size: 1.08rem;
}

.mcp-dashboard-metrics-dock .dashboard-card-copy {
  font-size: 0.88rem;
  line-height: 1.4;
}

.mcp-dashboard-metrics-dock .dashboard-card-stat {
  font-size: 1.25rem;
}

.mcp-dashboard-flash-stack {
  display: grid;
  gap: 12px;
}

.mcp-dashboard-flash {
  position: relative;
  padding: 16px 18px;
}

.mcp-dashboard-flash strong {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.mcp-dashboard-flash--notice {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
  color: #dcfce7;
}

.mcp-dashboard-flash--notice strong {
  color: #bbf7d0;
}

.mcp-dashboard-flash--alert {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(60, 18, 24, 0.72);
}

.mcp-dashboard-flash--alert strong {
  color: #fda4af;
}

.mcp-dashboard-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.mcp-dashboard-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}

.mcp-dashboard-record-card {
  min-height: 100%;
}

.mcp-dashboard-record-title {
  margin: 0;
  text-align: left;
}

.mcp-dashboard-record-subtitle {
  margin: 6px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.95rem;
}

.mcp-dashboard-meta-grid {
  display: grid;
  gap: 12px;
  margin: 0;
}

.mcp-dashboard-meta-grid div {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mcp-dashboard-meta-grid dt {
  margin: 0 0 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
}

.mcp-dashboard-meta-grid dd {
  margin: 0;
  color: var(--theme-text);
}

.mcp-dashboard-table-card {
  padding: 22px;
}

.mcp-dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.mcp-dashboard-table thead th {
  padding: 0 0 12px;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.mcp-dashboard-table tbody td {
  padding: 14px 0;
  vertical-align: top;
  color: var(--theme-text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.mcp-dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.mcp-dashboard-table code {
  color: var(--theme-text);
}

.mcp-dashboard-empty {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  color: var(--theme-text-muted);
}

.mcp-dashboard-form-card {
  padding: 24px;
}

.mcp-dashboard-form-card .usage-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
}

.mcp-dashboard-form-card .usage-table th {
  width: 240px;
  padding-right: 16px;
  text-align: right;
  vertical-align: top;
  color: var(--theme-text);
}

.mcp-dashboard-form-card .usage-table td {
  color: var(--theme-text);
}

.mcp-dashboard-form-card .usage-table td input[type="text"],
.mcp-dashboard-form-card .usage-table td input[type="email"],
.mcp-dashboard-form-card .usage-table td input[type="password"],
.mcp-dashboard-form-card .usage-table td textarea,
.mcp-dashboard-form-card .usage-table td select {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 28.0%, transparent);
  background: rgba(10, 16, 30, 0.78);
  color: var(--theme-text);
  padding: 10px 12px;
  box-sizing: border-box;
}

.mcp-dashboard-form-help {
  margin-top: 6px;
  color: var(--theme-text-muted);
  font-size: 0.9rem;
}

.mcp-dashboard-details {
  margin: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
}

.mcp-dashboard-details summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  color: var(--theme-text);
}

.mcp-dashboard-details[open] summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.mcp-dashboard-details-body {
  padding: 18px;
}

.settings-dashboard-page .dashboard-hero {
  border-color: var(--theme-panel-border);
}

.turn-flow-studio-page {
  --turn-flow-line: color-mix(in srgb, var(--theme-primary-pale) 34%, transparent);
  --turn-flow-panel: rgb(var(--theme-surface-rgb) / 76%);
}

.turn-flow-studio-hero {
  background:
    radial-gradient(circle at 82% 20%, rgb(var(--theme-primary-rgb) / 18%), transparent 34%),
    linear-gradient(145deg, rgb(var(--theme-surface-rgb) / 94%), var(--theme-surface-deep));
}

.turn-flow-studio-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.turn-flow-studio-status {
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 44%, transparent);
  border-radius: 999px;
  background: rgb(var(--theme-primary-rgb) / 22%);
  color: var(--theme-primary-faint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  padding: 6px 10px;
  text-transform: uppercase;
}

.turn-flow-studio-status--muted {
  border-color: var(--theme-panel-border);
  background: rgb(var(--theme-surface-rgb) / 58%);
  color: var(--theme-text-muted);
}

.turn-flow-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.turn-flow-canvas,
.turn-flow-inventory {
  min-width: 0;
}

.turn-flow-canvas {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 2.4vw, 30px);
}

.turn-flow-canvas-header h2,
.turn-flow-inventory h2 {
  margin: 3px 0 0;
  color: var(--theme-text);
  font-size: clamp(1.22rem, 2vw, 1.55rem);
}

.turn-flow-stack {
  position: relative;
  display: grid;
  gap: 12px;
}

.turn-flow-stack::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 22px;
  width: 1px;
  background: linear-gradient(var(--turn-flow-line), color-mix(in srgb, var(--theme-primary-soft) 54%, transparent));
  content: "";
}

.turn-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 15px;
  background: var(--turn-flow-panel);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(5, 10, 22, 0.12);
}

.turn-flow-step--optional {
  border-style: dashed;
}

.turn-flow-step--locked {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.18), var(--turn-flow-panel));
}

.turn-flow-step--attention {
  border-color: rgba(245, 158, 11, 0.52);
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.2), var(--turn-flow-panel));
}

.turn-flow-step__phase {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 42%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-surface) 90%, var(--theme-primary) 10%);
  color: var(--theme-primary-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.turn-flow-step h3,
.turn-flow-step h4 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
  line-height: 1.35;
}

.turn-flow-step p {
  margin: 6px 0 9px;
  color: var(--theme-text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.turn-flow-step code {
  display: block;
  color: var(--theme-primary-faint);
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.turn-flow-step__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.turn-flow-step__title-row small {
  border: 1px solid var(--theme-panel-border);
  border-radius: 999px;
  color: var(--theme-text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  padding: 3px 7px;
  text-transform: uppercase;
}

.turn-flow-step .turn-flow-step__attention {
  margin: 12px 0 0;
  border-top: 1px solid rgba(245, 158, 11, 0.24);
  color: #fbbf24;
  font-size: 0.78rem;
  padding-top: 10px;
}

.turn-flow-branch-marker {
  display: grid;
  grid-template-columns: minmax(30px, 1fr) auto minmax(30px, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--theme-text-muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-branch-marker::before,
.turn-flow-branch-marker::after {
  height: 1px;
  background: var(--turn-flow-line);
  content: "";
}

.turn-flow-branch-marker--merge {
  margin-top: 2px;
}

.turn-flow-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.turn-flow-lane {
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background: rgb(var(--theme-surface-rgb) / 42%);
  padding: 16px;
}

.turn-flow-lane__header {
  margin-bottom: 14px;
  padding: 2px 2px 13px;
  border-bottom: 1px solid var(--theme-panel-border);
}

.turn-flow-lane__header h3 {
  margin: 3px 0 0;
  color: var(--theme-text);
  font-size: 1.08rem;
}

.turn-flow-stack--lane .turn-flow-step {
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 14px;
}

.turn-flow-stack--lane .turn-flow-step__phase {
  width: 40px;
  height: 32px;
}

.turn-flow-stack--lane::before {
  left: 20px;
}

.turn-flow-studio-rail {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.turn-flow-inventory {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.turn-flow-inventory-list,
.turn-flow-variable-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.turn-flow-inventory-list {
  list-style: none;
}

.turn-flow-inventory-list li,
.turn-flow-variable-list > div {
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58%);
  padding: 12px;
}

.turn-flow-inventory-list__title,
.turn-flow-variable-list dt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--theme-text);
  font-size: 0.86rem;
  font-weight: 800;
}

.turn-flow-inventory-list__title small,
.turn-flow-variable-list dt small {
  flex: 0 0 auto;
  color: var(--theme-text-muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.turn-flow-inventory-list p,
.turn-flow-variable-list dd {
  margin: 5px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .turn-flow-studio-layout {
    grid-template-columns: 1fr;
  }

  .turn-flow-studio-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .turn-flow-lanes,
  .turn-flow-studio-rail {
    grid-template-columns: 1fr;
  }

  .turn-flow-canvas-header,
  .turn-flow-step__title-row {
    align-items: flex-start;
  }

  .turn-flow-step {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 13px;
  }

  .turn-flow-step__phase {
    width: 38px;
    height: 31px;
  }

  .turn-flow-stack::before {
    left: 19px;
  }
}

/* Turn Flow Studio V2: mirrored current/future architecture workspaces. */
.turn-flow-studio-page {
  --turn-flow-bg: color-mix(in srgb, var(--theme-surface-deep) 88%, #020617 12%);
  --turn-flow-panel: rgb(var(--theme-surface-rgb) / 82%);
  --turn-flow-panel-soft: rgb(var(--theme-surface-rgb) / 52%);
  --turn-flow-line: color-mix(in srgb, var(--theme-primary-pale) 28%, transparent);
  --turn-flow-blue: #38bdf8;
  --turn-flow-green: #4ade80;
  --turn-flow-amber: #fbbf24;
  --turn-flow-violet: #a78bfa;
}

.turn-flow-studio-page .provider-settings-container {
  max-width: 1520px;
}

.turn-flow-studio-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--theme-panel-border);
  padding: 10px 2px 24px;
}

.turn-flow-studio-header h1 {
  margin: 5px 0 8px;
  color: var(--theme-text);
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  letter-spacing: -0.035em;
}

.turn-flow-studio-header p:not(.turn-flow-studio-path) {
  max-width: 760px;
  margin: 0;
  color: var(--theme-text-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
}

.turn-flow-studio-path {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-studio-header__actions,
.turn-flow-workspace__badges,
.turn-flow-workspace__preview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.turn-flow-studio-status,
.turn-flow-workspace__badges span,
.turn-flow-workspace__preview-actions > span {
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 34%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--turn-flow-blue) 10%, transparent);
  color: color-mix(in srgb, var(--turn-flow-blue) 72%, white 28%);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  padding: 6px 9px;
  text-transform: uppercase;
}

.turn-flow-studio-status--muted,
.turn-flow-workspace__badges span:last-child {
  border-color: var(--theme-panel-border);
  background: transparent;
  color: var(--theme-text-muted);
}

.turn-flow-studio-jump {
  display: flex;
  gap: 10px;
  padding: 18px 0 2px;
}

.turn-flow-studio-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 7px;
  background: var(--turn-flow-panel-soft);
  color: var(--theme-text-secondary);
  font-size: 0.78rem;
  padding: 8px 11px;
  text-decoration: none;
}

.turn-flow-studio-jump a:hover {
  border-color: color-mix(in srgb, var(--turn-flow-blue) 42%, transparent);
  color: var(--theme-text);
}

.turn-flow-studio-jump span {
  color: var(--turn-flow-blue);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.turn-flow-workspace {
  min-width: 0;
  margin-top: 18px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: var(--turn-flow-bg);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.24);
  overflow: hidden;
}

.turn-flow-workspace--later {
  border-color: color-mix(in srgb, var(--turn-flow-blue) 34%, var(--theme-panel-border));
}

.turn-flow-workspace__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
}

.turn-flow-workspace__header h2 {
  margin: 6px 0 7px;
  color: var(--theme-text);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.025em;
}

.turn-flow-workspace__header p {
  max-width: 760px;
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.turn-flow-workspace__label {
  color: var(--theme-text-muted);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-workspace__label span {
  margin-right: 7px;
  color: var(--turn-flow-blue);
  font-size: 0.83rem;
}

.turn-flow-workspace__preview-actions {
  justify-content: flex-end;
}

.turn-flow-workspace__preview-actions > span {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 38%, transparent);
  background: color-mix(in srgb, var(--turn-flow-violet) 10%, transparent);
  color: #c4b5fd;
}

.turn-flow-workspace__preview-actions button {
  border: 1px solid var(--theme-panel-border);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 58%);
  color: var(--theme-text-muted);
  font: inherit;
  font-size: 0.76rem;
  padding: 7px 12px;
  cursor: not-allowed;
  opacity: 0.62;
}

.turn-flow-response-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 9px;
  margin: 0;
  border-top: 1px solid var(--theme-panel-border);
  border-bottom: 1px solid var(--theme-panel-border);
  background: rgb(2 6 23 / 24%);
  padding: 14px 18px;
  list-style: none;
  overflow-x: auto;
}

.turn-flow-response-slot {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  min-width: 160px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 7px;
  background: var(--turn-flow-panel-soft);
  padding: 11px;
}

.turn-flow-response-slot:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -10px;
  color: var(--theme-text-muted);
  content: "›";
  font-size: 1.1rem;
  transform: translateY(-50%);
}

.turn-flow-response-slot--ordinary,
.turn-flow-response-slot--planned {
  border-color: color-mix(in srgb, var(--turn-flow-blue) 56%, transparent);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--turn-flow-blue) 65%, transparent);
}

.turn-flow-response-slot--conditional,
.turn-flow-response-slot--optional {
  border-style: dashed;
  opacity: 0.82;
}

.turn-flow-response-slot__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--turn-flow-blue) 24%, transparent);
  color: #e0f2fe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 900;
}

.turn-flow-response-slot div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.turn-flow-response-slot strong {
  color: var(--theme-text);
  font-size: 0.78rem;
}

.turn-flow-response-slot span:not(.turn-flow-response-slot__number) {
  color: var(--theme-text-secondary);
  font-size: 0.68rem;
}

.turn-flow-response-slot small {
  display: block;
  margin-top: 5px;
  color: var(--theme-text-muted);
  font-size: 0.61rem;
  line-height: 1.35;
}

.turn-flow-consolidation {
  display: grid;
  gap: 14px;
  margin: 18px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 34%, var(--theme-panel-border));
  border-radius: 9px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--turn-flow-blue) 6%, transparent), rgb(2 6 23 / 22%));
  padding: 16px;
}

.turn-flow-consolidation > header,
.turn-flow-consolidation > footer,
.turn-flow-consolidation li > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.turn-flow-consolidation > header > div {
  display: grid;
  gap: 4px;
}

.turn-flow-consolidation > header span {
  color: var(--turn-flow-blue);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-consolidation > header h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
}

.turn-flow-consolidation > header p {
  max-width: 620px;
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: right;
}

.turn-flow-consolidation > ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.turn-flow-consolidation li {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 132px;
  border: 1px solid var(--theme-panel-border);
  border-left: 3px solid var(--theme-text-muted);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 52%);
  padding: 11px;
}

.turn-flow-consolidation li[data-consolidation-state="installed"] {
  border-left-color: var(--turn-flow-blue);
}

.turn-flow-consolidation li[data-consolidation-state="extracted"] {
  border-left-color: var(--turn-flow-green);
}

.turn-flow-consolidation li[data-consolidation-state="legacy"] {
  border-left-color: var(--turn-flow-amber);
}

.turn-flow-consolidation li[data-consolidation-state="domain"] {
  border-left-color: var(--turn-flow-violet);
}

.turn-flow-consolidation li strong {
  color: var(--theme-text);
  font-size: 0.72rem;
}

.turn-flow-consolidation li small {
  border: 1px solid var(--theme-panel-border);
  border-radius: 999px;
  color: var(--theme-text-muted);
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  text-align: right;
  text-transform: uppercase;
}

.turn-flow-consolidation li > span {
  color: color-mix(in srgb, var(--turn-flow-blue) 62%, var(--theme-text-secondary));
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.35;
}

.turn-flow-consolidation li p {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.6rem;
  line-height: 1.45;
}

.turn-flow-consolidation > footer {
  border-top: 1px solid var(--theme-panel-border);
  padding-top: 10px;
}

.turn-flow-consolidation > footer code,
.turn-flow-consolidation > footer span {
  font-size: 0.6rem;
  line-height: 1.4;
}

.turn-flow-consolidation > footer code {
  color: color-mix(in srgb, var(--turn-flow-blue) 72%, white 28%);
}

.turn-flow-consolidation > footer span {
  color: var(--theme-text-muted);
  text-align: right;
}

.turn-flow-workspace__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.31fr);
  align-items: stretch;
}

.turn-flow-canvas {
  display: grid;
  gap: 18px;
  min-width: 0;
  border-right: 1px solid var(--theme-panel-border);
  border-radius: 0;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--theme-text-muted) 16%, transparent) 1px, transparent 1px),
    rgb(2 6 23 / 12%);
  background-size: 19px 19px;
  padding: 18px;
}

.turn-flow-canvas__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 66%);
  color: var(--theme-text-muted);
  font-size: 0.66rem;
  padding: 9px 11px;
}

.turn-flow-canvas__tools,
.turn-flow-canvas__legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.turn-flow-canvas__legend {
  gap: 14px;
}

.turn-flow-canvas__tools button,
.turn-flow-canvas__tools output {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 3px;
  background: rgb(2 6 23 / 22%);
  color: var(--theme-text-muted);
  font: inherit;
  font-size: 0.59rem;
  padding: 0 7px;
}

.turn-flow-canvas__tools button {
  cursor: not-allowed;
}

.turn-flow-canvas__tools button:disabled {
  opacity: 0.72;
}

.turn-flow-canvas__toolbar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.turn-flow-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--turn-flow-blue);
  border-radius: 50%;
}

.turn-flow-legend-dot--active,
.turn-flow-legend-dot--planned {
  background: var(--turn-flow-green);
  border-color: var(--turn-flow-green);
}

.turn-flow-legend-dot--optional {
  border-style: dashed;
}

.turn-flow-legend-dot--protected {
  border-color: var(--turn-flow-violet);
  background: var(--turn-flow-violet);
}

.turn-flow-legend-dot--warning {
  border-color: var(--turn-flow-amber);
  background: var(--turn-flow-amber);
}

.turn-flow-current-track {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 8px 2px 14px;
  list-style: none;
  overflow-x: auto;
  scrollbar-color: color-mix(in srgb, var(--turn-flow-blue) 45%, transparent) transparent;
  scrollbar-width: thin;
}

.turn-flow-current-track--ingress {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.turn-flow-current-track--closeout {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.turn-flow-current-track > li {
  position: relative;
  min-width: 0;
}

.turn-flow-current-track > li:not(:last-child)::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 100%;
  width: 22px;
  height: 1px;
  background: color-mix(in srgb, var(--turn-flow-blue) 62%, transparent);
  content: "";
}

.turn-flow-current-track > li:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: calc(50% - 4px);
  left: calc(100% + 22px);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--turn-flow-blue);
  content: "";
}

.turn-flow-current-track .turn-flow-step {
  z-index: 1;
  height: 100%;
}

.turn-flow-stack {
  position: relative;
  display: grid;
  gap: 11px;
}

.turn-flow-stack::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 20px;
  width: 1px;
  background: linear-gradient(var(--turn-flow-line), color-mix(in srgb, var(--turn-flow-blue) 44%, transparent));
  content: "";
}

.turn-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--turn-flow-panel) 92%, #020617 8%);
  padding: 13px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.16);
}

.turn-flow-step--optional {
  border-style: dashed;
}

.turn-flow-step--locked {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 48%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--turn-flow-violet) 9%, transparent), var(--turn-flow-panel));
}

.turn-flow-step--attention {
  border-color: color-mix(in srgb, var(--turn-flow-amber) 55%, transparent);
  background: linear-gradient(145deg, rgb(120 53 15 / 18%), var(--turn-flow-panel));
}

.turn-flow-step--response,
.turn-flow-step--future {
  border-left: 3px solid color-mix(in srgb, var(--turn-flow-blue) 74%, transparent);
}

.turn-flow-step__phase {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 38%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--theme-surface) 88%, var(--turn-flow-blue) 12%);
  color: #bae6fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 900;
}

.turn-flow-step__body {
  min-width: 0;
}

.turn-flow-step__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.turn-flow-step h4 {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.turn-flow-step__title-row small {
  border: 1px solid var(--theme-panel-border);
  border-radius: 4px;
  color: var(--theme-text-muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  text-transform: uppercase;
}

.turn-flow-step p {
  margin: 5px 0 8px;
  color: var(--theme-text-secondary);
  font-size: 0.77rem;
  line-height: 1.46;
}

.turn-flow-step code {
  display: block;
  color: color-mix(in srgb, var(--turn-flow-blue) 70%, white 30%);
  font-size: 0.63rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.turn-flow-step .turn-flow-step__attention {
  margin: 10px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--turn-flow-amber) 28%, transparent);
  color: var(--turn-flow-amber);
  font-size: 0.69rem;
  padding-top: 9px;
}

.turn-flow-step__nested {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.turn-flow-step__nested li {
  border: 1px solid var(--theme-panel-border);
  border-radius: 4px;
  background: rgb(2 6 23 / 22%);
  color: var(--theme-text-muted);
  font-size: 0.61rem;
  padding: 5px 7px;
}

.turn-flow-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 11px;
  color: var(--theme-text-muted);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-split::before,
.turn-flow-split::after {
  height: 1px;
  background: var(--turn-flow-line);
  content: "";
}

.turn-flow-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.turn-flow-lane {
  min-width: 0;
  border-top: 2px solid color-mix(in srgb, var(--turn-flow-blue) 58%, transparent);
  padding: 13px 2px 0;
}

.turn-flow-lane--protected {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 62%, transparent);
}

.turn-flow-lane__header {
  margin-bottom: 18px;
  padding: 1px 2px 0;
}

.turn-flow-lane__header span {
  color: var(--theme-text-muted);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.turn-flow-lane__header h3 {
  margin: 3px 0 0;
  color: var(--theme-text);
  font-size: 0.96rem;
}

.turn-flow-stack--lane {
  gap: 24px;
}

.turn-flow-stack--lane::before {
  top: 24px;
  bottom: 24px;
  left: 50%;
  background: linear-gradient(var(--turn-flow-line), color-mix(in srgb, var(--turn-flow-blue) 34%, transparent));
}

.turn-flow-stack--lane .turn-flow-step {
  background: color-mix(in srgb, var(--turn-flow-panel) 96%, #020617 4%);
}

.turn-flow-stack--lane .turn-flow-step:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  bottom: -16px;
  left: calc(50% - 4px);
  width: 0;
  height: 0;
  border-top: 6px solid color-mix(in srgb, var(--turn-flow-blue) 68%, transparent);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.turn-flow-resume-loop {
  margin-top: 12px;
  border: 1px dashed color-mix(in srgb, var(--turn-flow-amber) 62%, transparent);
  border-radius: 6px;
  background: rgb(120 53 15 / 18%);
  color: var(--turn-flow-amber);
  padding: 10px 12px;
}

.turn-flow-resume-loop strong,
.turn-flow-resume-loop span {
  display: block;
}

.turn-flow-resume-loop strong {
  font-size: 0.72rem;
}

.turn-flow-resume-loop span {
  margin-top: 3px;
  color: color-mix(in srgb, var(--turn-flow-amber) 72%, var(--theme-text-secondary));
  font-size: 0.66rem;
  line-height: 1.4;
}

.turn-flow-inspector {
  min-width: 0;
  background: rgb(var(--theme-surface-rgb) / 40%);
}

.turn-flow-inspector__header {
  border-bottom: 1px solid var(--theme-panel-border);
  padding: 18px;
}

.turn-flow-inspector__header > span {
  color: var(--turn-flow-blue);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-inspector__header h3 {
  margin: 5px 0 0;
  color: var(--theme-text);
  font-size: 1rem;
}

.turn-flow-inspector__header p {
  margin: 7px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.turn-flow-inspector-list {
  margin: 0;
  padding: 5px 18px;
}

.turn-flow-inspector-list > div {
  border-bottom: 1px solid var(--theme-panel-border);
  padding: 13px 0;
}

.turn-flow-inspector-list dt {
  color: var(--theme-text);
  font-size: 0.74rem;
  font-weight: 850;
}

.turn-flow-inspector-list dd {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.turn-flow-inspector__note {
  margin: 13px 18px 18px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-amber) 35%, var(--theme-panel-border));
  border-radius: 6px;
  background: rgb(120 53 15 / 12%);
  padding: 12px;
}

.turn-flow-inspector__note strong,
.turn-flow-inspector__note code {
  display: block;
}

.turn-flow-inspector__note strong {
  color: var(--turn-flow-amber);
  font-size: 0.7rem;
}

.turn-flow-inspector__note code {
  margin-top: 7px;
  color: var(--theme-text-secondary);
  font-size: 0.61rem;
  overflow-wrap: anywhere;
}

.turn-flow-inspector__note p {
  margin: 8px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.turn-flow-transition {
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 20px 2px 2px;
  color: var(--theme-text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.turn-flow-transition i {
  height: 1px;
  background: linear-gradient(90deg, var(--theme-panel-border), color-mix(in srgb, var(--turn-flow-blue) 48%, transparent), var(--theme-panel-border));
}

.turn-flow-future-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.turn-flow-future-intro > div {
  border-left: 2px solid color-mix(in srgb, var(--turn-flow-blue) 62%, transparent);
  background: rgb(var(--theme-surface-rgb) / 54%);
  padding: 10px 11px;
}

.turn-flow-future-intro strong,
.turn-flow-future-intro span {
  display: block;
}

.turn-flow-future-intro strong {
  color: var(--theme-text);
  font-size: 0.7rem;
}

.turn-flow-future-intro span {
  margin-top: 2px;
  color: var(--theme-text-muted);
  font-size: 0.61rem;
}

.turn-flow-application-wrapper {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(10, 31, 49, 0.95), rgba(14, 24, 39, 0.96) 58%, rgba(34, 23, 54, 0.9));
  box-shadow: inset 4px 0 0 rgba(56, 189, 248, 0.72);
}

.turn-flow-application-wrapper > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.turn-flow-application-wrapper > header span {
  color: #67d9ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-application-wrapper > header h3 {
  margin: 0;
  color: #eef8ff;
  font-size: 1rem;
  font-weight: 650;
}

.turn-flow-application-wrapper > ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(165px, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}

.turn-flow-application-wrapper > ol li {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 11px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  background: rgba(8, 17, 29, 0.76);
}

.turn-flow-application-wrapper li strong {
  color: #e1f7ff;
  font-size: 0.76rem;
}

.turn-flow-application-wrapper li span {
  color: #8294aa;
  font-size: 0.67rem;
  line-height: 1.4;
}

.turn-flow-application-wrapper > footer {
  padding-top: 10px;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.turn-flow-application-wrapper > footer code {
  color: #72d8f7;
  font-size: 0.68rem;
}

.turn-flow-entry-profiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(190px, 0.9fr);
  gap: 7px;
}

.turn-flow-entry-profiles article,
.turn-flow-entry-profiles__intake {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 52%);
  padding: 9px 10px;
}

.turn-flow-entry-profiles article strong,
.turn-flow-entry-profiles__intake strong {
  color: var(--theme-text-secondary);
  font-size: 0.64rem;
}

.turn-flow-entry-profiles article small,
.turn-flow-entry-profiles__intake span {
  color: var(--theme-text-muted);
  font-size: 0.56rem;
  line-height: 1.35;
}

.turn-flow-entry-profiles__intake {
  position: relative;
  border-color: color-mix(in srgb, var(--turn-flow-blue) 50%, transparent);
  background: color-mix(in srgb, var(--turn-flow-blue) 9%, var(--turn-flow-panel));
}

.turn-flow-entry-profiles__intake strong {
  color: #bae6fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.turn-flow-engine-track {
  display: grid;
  gap: 30px;
  margin: 0;
  padding: 14px 3px 20px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-color: color-mix(in srgb, var(--turn-flow-blue) 45%, transparent) transparent;
  scrollbar-width: thin;
}

.turn-flow-engine-track--primary {
  grid-template-columns: repeat(8, minmax(150px, 1fr));
}

.turn-flow-engine-track--synthesis {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.turn-flow-engine-track > li {
  position: relative;
  min-width: 0;
  scroll-snap-align: start;
}

.turn-flow-engine-track > li:not(:last-child)::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 100%;
  width: 24px;
  height: 1px;
  background: color-mix(in srgb, var(--turn-flow-blue) 72%, transparent);
  content: "";
}

.turn-flow-engine-track > li:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: calc(50% - 4px);
  left: calc(100% + 24px);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--turn-flow-blue);
  content: "";
}

.turn-flow-engine-node {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  min-height: 192px;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 46%, var(--theme-panel-border));
  border-radius: 5px;
  background: color-mix(in srgb, var(--turn-flow-panel) 95%, #020617 5%);
  box-shadow: 0 14px 30px rgb(2 6 23 / 20%);
  padding: 11px;
}

.turn-flow-engine-node::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--turn-flow-blue);
  content: "";
}

.turn-flow-engine-node > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.turn-flow-engine-node > header > span {
  color: var(--turn-flow-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.57rem;
  font-weight: 900;
}

.turn-flow-engine-node > header > small {
  color: var(--theme-text-muted);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.turn-flow-engine-node > strong {
  margin-top: 8px;
  color: var(--theme-text);
  font-size: 0.7rem;
  line-height: 1.35;
}

.turn-flow-engine-node > p {
  margin: 6px 0 9px;
  color: var(--theme-text-muted);
  font-size: 0.57rem;
  line-height: 1.42;
}

.turn-flow-engine-node > code {
  color: color-mix(in srgb, var(--turn-flow-blue) 72%, white 28%);
  font-size: 0.51rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.turn-flow-engine-node--optional {
  border-style: dashed;
}

.turn-flow-engine-node--protected {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 58%, var(--theme-panel-border));
}

.turn-flow-engine-node--protected::before {
  background: var(--turn-flow-violet);
}

.turn-flow-engine-node--response {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--turn-flow-blue) 12%, transparent), 0 14px 30px rgb(2 6 23 / 22%);
}

.turn-flow-engine-node--terminal {
  border-color: color-mix(in srgb, var(--turn-flow-green) 56%, var(--theme-panel-border));
}

.turn-flow-engine-node--terminal::before {
  background: var(--turn-flow-green);
}

.turn-flow-split--parallel span {
  color: var(--turn-flow-violet);
}

.turn-flow-connector-definitions {
  position: absolute;
  pointer-events: none;
}

.turn-flow-cylinder-ingress {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) 72px minmax(210px, 1fr) 72px minmax(210px, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 16px 18px 0;
}

.turn-flow-graph-node {
  display: grid;
  align-content: start;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 48%, transparent);
  border-radius: 7px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--turn-flow-blue) 8%, transparent), transparent 52%),
    color-mix(in srgb, var(--turn-flow-panel) 94%, #020617 6%);
  box-shadow: 0 12px 30px rgb(2 6 23 / 20%);
  padding: 12px;
}

.turn-flow-graph-node--transmission,
.turn-flow-graph-node--differential {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 58%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--turn-flow-violet) 10%, transparent), transparent 58%),
    color-mix(in srgb, var(--turn-flow-panel) 94%, #020617 6%);
}

.turn-flow-graph-node > span {
  color: var(--turn-flow-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.turn-flow-graph-node--transmission > span,
.turn-flow-graph-node--differential > span {
  color: #c4b5fd;
}

.turn-flow-graph-node strong {
  margin-top: 5px;
  color: var(--theme-text);
  font-size: 0.75rem;
  line-height: 1.35;
}

.turn-flow-graph-node p {
  margin: 5px 0 8px;
  color: var(--theme-text-muted);
  font-size: 0.6rem;
  line-height: 1.42;
}

.turn-flow-graph-node code {
  color: #c4b5fd;
  font-size: 0.53rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.turn-flow-inline-edge {
  align-self: center;
  width: 100%;
  height: 24px;
  overflow: visible;
}

.turn-flow-inline-edge path {
  fill: none;
  stroke: var(--turn-flow-violet);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.turn-flow-compute-scheduler {
  display: grid;
  gap: 16px;
  margin: 4px 18px 0;
  border: 1px solid color-mix(in srgb, var(--turn-flow-amber) 48%, var(--theme-panel-border));
  border-radius: 7px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--turn-flow-amber) 5%, transparent), transparent 55%),
    rgb(2 6 23 / 28%);
  padding: 15px;
}

.turn-flow-compute-scheduler > header,
.turn-flow-compute-scheduler > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.turn-flow-compute-scheduler > header > div {
  display: grid;
  gap: 3px;
}

.turn-flow-compute-scheduler > header span,
.turn-flow-compute-section-title > span {
  color: var(--turn-flow-amber);
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.turn-flow-compute-contracts {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 2.28fr);
  gap: 16px;
  border-top: 1px solid color-mix(in srgb, var(--turn-flow-blue) 28%, var(--theme-panel-border));
  border-bottom: 1px solid color-mix(in srgb, var(--turn-flow-blue) 28%, var(--theme-panel-border));
  padding: 13px 0;
}

.turn-flow-compute-contracts > ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(155px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.turn-flow-compute-contracts li {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 118px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 34%, var(--theme-panel-border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--turn-flow-blue) 5%, var(--turn-flow-panel));
  padding: 9px 10px;
}

.turn-flow-compute-contracts li > span {
  color: var(--turn-flow-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.turn-flow-compute-contracts li > strong {
  color: var(--theme-text-secondary);
  font-size: 0.6rem;
}

.turn-flow-compute-contracts li > code {
  color: #bae6fd;
  font-size: 0.5rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.turn-flow-compute-contracts li > p {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.5rem;
  line-height: 1.4;
}

.turn-flow-compute-scheduler > header h4 {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.86rem;
}

.turn-flow-compute-scheduler > header code {
  color: color-mix(in srgb, var(--turn-flow-amber) 76%, white 24%);
  font-size: 0.56rem;
}

.turn-flow-compute-route {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.turn-flow-compute-route > li {
  position: relative;
}

.turn-flow-compute-route > li:not(:last-child)::before {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 27px;
  height: 1px;
  background: color-mix(in srgb, var(--turn-flow-amber) 70%, transparent);
  content: "";
}

.turn-flow-compute-route > li:not(:last-child)::after {
  position: absolute;
  top: calc(50% - 4px);
  left: calc(100% + 27px);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--turn-flow-amber);
  content: "";
}

.turn-flow-compute-node {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 132px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-amber) 36%, var(--theme-panel-border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--turn-flow-panel) 96%, #020617 4%);
  box-shadow: 0 12px 26px rgb(2 6 23 / 18%);
  padding: 11px;
}

.turn-flow-compute-node > span {
  color: var(--turn-flow-amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.53rem;
  font-weight: 900;
}

.turn-flow-compute-node > strong {
  color: var(--theme-text-secondary);
  font-size: 0.68rem;
}

.turn-flow-compute-node > p {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.57rem;
  line-height: 1.4;
}

.turn-flow-compute-node > code {
  margin-top: auto;
  color: color-mix(in srgb, var(--turn-flow-amber) 70%, white 30%);
  font-size: 0.51rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.turn-flow-compute-node--scheduler {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 55%, var(--theme-panel-border));
  background: color-mix(in srgb, var(--turn-flow-violet) 7%, var(--turn-flow-panel));
}

.turn-flow-compute-node--result {
  border-color: color-mix(in srgb, var(--turn-flow-green) 46%, var(--theme-panel-border));
}

.turn-flow-compute-allocators,
.turn-flow-compute-inventory {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 2.28fr);
  gap: 16px;
  border-top: 1px solid color-mix(in srgb, var(--turn-flow-amber) 26%, var(--theme-panel-border));
  border-bottom: 1px solid color-mix(in srgb, var(--turn-flow-amber) 26%, var(--theme-panel-border));
  padding: 13px 0;
}

.turn-flow-compute-section-title {
  display: grid;
  align-content: start;
  gap: 4px;
}

.turn-flow-compute-section-title > strong {
  color: var(--theme-text-secondary);
  font-size: 0.66rem;
}

.turn-flow-compute-section-title > small {
  color: var(--theme-text-muted);
  font-size: 0.53rem;
  line-height: 1.42;
}

.turn-flow-compute-allocators > ol,
.turn-flow-compute-inventory > ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.turn-flow-compute-allocators > ol > li,
.turn-flow-compute-inventory > ol > li {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 88px;
  border-left: 2px solid color-mix(in srgb, var(--turn-flow-amber) 56%, transparent);
  background: rgb(var(--theme-surface-rgb) / 42%);
  padding: 8px 9px;
}

.turn-flow-compute-allocators li strong,
.turn-flow-compute-inventory li strong {
  color: var(--theme-text-secondary);
  font-size: 0.58rem;
}

.turn-flow-compute-allocators li span,
.turn-flow-compute-inventory li span {
  color: var(--theme-text-muted);
  font-size: 0.5rem;
  line-height: 1.4;
}

.turn-flow-compute-allocators > ol {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.turn-flow-compute-allocators > ol > li {
  border-left-color: color-mix(in srgb, var(--turn-flow-blue) 70%, transparent);
}

.turn-flow-compute-scheduler > footer {
  align-items: flex-start;
  border-left: 2px solid var(--turn-flow-green);
  padding-left: 10px;
}

.turn-flow-compute-scheduler > footer strong {
  flex: 0 0 auto;
  color: #bbf7d0;
  font-size: 0.58rem;
}

.turn-flow-compute-scheduler > footer span {
  color: var(--theme-text-muted);
  font-size: 0.56rem;
  line-height: 1.4;
}

.turn-flow-compute-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 0;
  border-top: 1px solid var(--theme-panel-border);
  padding: 12px 0 0 18px;
  color: var(--theme-text-muted);
  font-size: 0.51rem;
  line-height: 1.4;
}

.turn-flow-branch-edges {
  display: block;
  width: 100%;
  height: 72px;
  overflow: visible;
}

.turn-flow-branch-edges path {
  fill: none;
  stroke: color-mix(in srgb, var(--turn-flow-violet) 78%, transparent);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.turn-flow-branch-edges--fan-out {
  margin-bottom: -4px;
}

.turn-flow-branch-edges--fan-in {
  margin-top: -4px;
}

.turn-flow-cylinder-bank {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--turn-flow-violet) 52%, var(--theme-panel-border));
  border-radius: 9px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--turn-flow-violet) 7%, transparent), rgb(2 6 23 / 22%)),
    rgb(var(--theme-surface-rgb) / 34%);
  overflow: hidden;
}

.turn-flow-cylinder-bank > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--turn-flow-violet) 30%, var(--theme-panel-border));
  padding: 13px 15px;
}

.turn-flow-cylinder-bank > header div {
  display: grid;
  gap: 3px;
}

.turn-flow-cylinder-bank > header span {
  color: var(--turn-flow-violet);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-flow-cylinder-bank > header h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 1rem;
}

.turn-flow-cylinder-bank > header p {
  margin: 0;
  color: #c4b5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58rem;
}

.turn-flow-cylinder-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 32px;
  padding: 0 26px;
  overflow-x: auto;
  scrollbar-color: color-mix(in srgb, var(--turn-flow-violet) 45%, transparent) transparent;
  scrollbar-width: thin;
}

.turn-flow-cylinder-lane {
  --turn-flow-lane-accent: var(--turn-flow-blue);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  position: relative;
}

.turn-flow-cylinder-lane--reviewer {
  --turn-flow-lane-accent: var(--turn-flow-green);
}

.turn-flow-cylinder-lane--builder {
  --turn-flow-lane-accent: var(--turn-flow-amber);
}

.turn-flow-cylinder-lane--elastic {
  --turn-flow-lane-accent: var(--turn-flow-violet);
}

.turn-flow-cylinder-lane > header {
  min-height: 98px;
  border-top: 2px solid var(--turn-flow-lane-accent);
  padding: 12px 4px 18px;
}

.turn-flow-cylinder-lane > header span {
  color: var(--turn-flow-lane-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 800;
}

.turn-flow-cylinder-lane > header h4 {
  margin: 6px 0 4px;
  color: var(--theme-text);
  font-size: 0.9rem;
}

.turn-flow-cylinder-lane > header p,
.turn-flow-cylinder-lane > footer span {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.turn-flow-cylinder-lane > header > small {
  display: block;
  margin-top: 7px;
  color: color-mix(in srgb, var(--turn-flow-violet) 72%, white 28%);
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

.turn-flow-cylinder-lane > ol {
  position: relative;
  display: grid;
  gap: 30px;
  margin: 0;
  padding: 10px 0 30px;
  list-style: none;
}

.turn-flow-cylinder-lane > ol::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  width: 1px;
  background: linear-gradient(var(--turn-flow-lane-accent), color-mix(in srgb, var(--turn-flow-lane-accent) 28%, transparent));
  content: "";
}

.turn-flow-cylinder-lane > ol > li {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--turn-flow-lane-accent) 34%, var(--theme-panel-border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--turn-flow-panel) 96%, #020617 4%);
  box-shadow: 0 12px 26px rgb(2 6 23 / 20%);
  padding: 11px;
}

.turn-flow-cylinder-lane > ol > li::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--turn-flow-lane-accent);
  content: "";
}

.turn-flow-cylinder-lane > ol > li:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  bottom: -20px;
  left: calc(50% - 4px);
  width: 0;
  height: 0;
  border-top: 6px solid var(--turn-flow-lane-accent);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.turn-flow-cylinder-module--optional {
  border-style: dashed !important;
}

.turn-flow-cylinder-module--protected {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 48%, var(--theme-panel-border)) !important;
  background: color-mix(in srgb, var(--turn-flow-violet) 7%, var(--turn-flow-panel)) !important;
}

.turn-flow-cylinder-module--decision {
  border-color: color-mix(in srgb, var(--turn-flow-amber) 52%, var(--theme-panel-border)) !important;
  background: color-mix(in srgb, var(--turn-flow-amber) 6%, var(--turn-flow-panel)) !important;
}

.turn-flow-cylinder-lane > ol > li > span {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-lane-accent) 48%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--theme-surface) 88%, var(--turn-flow-blue) 12%);
  color: color-mix(in srgb, var(--turn-flow-lane-accent) 72%, white 28%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.56rem;
  font-weight: 900;
}

.turn-flow-cylinder-lane > ol > li > div {
  min-width: 0;
}

.turn-flow-cylinder-lane > ol > li strong {
  color: var(--theme-text-secondary);
  font-size: 0.68rem;
}

.turn-flow-cylinder-lane > ol > li > div > small {
  display: block;
  margin-top: 2px;
  color: var(--turn-flow-blue);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.turn-flow-cylinder-lane > ol > li p {
  margin: 3px 0 5px;
  color: var(--theme-text-muted);
  font-size: 0.59rem;
  line-height: 1.38;
}

.turn-flow-cylinder-lane > ol > li code {
  display: block;
  color: color-mix(in srgb, var(--turn-flow-blue) 66%, white 34%);
  font-size: 0.53rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.turn-flow-cylinder-lane > footer {
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-green) 46%, var(--theme-panel-border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--turn-flow-green) 6%, var(--turn-flow-panel));
  box-shadow: 0 12px 26px rgb(2 6 23 / 18%);
  padding: 12px;
}

.turn-flow-cylinder-lane > footer strong {
  color: #bbf7d0;
  font-size: 0.62rem;
  line-height: 1.4;
}

.turn-flow-cylinder-lane > footer small {
  color: var(--theme-text-muted);
  font-size: 0.52rem;
  line-height: 1.4;
}

.turn-flow-node-internals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.turn-flow-node-internals > li {
  border: 1px solid color-mix(in srgb, var(--turn-flow-violet) 30%, var(--theme-panel-border));
  border-radius: 3px;
  background: color-mix(in srgb, var(--turn-flow-violet) 6%, transparent);
  color: color-mix(in srgb, var(--theme-text-muted) 84%, #ddd6fe 16%);
  font-size: 0.48rem;
  line-height: 1.3;
  padding: 3px 5px;
}

.turn-flow-cylinder-fan-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 0 18px 18px;
}

.turn-flow-cylinder-fan-in .turn-flow-graph-node--fan-in {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--turn-flow-violet) 42%, transparent);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 52%);
  padding: 12px;
}

.turn-flow-cylinder-fan-in span {
  color: var(--turn-flow-violet);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.turn-flow-cylinder-fan-in strong,
.turn-flow-cylinder-fan-in code {
  display: block;
}

.turn-flow-cylinder-fan-in strong {
  margin-top: 3px;
  color: var(--theme-text);
  font-size: 0.75rem;
}

.turn-flow-cylinder-fan-in p {
  margin: 5px 0 7px;
  color: var(--theme-text-muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.turn-flow-cylinder-fan-in code {
  color: #c4b5fd;
  font-size: 0.56rem;
  overflow-wrap: anywhere;
}

.turn-flow-cylinder-scheduler-boundary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  border-top: 1px solid var(--theme-panel-border);
  color: var(--theme-text-muted);
  font-size: 0.59rem;
  line-height: 1.4;
  padding: 10px 13px;
}

.turn-flow-cylinder-scheduler-boundary strong:first-child {
  color: var(--turn-flow-violet);
}

.turn-flow-cylinder-scheduler-boundary strong:last-of-type {
  color: var(--turn-flow-amber);
}

.turn-flow-deep-synthesis {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-violet) 55%, var(--theme-panel-border));
  border-radius: 9px;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--turn-flow-blue) 8%, transparent), transparent 30%),
    radial-gradient(circle at 90% 100%, color-mix(in srgb, var(--turn-flow-violet) 9%, transparent), transparent 36%),
    rgb(2 6 23 / 24%);
  padding: 16px;
}

.turn-flow-deep-synthesis > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.turn-flow-deep-synthesis > header > div {
  display: grid;
  gap: 3px;
}

.turn-flow-deep-synthesis > header span {
  color: var(--turn-flow-violet);
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.turn-flow-deep-synthesis > header h3,
.turn-flow-deep-synthesis > header p {
  margin: 0;
}

.turn-flow-deep-synthesis > header h3 {
  color: var(--theme-text);
  font-size: 0.92rem;
}

.turn-flow-deep-synthesis > header p {
  max-width: 460px;
  color: var(--theme-text-muted);
  font-size: 0.58rem;
  text-align: right;
}

.turn-flow-workload-examples {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.turn-flow-workload-examples article,
.turn-flow-deep-synthesis-authorities article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 5px;
  background: rgb(var(--theme-surface-rgb) / 46%);
  padding: 9px;
}

.turn-flow-workload-examples article:first-child {
  border-color: color-mix(in srgb, var(--turn-flow-violet) 65%, var(--theme-panel-border));
  background: color-mix(in srgb, var(--turn-flow-violet) 8%, var(--turn-flow-panel));
}

.turn-flow-workload-examples strong,
.turn-flow-deep-synthesis-authorities strong {
  color: var(--theme-text-secondary);
  font-size: 0.6rem;
}

.turn-flow-workload-examples span,
.turn-flow-deep-synthesis-authorities span {
  color: var(--theme-text-muted);
  font-size: 0.5rem;
  line-height: 1.4;
}

.turn-flow-deep-synthesis-authorities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.turn-flow-deep-synthesis-authorities article {
  border-top: 2px solid var(--turn-flow-violet);
}

.turn-flow-deep-synthesis-authorities article:nth-child(2) {
  border-top-color: var(--turn-flow-amber);
}

.turn-flow-deep-synthesis-authorities article:nth-child(3) {
  border-top-color: var(--turn-flow-blue);
}

.turn-flow-deep-synthesis > footer {
  display: flex;
  gap: 8px;
  border-left: 2px solid var(--turn-flow-amber);
  padding-left: 10px;
  color: var(--theme-text-muted);
  font-size: 0.54rem;
}

.turn-flow-subagent-example {
  display: grid;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--turn-flow-violet) 42%, var(--theme-panel-border));
  border-radius: 8px;
  background: rgb(var(--theme-surface-rgb) / 30%);
  padding: 13px;
}

.turn-flow-subagent-example > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--theme-panel-border);
  padding-bottom: 9px;
}

.turn-flow-subagent-example > header > div {
  display: grid;
  gap: 3px;
}

.turn-flow-subagent-example > header span,
.turn-flow-subagent-example section > span,
.turn-flow-branch-analysis-integrator > span {
  color: var(--turn-flow-violet);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.turn-flow-subagent-example > header h4,
.turn-flow-subagent-example > header p {
  margin: 0;
}

.turn-flow-subagent-example > header h4 {
  color: var(--theme-text-secondary);
  font-size: 0.76rem;
}

.turn-flow-subagent-example > header p {
  color: var(--theme-text-muted);
  font-size: 0.54rem;
}

.turn-flow-branch-analysis-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.turn-flow-branch-analysis-inputs section,
.turn-flow-branch-analysis-subagents section,
.turn-flow-deep-synthesis-branches section,
.turn-flow-deep-synthesis-products section,
.turn-flow-deep-synthesis-run,
.turn-flow-branch-analysis-integrator {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--turn-flow-panel) 96%, #020617 4%);
  padding: 11px;
}

.turn-flow-branch-analysis-inputs strong,
.turn-flow-branch-analysis-subagents strong,
.turn-flow-deep-synthesis-branches strong,
.turn-flow-deep-synthesis-products strong,
.turn-flow-deep-synthesis-run strong,
.turn-flow-branch-analysis-integrator strong {
  color: var(--theme-text-secondary);
  font-size: 0.64rem;
}

.turn-flow-branch-analysis-inputs p,
.turn-flow-branch-analysis-subagents p,
.turn-flow-deep-synthesis-products p,
.turn-flow-deep-synthesis-run p,
.turn-flow-branch-analysis-integrator p {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.52rem;
  line-height: 1.42;
}

.turn-flow-branch-analysis-inputs code,
.turn-flow-branch-analysis-subagents code,
.turn-flow-deep-synthesis-branches code,
.turn-flow-deep-synthesis-products code,
.turn-flow-deep-synthesis-run code,
.turn-flow-branch-analysis-integrator code {
  margin-top: auto;
  color: #c4b5fd;
  font-size: 0.5rem;
  overflow-wrap: anywhere;
}

.turn-flow-example-edge {
  display: block;
  width: 100%;
  height: 64px;
  margin: -8px 0;
  overflow: visible;
}

.turn-flow-example-edge path {
  fill: none;
  stroke: color-mix(in srgb, var(--turn-flow-violet) 72%, transparent);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

.turn-flow-branch-analysis-subagents,
.turn-flow-deep-synthesis-branches,
.turn-flow-deep-synthesis-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.turn-flow-branch-analysis-subagents section {
  border-top: 2px solid var(--turn-flow-blue);
}

.turn-flow-branch-analysis-integrator,
.turn-flow-deep-synthesis-run {
  justify-self: center;
  width: min(100%, 680px);
  border-color: color-mix(in srgb, var(--turn-flow-green) 48%, var(--theme-panel-border));
  background: color-mix(in srgb, var(--turn-flow-green) 5%, transparent);
}

.turn-flow-deep-synthesis-branches section {
  border-top: 2px solid var(--turn-flow-violet);
  min-height: 92px;
}

.turn-flow-deep-synthesis-products section:nth-child(1) {
  border-top: 2px solid var(--turn-flow-violet);
}

.turn-flow-deep-synthesis-products section:nth-child(2) {
  border-top: 2px solid var(--turn-flow-amber);
}

.turn-flow-deep-synthesis-products section:nth-child(3) {
  border-top: 2px solid var(--turn-flow-green);
}

.turn-flow-subagent-example > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 0;
  padding: 9px 0 0 16px;
  border-top: 1px solid var(--theme-panel-border);
  color: var(--theme-text-muted);
  font-size: 0.51rem;
  line-height: 1.4;
}

.turn-flow-boundary-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid color-mix(in srgb, var(--turn-flow-blue) 30%, var(--theme-panel-border));
  border-radius: 7px;
  background: rgb(2 6 23 / 30%);
  overflow: hidden;
}

.turn-flow-boundary-map > div {
  min-width: 0;
  padding: 12px;
}

.turn-flow-boundary-map > div + div {
  border-left: 1px solid var(--theme-panel-border);
}

.turn-flow-boundary-map span,
.turn-flow-boundary-map code {
  display: block;
}

.turn-flow-boundary-map span {
  color: var(--turn-flow-blue);
  font-size: 0.68rem;
  font-weight: 850;
}

.turn-flow-boundary-map code {
  margin-top: 5px;
  color: var(--theme-text-muted);
  font-size: 0.59rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.turn-flow-module-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 12px;
  list-style: none;
}

.turn-flow-module-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 12px;
  gap: 8px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 56%);
  padding: 9px;
  opacity: 0.82;
  cursor: not-allowed;
}

.turn-flow-module-list__handle,
.turn-flow-module-list__lock {
  color: var(--theme-text-muted);
  font-size: 0.75rem;
}

.turn-flow-module-list strong {
  color: var(--theme-text);
  font-size: 0.72rem;
}

.turn-flow-module-list small {
  margin-left: 5px;
  color: var(--theme-text-muted);
  font-size: 0.54rem;
}

.turn-flow-module-list p {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.turn-flow-variable-drawer {
  margin: 0 12px 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 6px;
  background: rgb(var(--theme-surface-rgb) / 46%);
}

.turn-flow-variable-drawer summary {
  color: var(--theme-text-secondary);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 11px;
}

.turn-flow-variable-drawer summary small {
  color: var(--theme-text-muted);
  font-size: 0.55rem;
  font-weight: 600;
}

.turn-flow-variable-drawer dl {
  margin: 0;
  border-top: 1px solid var(--theme-panel-border);
  padding: 4px 11px 11px;
}

.turn-flow-variable-drawer dl > div {
  border-bottom: 1px solid var(--theme-panel-border);
  padding: 8px 0;
}

.turn-flow-variable-drawer dt {
  color: var(--theme-text-secondary);
  font-size: 0.65rem;
  font-weight: 800;
}

.turn-flow-variable-drawer dd {
  margin: 2px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.59rem;
  line-height: 1.4;
}

.turn-flow-studio-footer {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 14px;
  border-top: 1px solid var(--theme-panel-border);
  color: var(--theme-text-muted);
  font-size: 0.7rem;
  padding: 16px 2px 4px;
}

.turn-flow-studio-footer strong {
  color: var(--theme-text-secondary);
}

@media (max-width: 1180px) {
  .turn-flow-workspace__body {
    grid-template-columns: 1fr;
  }

  .turn-flow-canvas {
    border-right: 0;
    border-bottom: 1px solid var(--theme-panel-border);
  }

  .turn-flow-module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .turn-flow-entry-profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .turn-flow-entry-profiles__intake {
    grid-column: 1 / -1;
  }

  .turn-flow-workload-examples,
  .turn-flow-deep-synthesis-branches,
  .turn-flow-branch-analysis-subagents,
  .turn-flow-deep-synthesis-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 820px) {
  .turn-flow-studio-header,
  .turn-flow-workspace__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-lanes,
  .turn-flow-future-intro,
  .turn-flow-boundary-map,
  .turn-flow-cylinder-columns,
  .turn-flow-cylinder-fan-in,
  .turn-flow-cylinder-ingress,
  .turn-flow-compute-route,
  .turn-flow-compute-contracts,
  .turn-flow-compute-allocators,
  .turn-flow-compute-inventory,
  .turn-flow-workload-examples,
  .turn-flow-deep-synthesis-authorities,
  .turn-flow-deep-synthesis-branches {
    grid-template-columns: 1fr;
  }

  .turn-flow-compute-contracts > ol {
    grid-template-columns: 1fr;
  }

  .turn-flow-branch-analysis-inputs,
  .turn-flow-branch-analysis-subagents,
  .turn-flow-deep-synthesis-products,
  .turn-flow-compute-rules,
  .turn-flow-subagent-example > ul {
    grid-template-columns: 1fr;
  }

  .turn-flow-deep-synthesis > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-deep-synthesis > header p {
    text-align: left;
  }

  .turn-flow-example-edge {
    display: none;
  }

  .turn-flow-subagent-example > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-application-wrapper > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-consolidation > header,
  .turn-flow-consolidation > footer {
    flex-direction: column;
  }

  .turn-flow-consolidation > header p,
  .turn-flow-consolidation > footer span {
    text-align: left;
  }

  .turn-flow-consolidation > ol {
    grid-template-columns: 1fr;
  }

  .turn-flow-cylinder-bank > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-cylinder-ingress,
  .turn-flow-cylinder-fan-in,
  .turn-flow-compute-route {
    gap: 10px;
  }

  .turn-flow-compute-route > li:not(:last-child)::before,
  .turn-flow-compute-route > li:not(:last-child)::after {
    display: none;
  }

  .turn-flow-compute-scheduler > header,
  .turn-flow-compute-scheduler > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-branch-edges {
    display: none;
  }

  .turn-flow-inline-edge {
    justify-self: center;
    width: 54px;
    transform: rotate(90deg);
  }

  .turn-flow-cylinder-columns {
    padding-top: 18px;
  }

  .turn-flow-boundary-map > div + div {
    border-top: 1px solid var(--theme-panel-border);
    border-left: 0;
  }

  .turn-flow-module-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .turn-flow-workspace__header,
  .turn-flow-canvas {
    padding: 15px;
  }

  .turn-flow-studio-jump,
  .turn-flow-workspace__preview-actions,
  .turn-flow-studio-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .turn-flow-step__nested {
    grid-template-columns: 1fr;
  }

  .turn-flow-transition {
    grid-template-columns: 1fr;
  }

  .turn-flow-entry-profiles {
    grid-template-columns: 1fr;
  }

  .turn-flow-transition i {
    display: none;
  }
}

.application-settings-disclaimer {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px);
  border-color: rgba(245, 158, 11, 0.48);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(69, 37, 14, 0.82), rgba(24, 20, 23, 0.92) 54%, rgb(var(--theme-surface-rgb) / 90%));
  box-shadow:
    inset 4px 0 0 rgba(245, 158, 11, 0.78),
    0 20px 54px rgba(5, 10, 22, 0.26);
}

.application-settings-disclaimer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.22);
}

.application-settings-disclaimer__header h2 {
  max-width: 820px;
  margin: 4px 0 10px;
  color: var(--theme-text);
  font-size: clamp(1.45rem, 2.3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.application-settings-disclaimer__header p:last-child {
  max-width: 880px;
  margin: 0;
  color: var(--theme-text-secondary);
  line-height: 1.55;
}

.application-settings-disclaimer__status {
  flex: 0 0 auto;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.52);
  color: #fde68a;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  text-transform: uppercase;
}

.application-settings-disclaimer__findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: application-setting-finding;
}

.application-settings-disclaimer__findings li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 18px 18px 18px 58px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  background: rgba(8, 13, 19, 0.48);
  counter-increment: application-setting-finding;
}

.application-settings-disclaimer__findings li::before {
  position: absolute;
  top: 17px;
  left: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 9px;
  background: rgba(120, 53, 15, 0.64);
  color: #fde68a;
  content: counter(application-setting-finding);
  font-size: 0.78rem;
  font-weight: 900;
}

.application-settings-disclaimer__findings strong {
  color: #fef3c7;
  font-size: 0.98rem;
  line-height: 1.35;
}

.application-settings-disclaimer__findings p {
  margin: 0;
  color: var(--theme-text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.application-settings-disclaimer__findings code {
  overflow-wrap: anywhere;
}

.application-settings-disclaimer__source {
  color: #fbbf24;
  font-size: 0.74rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .application-settings-disclaimer__header {
    display: grid;
  }

  .application-settings-disclaimer__status {
    justify-self: start;
  }

  .application-settings-disclaimer__findings {
    grid-template-columns: 1fr;
  }
}

.settings-dashboard-header-actions,
.settings-dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.settings-dashboard-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.settings-dashboard-form-grid {
  display: grid;
  gap: 16px;
}

.settings-dashboard-form {
  display: grid;
  gap: 24px;
}

.settings-dashboard-form-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.settings-dashboard-field {
  display: grid;
  gap: 6px;
}

.settings-dashboard-field label,
.settings-dashboard-form-grid label {
  color: var(--theme-text);
  font-weight: 700;
}

.settings-dashboard-field input[type="text"],
.settings-dashboard-field input[type="email"],
.settings-dashboard-field input[type="password"],
.settings-dashboard-field input[type="number"],
.settings-dashboard-field input[type="datetime-local"],
.settings-dashboard-field input[type="time"],
.settings-dashboard-field select,
.settings-dashboard-field textarea,
.settings-dashboard-form-grid input[type="text"],
.settings-dashboard-form-grid input[type="email"],
.settings-dashboard-form-grid input[type="password"],
.settings-dashboard-form-grid input[type="number"],
.settings-dashboard-form-grid input[type="datetime-local"],
.settings-dashboard-form-grid input[type="time"],
.settings-dashboard-form-grid select,
.settings-dashboard-form-grid textarea {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 28.0%, transparent);
  background: rgba(10, 16, 30, 0.78);
  color: var(--theme-text);
  padding: 10px 12px;
  box-sizing: border-box;
}

.settings-dashboard-checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--theme-text);
  font-weight: 700;
}

.settings-dashboard-help {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  min-height: 1.35em;
}

.settings-dashboard-help--error {
  color: #fca5a5;
}

.settings-dashboard-disclosure {
  display: grid;
  gap: 16px;
}

.settings-dashboard-disclosure-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.settings-dashboard-disclosure-summary::-webkit-details-marker {
  display: none;
}

.settings-dashboard-disclosure-title {
  display: block;
  margin-top: 4px;
  color: var(--theme-text);
  font-size: 1.15rem;
  font-weight: 800;
}

.settings-dashboard-disclosure-action {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 36.0%, transparent);
  border-radius: 999px;
  background: rgb(var(--theme-primary-rgb) / 22.0%);
  color: var(--theme-primary-faint);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
}

.utility-routing-tier-grid {
  display: grid;
  gap: 18px;
}

.utility-routing-tier-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: rgba(8, 15, 30, 0.62);
  padding: 18px;
}

.utility-routing-tier-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.utility-routing-tier-card-header h4 {
  margin: 3px 0 0;
  color: var(--theme-text);
  font-size: 1.05rem;
}

.utility-routing-tier-card-topline {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

.utility-routing-current-values {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 220px);
}

.utility-routing-reset-button {
  min-height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}

.utility-routing-tier-card .settings-dashboard-chip {
  max-width: min(100%, 320px);
  overflow-wrap: anywhere;
}

.utility-routing-provider-field {
  grid-column: 1 / -1;
}

.utility-paid-fallback-card {
  border-color: rgba(245, 158, 11, 0.56);
  background: linear-gradient(145deg, rgba(69, 38, 8, 0.42), rgba(8, 15, 30, 0.72));
}

.utility-paid-fallback-warning {
  border: 1px solid rgba(245, 158, 11, 0.58);
  border-radius: 10px;
  background: rgba(120, 53, 15, 0.28);
  color: #fde7b2;
  padding: 14px 16px;
}

.utility-paid-fallback-warning strong {
  color: #fff4d6;
  font-size: 0.94rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.utility-paid-fallback-warning p {
  margin: 7px 0 0;
}

.utility-paid-fallback-toggle {
  align-items: center;
  display: flex;
  gap: 10px;
}

.utility-paid-fallback-toggle input[type="checkbox"] {
  height: 18px;
  margin: 0;
  width: 18px;
}

@media (max-width: 760px) {
  .utility-routing-tier-card-header {
    display: grid;
  }

  .utility-routing-tier-card-topline,
  .utility-routing-current-values {
    justify-content: flex-start;
    min-width: 0;
  }
}

.profile-picture-card {
  gap: 18px;
}

.profile-picture-editor,
.dashboard-profile-hero-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.profile-picture-preview,
.dashboard-profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 34.0%, transparent);
  background: linear-gradient(135deg, rgba(21, 94, 117, 0.68), rgba(88, 28, 135, 0.62));
  box-shadow: 0 18px 40px rgba(5, 10, 22, 0.32);
  color: var(--theme-text);
  flex: 0 0 auto;
}

.dashboard-profile-avatar {
  width: 86px;
  height: 86px;
}

.profile-picture-avatar-image,
.dashboard-profile-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.profile-picture-initials {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--theme-text);
}

.dashboard-profile-avatar .profile-picture-initials {
  font-size: 1.16rem;
}

.profile-picture-form-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-picture-file-field {
  color: var(--theme-text);
}

.profile-picture-file-field::file-selector-button {
  margin-right: 12px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 32.0%, transparent);
  border-radius: 10px;
  background: rgb(var(--theme-primary-rgb) / 24.0%);
  color: var(--theme-text);
  padding: 8px 12px;
  cursor: pointer;
}

.profile-picture-remove-actions {
  margin-top: 0;
}

.profile-theme-card {
  background:
    radial-gradient(circle 440px at top right, rgb(var(--theme-primary-rgb) / 16%), transparent 70%),
    linear-gradient(135deg, var(--theme-surface), var(--theme-surface-lift));
}

.profile-theme-default-form {
  margin: 0;
}

.profile-theme-default-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.profile-theme-presets {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--theme-surface) 82%, transparent);
}

.profile-theme-presets-heading,
.profile-theme-preset-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-theme-presets-heading strong,
.profile-theme-preset-title strong {
  color: var(--theme-text);
}

.profile-theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-theme-preset-form {
  margin: 0;
}

.profile-theme-preset-form:first-child {
  grid-column: 1 / -1;
}

.profile-theme-preset {
  display: grid;
  gap: 13px;
  width: 100%;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--color-border-control);
  border-radius: 12px;
  background: var(--color-surface-control);
  color: var(--theme-text);
  text-align: left;
  cursor: pointer;
}

.profile-theme-preset-form:first-child .profile-theme-preset {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
}

.profile-theme-preset:hover {
  border-color: var(--color-border-active);
  background: rgb(var(--theme-primary-rgb) / 16%);
}

.profile-theme-preset.is-selected {
  border-color: rgba(34, 197, 94, 0.58);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.profile-theme-preset--dark-mode,
.profile-theme-preset--dark-mode:hover,
.profile-theme-preset--dark-mode.is-selected {
  background: #08090a;
}

.profile-theme-preset--dark-mode .profile-theme-preset-title strong {
  color: #eceff1;
  font-style: italic;
}

.profile-theme-preset--dark-mode .profile-theme-preset-description {
  color: #aeb4ba;
}

.profile-theme-preset-copy {
  display: grid;
  gap: 5px;
}

.profile-theme-preset-description {
  color: var(--theme-text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.profile-theme-preset-swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.profile-theme-preset-swatches span {
  height: 18px;
  border-radius: 5px;
  background: var(--profile-theme-preset-swatch);
  box-shadow: inset 0 0 0 1px rgb(var(--theme-text-rgb) / 18%);
}

.profile-theme-custom-heading {
  margin: 2px 0 12px;
}

.profile-theme-custom-heading strong {
  color: var(--theme-text);
}

.profile-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.profile-theme-decoration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-theme-border-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--theme-surface) 82%, transparent);
}

.profile-theme-border-setting strong {
  display: block;
  color: var(--theme-text);
  margin-bottom: 4px;
}

.profile-theme-border-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 112px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--color-surface-control);
  color: var(--theme-primary-faint);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-theme-border-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--theme-primary);
}

.profile-theme-border-state--enabled,
.profile-theme-border-toggle input:checked ~ .profile-theme-border-state--disabled {
  display: none;
}

.profile-theme-border-toggle input:checked ~ .profile-theme-border-state--enabled {
  display: inline;
}

.profile-theme-field {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--color-border-control);
  border-radius: 12px;
  background: color-mix(in srgb, var(--theme-surface) 82%, transparent);
}

.profile-theme-color-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-theme-color-control input[type="color"] {
  width: 58px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--color-border-active);
  border-radius: 10px;
  background: var(--theme-surface);
  cursor: pointer;
}

.profile-theme-color-control code {
  color: var(--theme-primary-faint);
  font-size: 0.82rem;
}

.profile-password-confirmation-overlay[hidden] {
  display: none !important;
}

.profile-password-confirmation-card {
  width: min(520px, calc(100vw - 40px));
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--theme-primary-pale) 28.0%, transparent);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--theme-primary-pale) 12.0%, transparent), transparent 30%),
    linear-gradient(135deg, rgb(var(--theme-surface-rgb) / 96.0%), rgba(17, 24, 39, 0.92));
}

.profile-password-confirmation-card h3 {
  text-align: left;
  margin-bottom: 8px;
}

.profile-password-confirmation-copy {
  margin: 0 0 14px;
}

.profile-password-confirmation-actions {
  justify-content: flex-end;
}

.profile-confirmation-hidden-submit {
  display: none !important;
}

.settings-dashboard-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.project-scheduler-settings-page .provider-settings-shell {
  max-width: 1180px;
}

.project-scheduler-settings-hero {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.project-scheduler-settings-form {
  margin-top: 1.5rem;
}

.project-scheduler-settings-control-card,
.project-scheduler-engine-card {
  border-color: rgba(73, 190, 205, 0.28);
}

.project-scheduler-enabled-field {
  margin: 1.35rem 0;
}

.project-scheduler-engine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.project-scheduler-engine-card h2 {
  margin: 0.35rem 0 0.75rem;
}

.project-scheduler-apply-row {
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.project-scheduler-apply-button {
  appearance: none;
  background: linear-gradient(135deg, #16a86f, #0b7f58);
  border: 1px solid rgba(126, 255, 198, 0.55);
  border-radius: 0.75rem;
  box-shadow: 0 12px 26px rgba(4, 99, 66, 0.28);
  color: #f3fff9;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  min-width: min(100%, 330px);
  padding: 0.9rem 1.35rem;
}

.project-scheduler-apply-button:hover,
.project-scheduler-apply-button:focus-visible {
  background: linear-gradient(135deg, #1cbd7e, #0d9164);
}

@media (max-width: 760px) {
  .project-scheduler-settings-hero,
  .project-scheduler-engine-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-scheduler-apply-button {
    width: 100%;
  }
}

.settings-dashboard-empty {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  color: var(--theme-text-muted);
}

.settings-dashboard-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-dashboard-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 22.0%, transparent);
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  color: var(--theme-primary-faint);
  padding: 5px 10px;
  font-size: 0.84rem;
}

.sensitive-vault-state-label {
  white-space: nowrap;
}

.sensitive-vault-profile-state-label {
  color: var(--theme-text);
  font-size: 0.96rem;
  font-weight: 700;
}

.sensitive-vault-saved-state-grid {
  align-items: start;
}

.sensitive-vault-value-card {
  gap: 16px;
  min-height: 100%;
}

.sensitive-vault-value-card--complete {
  border-color: rgba(74, 222, 128, 0.34);
}

.sensitive-vault-value-card .settings-dashboard-chip-cloud {
  align-items: flex-start;
}

.sensitive-vault-saved-secret-chip {
  border-color: rgba(74, 222, 128, 0.34);
  border-radius: 10px;
  padding: 7px;
  background: rgba(20, 83, 45, 0.14);
}

.sensitive-vault-encrypted-value-button {
  appearance: none;
  border: 1px solid rgba(74, 222, 128, 0.34);
  border-radius: 10px;
  background: var(--theme-surface-lift);
  color: var(--theme-text);
  padding: 8px 12px;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.sensitive-vault-encrypted-value-button::before {
  content: "**** ";
  letter-spacing: 0;
  color: #86efac;
}

.sensitive-vault-encrypted-value-button:hover,
.sensitive-vault-encrypted-value-button:focus {
  border-color: rgba(74, 222, 128, 0.62);
  background: rgba(20, 83, 45, 0.34);
}

.sensitive-vault-revoke-form {
  margin: 0;
}

.sensitive-vault-revoke-button {
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1;
}

.sensitive-vault-secret-overlay[hidden] {
  display: none !important;
}

.sensitive-vault-secret-card {
  width: min(520px, calc(100vw - 40px));
  border-radius: 18px;
  border-color: var(--theme-panel-border);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--theme-primary-pale) 12.0%, transparent), transparent 30%),
    linear-gradient(135deg, rgb(var(--theme-surface-rgb) / 96.0%), rgba(17, 24, 39, 0.92));
}

.sensitive-vault-secret-card h3 {
  text-align: left;
  margin-bottom: 8px;
}

.sensitive-vault-secret-copy {
  margin: 0 0 14px;
}

.sensitive-vault-secret-actions {
  justify-content: flex-end;
}

.settings-dashboard-table-card {
  padding: 22px;
}

.settings-dashboard-table-card .mcp-dashboard-table td:last-child,
.settings-dashboard-table-card .mcp-dashboard-table th:last-child {
  text-align: right;
}

.settings-dashboard-danger-card {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.1), transparent 28%),
    rgb(var(--theme-surface-rgb) / 84.0%);
}

.tasks-dashboard-page .dashboard-hero {
  border-color: var(--theme-panel-border);
}

.tasks-dashboard-hero h1 {
  font-family: var(--font-family-ui);
  font-weight: 500;
}

.tasks-dashboard-card {
  min-width: 0;
}

.tasks-filter-form {
  margin-top: 4px;
}

.tasks-metrics-dock .dashboard-card-grid {
  margin-bottom: 0;
}

.tasks-dashboard-table-card {
  overflow: visible;
}

.tasks-dashboard-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 16px;
}

.tasks-dashboard-table-wrap:has(.task-row-actions[open]) {
  overflow: visible;
}

.tasks-dashboard-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

.tasks-dashboard-table--compact {
  min-width: 720px;
}

.tasks-dashboard-table th,
.tasks-dashboard-table td {
  padding-right: 12px;
}

.tasks-dashboard-table th:last-child,
.tasks-dashboard-table td:last-child {
  padding-right: 0;
}

.tasks-col-reference { width: 10%; }
.tasks-col-title { width: 23%; }
.tasks-col-project { width: 13%; }
.tasks-col-status { width: 11%; }
.tasks-col-type { width: 11%; }
.tasks-col-priority { width: 8%; }
.tasks-col-assignee { width: 12%; }
.tasks-col-due { width: 9%; }
.tasks-col-actions { width: 3%; }

.tasks-dashboard-table td {
  overflow-wrap: anywhere;
}

.tasks-dashboard-table .tasks-col-actions,
.tasks-dashboard-table th:last-child,
.tasks-dashboard-table td:last-child {
  text-align: right;
}

.tasks-dashboard-table tbody tr:has(.task-row-actions[open]),
.tasks-dashboard-table td:has(.task-row-actions[open]) {
  position: relative;
  z-index: 4200;
}

.tasks-dashboard-table td:has(.task-row-actions) {
  overflow: visible;
}

.tasks-status-badge {
  min-width: 0;
  white-space: nowrap;
}

.tasks-dashboard-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.tasks-dashboard-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--theme-text);
}

.tasks-dashboard-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.tasks-inline-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--theme-text);
}

.tasks-inline-panel--warning {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(217, 119, 6, 0.09);
}

.tasks-inline-panel--danger {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.16);
}

.tasks-inline-panel ul {
  margin: 0;
  padding-left: 20px;
}

.tasks-inline-panel pre,
.tasks-dashboard-card pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
}

.tasks-subsection-heading {
  margin-top: 18px;
}

.tasks-subsection-heading h4 {
  margin: 0;
  text-align: left;
}

.tasks-form-error-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.tasks-form-actions {
  margin-top: 0;
}

.tasks-campaign-bootstrap-card .mcp-dashboard-meta-grid dd {
  line-height: 1.45;
}

.task-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 24.0%, transparent);
  background: rgb(var(--theme-primary-rgb) / 14.0%);
  color: var(--theme-primary-pale);
  font-size: 0.86rem;
  font-weight: 700;
}

.task-status-blocked {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(220, 38, 38, 0.16);
  color: #fecaca;
}

.secondary-navbar-link.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.users-dashboard-table-card {
  overflow: hidden;
}

.users-dashboard-table-card .users-table {
  table-layout: fixed;
}

.users-dashboard-table-card .users-table th,
.users-dashboard-table-card .users-table td {
  padding-right: 14px;
}

.users-dashboard-table-card .users-table th:last-child,
.users-dashboard-table-card .users-table td:last-child {
  width: 190px;
}

.users-dashboard-table-card .settings-dashboard-actions {
  justify-content: flex-end;
}

.providers-filter-rail {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.providers-filter-card {
  color: inherit;
  text-decoration: none;
}

.providers-filter-card:hover,
.providers-filter-card:focus {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 48.0%, transparent);
  transform: translateY(-1px);
}

.providers-filter-card.is-active {
  border-color: color-mix(in srgb, var(--theme-primary-pale) 62.0%, transparent);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--theme-primary-pale) 16.0%, transparent), transparent 34%),
    rgb(var(--theme-surface-rgb) / 88.0%);
  box-shadow: 0 18px 45px rgb(var(--theme-surface-rgb) / 34.0%), inset 0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 8.0%, transparent);
}

.providers-dashboard-table-wrap {
  width: 100%;
  border-radius: 16px;
}

.providers-dashboard-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.providers-dashboard-table th,
.providers-dashboard-table td {
  padding-right: 12px;
}

.providers-dashboard-table th:last-child,
.providers-dashboard-table td:last-child {
  padding-right: 0;
}

.providers-col-name { width: 12%; }
.providers-col-agent { width: 11%; }
.providers-col-role { width: 11%; }
.providers-col-url { width: 20%; }
.providers-col-model { width: 13%; }
.providers-col-type { width: 7%; }
.providers-col-status { width: 9%; }
.providers-col-enabled { width: 6%; }
.providers-col-actions { width: 5%; }

.providers-dashboard-primary-cell {
  font-weight: 700;
  color: var(--theme-text);
}

.provider-compact-value,
.providers-dashboard-table code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.providers-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
}

.provider-row-actions {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
  z-index: 120;
}

.provider-row-actions[open] {
  z-index: 2800;
}

.provider-row-menu {
  list-style: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 30.0%, transparent);
  border-radius: 10px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  color: var(--theme-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.provider-row-menu::-webkit-details-marker {
  display: none;
}

.provider-row-menu:hover,
.provider-row-menu:focus {
  border-color: color-mix(in srgb, var(--theme-primary-soft) 56.0%, transparent);
  background: rgba(30, 41, 59, 0.92);
}

.provider-row-menu-icon {
  display: grid;
  gap: 4px;
  width: 16px;
}

.provider-row-menu-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--theme-primary-faint);
}

.provider-row-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 8px;
  min-width: 150px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 24.0%, transparent);
  border-radius: 12px;
  background: var(--theme-surface);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.provider-row-actions[open] .provider-row-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.provider-row-action-link,
.provider-row-action-form,
.provider-row-popover form,
.provider-row-popover .button_to {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.provider-row-popover .navbar-button {
  justify-content: center;
}

.admin-data-reset-hero {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.16), transparent 30%),
    radial-gradient(circle at 12% 16%, color-mix(in srgb, var(--theme-primary-pale) 12.0%, transparent), transparent 28%),
    linear-gradient(135deg, rgb(var(--theme-surface-rgb) / 96.0%), rgba(24, 22, 34, 0.9));
}

.admin-data-reset-confirmation-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  border-radius: 999px;
  background: rgba(69, 26, 26, 0.34);
  color: #fecaca;
  font-size: 0.9rem;
}

.admin-data-reset-confirmation-pill code {
  color: #fee2e2;
}

.admin-data-reset-overview .dashboard-card {
  min-height: 154px;
}

.admin-data-reset-grid {
  align-items: stretch;
}

.admin-data-reset-side-stack {
  display: grid;
  gap: 24px;
}

.admin-data-reset-populated-card {
  gap: 18px;
}

.admin-data-reset-table td:last-child,
.admin-data-reset-table th:last-child {
  text-align: right;
}

.admin-data-reset-details {
  margin-top: 6px;
}

.admin-data-reset-list {
  gap: 10px;
}

.admin-data-reset-list code {
  color: var(--theme-text);
}

.admin-data-reset-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-data-reset-chip-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 22.0%, transparent);
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  color: var(--theme-primary-faint);
  padding: 5px 10px;
  font-size: 0.84rem;
}

.admin-data-reset-preserved-card {
  max-height: 420px;
  overflow: auto;
}

.admin-data-reset-apply-card {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.12), transparent 28%),
    rgb(var(--theme-surface-rgb) / 84.0%);
}

.admin-data-reset-form {
  display: grid;
  gap: 10px;
}

.admin-data-reset-form label {
  color: var(--theme-text);
  font-weight: 700;
}

.admin-data-reset-confirm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-data-reset-confirm-row input[type="text"] {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(10, 16, 30, 0.82);
  color: var(--theme-text);
  padding: 10px 12px;
  box-sizing: border-box;
}

@media (max-width: 780px) {
  .admin-data-reset-confirm-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-inline-form {
  display: inline-block;
}

.dashboard-task-card {
  margin-bottom: 24px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background: rgb(var(--theme-surface-rgb) / 84.0%);
  padding: 22px;
}

.dashboard-overdue-alert {
  margin-bottom: 24px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(30, 12, 18, 0.96), rgb(var(--theme-surface-rgb) / 90.0%));
  padding: 22px;
}

.dashboard-task-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.dashboard-task-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
}

.dashboard-task-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-task-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}

.dashboard-task-title,
.dashboard-task-subtitle {
  margin: 0;
}

.dashboard-task-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.dashboard-task-title::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 0.28em;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(191, 219, 254, 0.95) 35%, rgb(var(--theme-primary-rgb) / 90.0%) 70%, rgb(var(--theme-primary-rgb) / 85.0%) 100%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 20.0%, transparent),
    0 0 12px rgb(var(--theme-primary-rgb) / 30.0%);
}

.dashboard-task-title--campaign-success::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(187, 247, 208, 0.95) 35%, rgba(74, 222, 128, 0.9) 70%, rgba(22, 163, 74, 0.85) 100%);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.24),
    0 0 12px rgba(22, 163, 74, 0.34);
}

.dashboard-task-title--campaign-warning::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(253, 230, 138, 0.95) 35%, rgba(251, 191, 36, 0.9) 70%, rgba(217, 119, 6, 0.85) 100%);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.24),
    0 0 12px rgba(217, 119, 6, 0.3);
}

.dashboard-task-title--campaign-danger::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(254, 202, 202, 0.95) 35%, rgba(248, 113, 113, 0.9) 70%, rgba(220, 38, 38, 0.85) 100%);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.24),
    0 0 12px rgba(220, 38, 38, 0.3);
}

.dashboard-task-title--campaign-info::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(226, 232, 240, 0.95) 35%, rgba(148, 163, 184, 0.9) 70%, rgba(71, 85, 105, 0.85) 100%);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.24),
    0 0 12px rgba(71, 85, 105, 0.3);
}

.dashboard-overdue-alert .dashboard-task-title::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(254, 202, 202, 0.95) 35%, rgba(248, 113, 113, 0.9) 70%, rgba(220, 38, 38, 0.85) 100%);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.22),
    0 0 12px rgba(220, 38, 38, 0.26);
}

.dashboard-task-subtitle {
  color: var(--theme-text-secondary);
}

.dashboard-task-campaign-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dashboard-task-campaign-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dashboard-task-campaign-status-label {
  font-weight: 600;
}

.dashboard-task-campaign-status-label--success {
  color: #bbf7d0;
}

.dashboard-task-campaign-status-label--warning {
  color: #fde68a;
}

.dashboard-task-campaign-status-label--danger {
  color: #fecaca;
}

.dashboard-task-campaign-status-label--info {
  color: var(--theme-text-secondary);
}

.dashboard-task-campaign-approval {
  min-width: 0;
  padding: 4px 8px;
}

.dashboard-task-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-activity-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background: rgb(var(--theme-surface-rgb) / 84.0%);
  padding: 22px;
}

.dashboard-activity-list {
  display: grid;
  gap: 14px;
}

.dashboard-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
}

.dashboard-activity-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-activity-badge {
  min-width: 68px;
  border-radius: 999px;
  padding: 6px 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operator-decision-badge {
  min-width: 0;
}

.dashboard-activity-badge--info {
  background: rgb(var(--theme-primary-rgb) / 18.0%);
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 30.0%, transparent);
  color: var(--theme-primary-pale);
}

.dashboard-activity-badge--success {
  background: rgba(22, 163, 74, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: #bbf7d0;
}

.dashboard-activity-badge--warning {
  background: rgba(217, 119, 6, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fde68a;
}

.dashboard-activity-badge--danger {
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #fecaca;
}

.dashboard-activity-content {
  min-width: 0;
  flex: 1;
}

.dashboard-activity-title,
.dashboard-activity-subtitle,
.dashboard-activity-meta {
  margin: 0;
}

.dashboard-activity-link {
  color: var(--theme-text);
  text-decoration: none;
}

.dashboard-activity-link:hover,
.dashboard-activity-link:focus {
  text-decoration: underline;
}

.dashboard-activity-subtitle {
  margin-top: 4px;
  color: var(--theme-text-secondary);
}

.dashboard-activity-meta {
  margin-top: 6px;
  color: var(--theme-text-muted);
  font-size: 0.88rem;
}

.dashboard-empty-state {
  color: var(--theme-text-muted);
}

.dashboard-runtime-shell {
  margin-top: 24px;
}

.dashboard-runtime-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgb(var(--theme-primary-rgb) / 16.0%), transparent 38%),
    linear-gradient(140deg, rgb(var(--theme-surface-rgb) / 90.0%), rgba(17, 24, 39, 0.84));
  padding: 22px;
}

.dashboard-runtime-updated-at {
  align-self: center;
  color: var(--theme-primary-soft);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: right;
}

.dashboard-runtime-actions {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.dashboard-runtime-fix-form {
  margin: 0;
}

.dashboard-runtime-fix-button {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.dashboard-runtime-disclaimer {
  margin: 0;
  max-width: 360px;
  color: #93a6c2;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.dashboard-runtime-disclaimer-link {
  color: #b9d8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-runtime-disclaimer-link:hover,
.dashboard-runtime-disclaimer-link:focus-visible {
  color: #e0f0ff;
}

.dashboard-runtime-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-runtime-panel {
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  padding: 14px;
  min-height: 220px;
}

.dashboard-runtime-panel h4 {
  margin: 0 0 10px;
  text-align: left;
}

.dashboard-runtime-key {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.dashboard-runtime-key-header,
.dashboard-runtime-key-description {
  margin: 0;
}

.dashboard-runtime-key-header {
  color: var(--theme-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-runtime-key-lines {
  margin-top: 3px;
  display: grid;
  gap: 2px;
}

.dashboard-runtime-key-description {
  color: #8ea3c1;
  font-size: 0.77rem;
  line-height: 1.35;
}

.dashboard-runtime-key-term {
  color: var(--theme-text-secondary);
}

.dashboard-runtime-item-list {
  display: grid;
  gap: 10px;
}

.dashboard-runtime-item {
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  padding-top: 10px;
}

.dashboard-runtime-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.dashboard-runtime-item-title,
.dashboard-runtime-item-subtitle,
.dashboard-runtime-item-meta {
  margin: 0;
}

.dashboard-runtime-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.dashboard-runtime-item-subtitle {
  margin-top: 4px;
  color: var(--theme-text-secondary);
}

.dashboard-runtime-item-subtitle--with-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-runtime-summary-prefix,
.dashboard-runtime-summary-suffix {
  color: var(--theme-text-secondary);
}

.dashboard-runtime-state-badges {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-runtime-state-badges--inline {
  margin-top: 0;
}

.dashboard-runtime-state-badge {
  min-width: 0;
  padding: 4px 9px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.dashboard-runtime-item-meta {
  margin-top: 5px;
  color: #93a8c5;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .projects-main-card--landing {
    min-height: auto;
  }

  .projects-landing-split {
    grid-template-rows: none;
    min-height: auto;
    padding: 0;
    max-width: none;
  }

  .projects-section-card--landing {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 22px;
  }

  .projects-index-nav-actions {
    justify-content: center;
  }

  .projects-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-title-actions,
  .projects-sidebar-actions {
    justify-content: flex-start;
  }

  .projects-setup-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-cards-row {
    flex-direction: column;
  }

  .dashboard-hero {
    padding: 22px;
  }

  .profile-picture-editor,
  .dashboard-profile-hero-layout {
    grid-template-columns: 1fr;
  }

  .profile-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-theme-preset-grid {
    grid-template-columns: 1fr;
  }

  .profile-theme-preset-form:first-child .profile-theme-preset {
    grid-template-columns: 1fr;
  }

  .profile-theme-decoration-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-avatar {
    width: 74px;
    height: 74px;
  }

  .agent-node-hero-layout {
    grid-template-columns: 1fr;
  }

  .agent-node-hero-cta {
    justify-items: stretch;
  }

  .agent-node-hero-cta .agent-node-primary-cta {
    width: 100%;
  }

  .dashboard-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-card-stat {
    width: fit-content;
  }

  .mcp-dashboard-page {
    width: calc(100% + 32px);
    margin: -10px -16px -10px;
    padding: 18px 0 40px;
    background-size: cover, cover, 760px auto;
  }

  .mcp-dashboard-split-grid {
    grid-template-columns: 1fr;
  }

  .mcp-dashboard-form-card .usage-table,
  .mcp-dashboard-form-card .usage-table tbody,
  .mcp-dashboard-form-card .usage-table tr,
  .mcp-dashboard-form-card .usage-table th,
  .mcp-dashboard-form-card .usage-table td {
    display: block;
    width: 100%;
  }

  .mcp-dashboard-form-card .usage-table th {
    text-align: left;
    padding: 0 0 6px;
  }

  .dashboard-task-item {
    flex-direction: column;
  }

  .dashboard-task-meta {
    justify-content: flex-start;
  }

  .dashboard-activity-item {
    flex-direction: column;
  }

  .dashboard-runtime-updated-at {
    text-align: left;
  }

  .dashboard-runtime-grid {
    grid-template-columns: 1fr;
  }
}

.memory-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.memory-card-header h3 {
  margin: 0;
  text-align: left;
}

.memory-type-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 35.0%, transparent);
  background: rgb(var(--theme-primary-rgb) / 16.0%);
  color: var(--theme-primary-faint);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.provider-memory-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.memories-dashboard-page {
  --memories-font-scale: 1;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-size: calc(var(--memories-font-scale) * 1rem);
}

.memories-dashboard-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px);
  display: grid;
  gap: clamp(12px, 1.25vw, 18px);
  min-width: 0;
}

.memories-dashboard-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.memories-dashboard-header > * {
  min-width: 0;
}

.memories-dashboard-header h1 {
  margin: 0;
  text-align: left;
}

.memories-dashboard-header p {
  margin: 6px 0 0;
  color: var(--theme-text-muted);
}

.memories-dashboard-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.memories-dashboard-button-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.user-memory-ledger-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgb(var(--theme-accent-rgb) / 28%);
  border-radius: 14px;
  background: linear-gradient(90deg, var(--color-surface-card), rgb(var(--theme-accent-rgb) / 7%));
  color: var(--theme-text);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.user-memory-ledger-link:hover,
.user-memory-ledger-link:focus-visible {
  border-color: rgb(var(--theme-accent-rgb) / 60%);
  background: linear-gradient(90deg, var(--color-surface-card-lifted), rgb(var(--theme-accent-rgb) / 12%));
  transform: translateY(-1px);
}

.user-memory-ledger-link-icon,
.user-memory-ledger-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(var(--theme-accent-rgb) / 24%);
  background: rgb(var(--theme-accent-rgb) / 7%);
  box-shadow: 0 0 18px rgb(var(--theme-accent-rgb) / 12%);
}

.user-memory-ledger-link-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.user-memory-ledger-link-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.user-memory-ledger-link-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-memory-ledger-link-copy strong {
  font-size: 1rem;
}

.user-memory-ledger-link-copy span {
  color: var(--theme-text-muted);
}

.user-memory-ledger-link-action {
  margin-left: auto;
  color: var(--theme-accent-soft);
  white-space: nowrap;
}

.user-memories-page {
  min-height: 100%;
  width: 100%;
}

.user-memories-shell {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 48px 48px 20px;
  display: grid;
  gap: 16px;
}

.user-memories-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.user-memories-header-actions,
.user-memory-ledger-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.user-memories-header h1 {
  margin: 0;
  text-align: left;
}

.user-memories-header > div > p:last-child {
  margin: 6px 0 0;
  color: var(--theme-text-muted);
}

.user-memories-eyebrow {
  margin: 0 0 4px;
  color: rgb(190 255 44 / 78%);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.user-memories-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.user-memories-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 68%);
}

.user-memories-summary span {
  color: var(--theme-text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-memories-summary strong {
  color: var(--theme-text);
  font-size: 1.25rem;
}

.user-memory-ledger {
  display: grid;
  gap: 12px;
}

.user-memory-ledger-row {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 74%);
  box-shadow: 0 12px 30px rgb(0 0 0 / 10%);
}

.user-memory-ledger-row.is-expired {
  border-color: rgb(148 163 184 / 34%);
}

.user-memory-expired-watermark {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 0;
  color: rgb(203 213 225 / 9%);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) scaleX(1.25);
  white-space: nowrap;
}

.user-memory-ledger-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

.user-memory-ledger-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.user-memory-ledger-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1 1 auto;
}

.user-memory-ledger-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.user-memory-ledger-badges,
.user-memory-ledger-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.user-memory-origin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.user-memory-origin-badge.is-user {
  border-color: rgb(190 255 44 / 45%);
  background: rgb(190 255 44 / 10%);
  color: rgb(211 255 113 / 96%);
}

.user-memory-origin-badge.is-utility {
  border-color: rgb(var(--theme-primary-rgb) / 45%);
  background: rgb(var(--theme-primary-rgb) / 12%);
  color: var(--theme-primary-faint);
}

.memory-type-badge.is-expired {
  border-color: rgb(148 163 184 / 42%);
  background: rgb(100 116 139 / 15%);
  color: rgb(203 213 225 / 88%);
}

.user-memory-ledger-row-header time,
.user-memory-ledger-meta {
  color: var(--theme-text-muted);
  font-size: 0.8rem;
}

.user-memory-ledger-row-header time {
  white-space: nowrap;
}

.user-memory-ledger-text {
  margin: 12px 0;
  color: var(--theme-text);
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.user-memory-ledger-meta strong {
  color: var(--theme-text-secondary);
}

.user-memory-ledger-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.user-memory-delete-form {
  flex: 0 0 auto;
  margin: 0;
}

.user-memory-delete-button,
.user-memory-ledger-action {
  padding: 7px 11px;
  border-radius: 9px;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: none;
}

.user-memory-ledger-action {
  border: 1px solid rgb(var(--theme-primary-rgb) / 32%);
  background: rgb(var(--theme-primary-rgb) / 9%);
  color: var(--theme-text-secondary);
}

.user-memory-delete-button {
  border: 1px solid rgb(255 91 112 / 34%);
  background: rgb(115 22 39 / 18%);
  color: rgb(255 163 174 / 88%);
  cursor: pointer;
}

.user-memory-delete-button:hover,
.user-memory-delete-button:focus-visible {
  border-color: rgb(255 91 112 / 68%);
  background: rgb(115 22 39 / 32%);
  color: rgb(255 198 205 / 100%);
}

.user-memory-ledger-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 52px 20px;
  border: 1px dashed var(--theme-panel-border);
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 58%);
  text-align: center;
}

.user-memory-ledger-empty img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.user-memory-ledger-empty h2,
.user-memory-ledger-empty p {
  margin: 0;
}

.user-memory-ledger-empty p {
  color: var(--theme-text-muted);
}

.memories-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.memories-trend-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.memories-trend-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: var(--color-surface-card);
  padding: 9px 11px;
}

.memories-trend-label {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.75rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.memories-trend-value-row {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.memories-trend-value-row strong {
  color: var(--theme-text);
  font-size: calc(var(--memories-font-scale) * 1.2rem);
}

.memories-trend-delta {
  font-size: calc(var(--memories-font-scale) * 0.78rem);
  font-weight: 600;
}

.memories-trend-delta.is-up {
  color: #86efac;
}

.memories-trend-delta.is-down {
  color: #fca5a5;
}

.memories-trend-delta.is-danger {
  color: #fca5a5;
}

.memories-trend-delta.is-flat {
  color: var(--theme-text-secondary);
}

.memories-trend-note {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.78rem);
}

.memories-metric-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: var(--color-surface-card);
  padding: 10px 12px;
}

.memories-metric-label {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.72rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.memories-metric-value {
  margin-top: 4px;
  color: var(--theme-text);
  font-size: calc(var(--memories-font-scale) * 1.45rem);
  font-weight: 700;
}

.memories-metric-note {
  margin-top: 2px;
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.78rem);
}

.memories-main-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.memories-main-left {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.memories-main-right {
  min-width: 0;
  align-self: start;
}

.memories-panel,
.memories-operational-dock {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: var(--color-surface-card);
  padding: 14px;
}

.memories-panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.memories-panel-header > * {
  min-width: 0;
}

.memories-panel-header h2 {
  margin: 0;
  text-align: left;
}

.memories-panel-header p {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.92rem);
}

.memories-library-sort,
.memories-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: calc(var(--memories-font-scale) * 0.82rem);
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.memories-library-sort span,
.memories-tabs span,
.memories-tabs a {
  color: var(--theme-text-muted);
}

.memories-library-sort a,
.memories-tabs span,
.memories-tabs a {
  border: 1px solid var(--color-border-control);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--color-surface-control);
}

.memories-library-sort a.active,
.memories-tabs span.is-active,
.memories-tabs a.is-active {
  border-color: var(--color-border-active);
  background: var(--color-surface-card-lifted);
  color: var(--theme-text);
  text-decoration: none;
}

.memories-feature-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 12px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: var(--color-surface-card-lifted);
  padding: 14px;
}

.memories-feature-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.memories-feature-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.memories-feature-title-row h3 {
  margin: 0;
  text-align: left;
  font-size: calc(var(--memories-font-scale) * 1.65rem);
}

.memories-feature-description {
  margin: 8px 0 0;
  color: var(--theme-text-secondary);
  max-width: 780px;
}

.memories-feature-updated {
  font-size: calc(var(--memories-font-scale) * 0.78rem);
  color: var(--theme-text-muted);
  white-space: nowrap;
}

.memories-feature-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.memories-feature-metrics > div {
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  background: var(--color-surface-card);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.memories-feature-metrics span {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.74rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.memories-feature-metrics strong {
  color: var(--theme-text);
  font-size: calc(var(--memories-font-scale) * 0.9rem);
}

.memories-feature-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memories-browser-footer {
  margin-top: 10px;
  min-width: 0;
}

.memories-browser-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.memories-library-position {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.78rem);
}

.memories-library-chips {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
}

.memories-library-chip {
  white-space: nowrap;
  border: 1px solid var(--color-border-control);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--color-surface-control);
  color: var(--theme-text-secondary);
  font-size: calc(var(--memories-font-scale) * 0.8rem);
}

.memories-library-chip.is-active {
  border-color: var(--color-border-active);
  background: var(--color-surface-card-lifted);
  color: var(--theme-text);
}

.memories-library-chip.is-empty {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.memories-library-chip.is-stale {
  border-color: rgba(251, 191, 36, 0.42);
  color: #fef3c7;
}

.memories-library-chip.is-failed {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.memories-library-chip.is-synced {
  border-color: rgba(74, 222, 128, 0.4);
  color: #bbf7d0;
}

.memories-insight-card {
  margin-top: 12px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: var(--color-surface-card-lifted);
  padding: 10px;
}

.memories-insight-card h3 {
  margin: 0 0 8px;
  text-align: left;
}

.memories-health-row {
  margin-bottom: 10px;
}

.memories-health-label-row {
  display: flex;
  justify-content: space-between;
  font-size: calc(var(--memories-font-scale) * 0.86rem);
  color: var(--theme-text-secondary);
  margin-bottom: 4px;
}

.memories-health-track {
  height: 8px;
  border-radius: 999px;
  background: var(--color-surface-control);
}

.memories-health-fill {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme-primary) 0%, var(--theme-accent) 100%);
}

.memories-health-note {
  margin: 4px 0 0;
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.76rem);
}

.memories-simple-list,
.memories-attention-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.memories-simple-list li,
.memories-attention-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--theme-text-secondary);
  font-size: calc(var(--memories-font-scale) * 0.88rem);
}

.memories-attention-list li {
  display: block;
}

.memories-attention-list p {
  margin: 3px 0 0;
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.8rem);
}

.memories-library-readiness {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memories-library-readiness span {
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: calc(var(--memories-font-scale) * 0.76rem);
  color: var(--theme-text-secondary);
  background: var(--color-surface-control);
}

.memories-confirmation-list li p:last-child {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.77rem);
}

.memories-dock-rail {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
}

.memories-dock-card {
  flex: 0 0 min(280px, 78vw);
  min-width: 0;
  max-width: none;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: var(--color-surface-card);
  padding: 10px;
}

.memories-dock-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--theme-text);
  font-size: calc(var(--memories-font-scale) * 0.88rem);
}

.memories-dock-card-top span {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.76rem);
}

.memories-dock-card p {
  margin: 8px 0;
  color: var(--theme-text-secondary);
  font-size: calc(var(--memories-font-scale) * 0.88rem);
}

.memories-dock-card-meta {
  color: var(--theme-text-muted);
  font-size: calc(var(--memories-font-scale) * 0.78rem);
  margin-bottom: 8px;
}

.memories-empty {
  color: var(--theme-text-muted);
}

@media (max-width: 1200px) {
  .memories-metrics-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .memories-trend-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memories-main-split {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 760px) {
  .memories-dashboard-shell {
    padding: 12px;
  }

  .memories-dashboard-header {
    flex-direction: column;
  }

  .memories-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memories-trend-row {
    grid-template-columns: 1fr;
  }

  .memories-feature-card-top {
    flex-direction: column;
  }

  .user-memory-ledger-link,
  .user-memories-header,
  .user-memory-ledger-row,
  .user-memory-ledger-row-header {
    align-items: stretch;
    flex-direction: column;
  }

  .user-memory-ledger-link-action {
    margin-left: 0;
  }

  .user-memories-shell {
    padding-left: 10px;
    padding-right: 16px;
  }

  .user-memories-summary {
    grid-template-columns: 1fr;
  }

  .user-memory-ledger-row-header time {
    white-space: normal;
  }

  .user-memory-ledger-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .user-memory-delete-form,
  .user-memory-delete-button {
    width: 100%;
  }
}
.projects-delete-link {
  border-color: rgba(148, 27, 27, 0.35);
  color: #8f1d1d;
}

.projects-main-card--with-footer-actions {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
}

.projects-setup-subtitle {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--theme-text-secondary);
}

.projects-setup-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.projects-setup-layout > .projects-section-card {
  min-width: 0;
}

.project-setup-page .projects-section-card {
  border-color: var(--theme-panel-border);
  background:
    radial-gradient(circle 440px at top right, rgb(var(--theme-primary-rgb) / 16%), transparent 70%),
    linear-gradient(135deg, var(--theme-surface), var(--theme-surface-lift));
  box-shadow: 0 18px 44px rgba(4, 11, 27, 0.26);
}

.projects-setup-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.projects-setup-readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.projects-setup-readiness-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--theme-panel-border);
  background: rgb(var(--theme-surface-rgb) / 60.0%);
}

.projects-setup-readiness-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.projects-setup-readiness-section {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-text-secondary);
}

.projects-setup-readiness-state {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.projects-setup-readiness-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex: 0 0 34px;
}

.projects-setup-readiness-card--ready {
  border-color: rgba(95, 215, 140, 0.5);
  background: rgba(17, 60, 42, 0.45);
}

.projects-setup-readiness-card--ready .projects-setup-readiness-state {
  color: #bbf7d0;
}

.projects-setup-readiness-card--ready .projects-setup-readiness-icon {
  border: 2px solid rgba(95, 215, 140, 0.78);
}

.projects-setup-readiness-card--ready .projects-setup-readiness-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 5px;
  width: 8px;
  height: 16px;
  border-right: 3px solid #86efac;
  border-bottom: 3px solid #86efac;
  transform: rotate(40deg);
}

.projects-setup-readiness-card--partial {
  border-color: rgba(251, 191, 36, 0.48);
  background: rgba(79, 53, 8, 0.4);
}

.projects-setup-readiness-card--partial .projects-setup-readiness-state {
  color: #fde68a;
}

.projects-setup-readiness-card--partial .projects-setup-readiness-icon {
  border: 2px solid rgba(251, 191, 36, 0.72);
}

.projects-setup-readiness-card--partial .projects-setup-readiness-icon::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 7px;
  width: 3px;
  height: 14px;
  border-radius: 3px;
  background: #fcd34d;
}

.projects-setup-readiness-card--partial .projects-setup-readiness-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 24px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fcd34d;
}

.projects-setup-readiness-card--missing {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(78, 24, 30, 0.45);
}

.projects-setup-readiness-card--missing .projects-setup-readiness-state {
  color: #fecaca;
}

.projects-setup-readiness-card--missing .projects-setup-readiness-icon {
  border: 2px solid rgba(248, 113, 113, 0.75);
}

.projects-setup-readiness-card--missing .projects-setup-readiness-icon::before,
.projects-setup-readiness-card--missing .projects-setup-readiness-icon::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 7px;
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: #fca5a5;
}

.projects-setup-readiness-card--missing .projects-setup-readiness-icon::before {
  transform: rotate(45deg);
}

.projects-setup-readiness-card--missing .projects-setup-readiness-icon::after {
  transform: rotate(-45deg);
}

.projects-setup-readiness-message {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 3px solid rgba(148, 163, 184, 0.45);
  background: rgb(var(--theme-surface-rgb) / 40.0%);
}

.projects-setup-readiness-message--ready {
  border-color: rgba(95, 215, 140, 0.28);
  border-left-color: rgba(95, 215, 140, 0.78);
  background: rgba(17, 60, 42, 0.28);
}

.projects-setup-readiness-message--partial {
  border-color: rgba(251, 191, 36, 0.3);
  border-left-color: rgba(251, 191, 36, 0.72);
  background: rgba(79, 53, 8, 0.22);
}

.projects-setup-readiness-message--missing {
  border-color: rgba(248, 113, 113, 0.32);
  border-left-color: rgba(248, 113, 113, 0.72);
  background: rgba(78, 24, 30, 0.26);
}

.projects-setup-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--theme-primary-faint);
  font-size: 0.86rem;
}

.projects-setup-chip--warning {
  border-color: rgba(251, 191, 36, 0.34);
  color: #fde68a;
}

.projects-setup-chip--danger {
  border-color: rgba(255, 120, 120, 0.3);
  color: #ffb2b2;
}

.projects-my-agents-wrapper-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0;
}

.projects-my-agents-wrapper-copy {
  min-width: 0;
}

.projects-my-agents-wrapper-copy h3 {
  margin: 2px 0 8px;
}

.projects-my-agents-wrapper-copy .projects-modal-help {
  max-width: 76ch;
}

.projects-my-agents-wrapper-form {
  margin: 0;
  flex: 0 0 auto;
}

.projects-my-agents-wrapper-button {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "switch state"
    "switch action";
  align-items: center;
  gap: 2px 10px;
  min-width: 142px;
  padding: 9px 12px;
  border: 0;
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
  color: var(--theme-primary-faint);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.projects-my-agents-wrapper-button:hover,
.projects-my-agents-wrapper-button:focus-visible {
  outline: none;
  background: rgba(30, 41, 59, 0.78);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 48.0%, transparent),
    0 0 0 2px color-mix(in srgb, var(--theme-primary-pale) 14.0%, transparent);
}

.projects-my-agents-wrapper-button.is-enabled {
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.42);
}

.projects-my-agents-wrapper-switch {
  grid-area: switch;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.86);
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.18);
}

.projects-my-agents-wrapper-knob {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: transform 160ms ease, background 160ms ease;
}

.projects-my-agents-wrapper-button.is-enabled .projects-my-agents-wrapper-switch {
  background: rgba(34, 197, 94, 0.76);
}

.projects-my-agents-wrapper-button.is-enabled .projects-my-agents-wrapper-knob {
  transform: translateX(18px);
  background: #f0fdf4;
}

.projects-my-agents-wrapper-state {
  grid-area: state;
  font-size: 0.78rem;
  color: var(--theme-primary-pale);
}

.projects-my-agents-wrapper-button strong {
  grid-area: action;
  color: inherit;
  font-size: 0.95rem;
}

.projects-campaign-setup-card {
  margin-top: 22px;
}

.projects-campaign-toggle {
  position: relative;
  flex: 0 0 auto;
}

.projects-campaign-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.projects-campaign-toggle-label {
  user-select: none;
}

.projects-campaign-toggle-input:checked + .projects-campaign-toggle-label {
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.42);
}

.projects-campaign-toggle-input:focus-visible + .projects-campaign-toggle-label {
  outline: none;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 58.0%, transparent),
    0 0 0 3px color-mix(in srgb, var(--theme-primary-pale) 20.0%, transparent);
}

.projects-campaign-toggle-input:checked + .projects-campaign-toggle-label .projects-my-agents-wrapper-switch {
  background: rgba(34, 197, 94, 0.76);
}

.projects-campaign-toggle-input:checked + .projects-campaign-toggle-label .projects-my-agents-wrapper-knob {
  transform: translateX(18px);
  background: #f0fdf4;
}

.projects-campaign-toggle-input:not(:checked) + .projects-campaign-toggle-label .projects-campaign-state--enabled,
.projects-campaign-toggle-input:not(:checked) + .projects-campaign-toggle-label .projects-campaign-action--enabled,
.projects-campaign-toggle-input:checked + .projects-campaign-toggle-label .projects-campaign-state--disabled,
.projects-campaign-toggle-input:checked + .projects-campaign-toggle-label .projects-campaign-action--disabled {
  display: none;
}

.projects-campaign-action {
  grid-area: action;
}

.projects-campaign-toggle-input:disabled + .projects-campaign-toggle-label {
  cursor: not-allowed;
  opacity: 0.82;
}

.settings-node-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  font-weight: 700;
}

.settings-node-badge--healthy {
  color: #ccf7d6;
  border-color: rgba(130, 220, 160, 0.24);
  background: rgba(57, 148, 78, 0.16);
}

.settings-node-badge--warning {
  color: #ffe3b2;
  border-color: rgba(255, 200, 105, 0.28);
  background: rgba(255, 200, 105, 0.12);
}

.settings-node-badge--danger {
  color: #ffb2b2;
  border-color: rgba(255, 120, 120, 0.3);
  background: rgba(180, 38, 38, 0.14);
}

.mcp-intake-card {
  margin-top: 16px;
}

.mcp-intake-summary-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  margin: 0;
}

.mcp-intake-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mcp-intake-summary-grid dt {
  font-weight: 700;
  color: #e5e7eb;
}

.mcp-intake-summary-grid dd {
  margin: 0;
  color: var(--theme-text-secondary);
}

.mcp-intake-table td,
.mcp-intake-table th {
  vertical-align: top;
}

.mcp-intake-action-stack {
  display: grid;
  gap: 6px;
}

.mcp-intake-inline-form {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.agent-node-dashboard {
  max-width: 1200px;
}

.agent-node-hero {
  margin-bottom: 24px;
}

.agent-node-fresh-token {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(34, 89, 163, 0.2);
  border-radius: 10px;
  background: rgba(34, 89, 163, 0.05);
}

.agent-node-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding-inline: 20px;
  border-color: color-mix(in srgb, var(--theme-primary-pale) 72.0%, transparent);
  box-shadow: 0 12px 28px rgb(var(--theme-primary-rgb) / 18.0%);
}

.agent-node-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.agent-node-hero-main {
  min-width: 0;
}

.agent-node-hero-cta {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 24.0%, transparent);
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  justify-items: start;
}

.agent-node-hero-cta h3 {
  margin: 0;
}

.agent-node-hero-cta p {
  margin: 0;
  color: #d8e4f8;
}

.agent-node-hero-cta .agent-node-primary-cta {
  min-width: 180px;
}

.agent-node-hero-cta-metrics {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: #bfd1ee;
}

.agent-node-hero-cta-metrics strong {
  color: var(--theme-text);
}

.agent-node-create-flow {
  margin-bottom: 24px;
  scroll-margin-top: 28px;
}

.agent-node-create-card {
  min-height: 100%;
}

.agent-node-host-section {
  margin-bottom: 16px;
}

.agent-node-host-credential-section {
  margin-top: 18px;
}

.agent-node-host-layout {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.agent-node-host-form-shell {
  padding: 16px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 74.0%);
}

.agent-node-host-form-shell h4 {
  margin: 0;
}

.agent-node-host-form-shell h5 {
  margin: 0;
}

.agent-node-host-help {
  margin: 8px 0 14px;
  color: var(--theme-text-secondary);
}

.agent-node-host-form {
  display: grid;
  gap: 14px;
}

.agent-node-host-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 14px;
}

.agent-node-host-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--theme-primary-faint);
  font-weight: 600;
}

.agent-node-host-form-grid small {
  color: var(--theme-text-muted);
  font-weight: 500;
}

.agent-node-host-form-span {
  grid-column: 1 / -1;
}

.agent-node-host-form-hint {
  margin: -4px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.agent-node-host-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 88.0%);
  color: var(--theme-text);
}

.agent-node-host-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--theme-primary-pale) 75.0%, transparent);
  box-shadow: 0 0 0 2px rgb(var(--theme-primary-rgb) / 14.0%);
}

.agent-node-host-card {
  min-height: 100%;
  padding: 18px;
}

@media (max-width: 720px) {
  .projects-my-agents-wrapper-card {
    align-items: stretch;
    flex-direction: column;
  }

  .projects-my-agents-wrapper-button {
    width: 100%;
  }

  .agent-node-host-card {
    padding: 14px;
  }
}

.agent-node-host-output-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
}

.agent-node-host-output {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(2, 6, 23, 0.76);
  color: var(--theme-primary-faint);
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.agent-node-host-facts-summary,
.agent-node-host-facts-error {
  margin: 0;
  color: var(--theme-primary-faint);
}

.agent-node-host-facts-error {
  color: #ffb2b2;
}

.agent-node-host-vagrant-block {
  display: grid;
  gap: 8px;
}

.agent-node-host-vagrant-meta {
  margin: 0;
  color: var(--theme-text-muted);
  font-size: 0.88rem;
}

.agent-node-observability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.agent-node-observability-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 55.0%);
}

.agent-node-observability-card-header {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.agent-node-observability-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.agent-node-observability-title {
  margin: 0;
  color: var(--theme-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.agent-node-observability-description {
  margin: 2px 0 0;
  color: var(--theme-text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.agent-node-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.agent-node-record-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 16px;
  background: rgb(var(--theme-surface-rgb) / 84.0%);
}

.agent-node-record-header,
.agent-node-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.agent-node-record-header h4,
.agent-node-section-header h3 {
  margin: 0;
  text-align: left;
}

.agent-node-record-header p,
.agent-node-section-header p {
  margin: 6px 0 0;
  color: var(--theme-text-secondary);
}

.agent-node-record-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agent-node-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.agent-node-meta div {
  min-width: 0;
}

.agent-node-meta dt {
  margin: 0 0 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-primary-soft);
}

.agent-node-meta dd {
  margin: 0;
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.agent-node-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.agent-node-actions--primary {
  margin-top: 2px;
  justify-content: center;
  padding: 8px 6px;
  border: 1px solid rgba(71, 85, 105, 0.75);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 50.0%);
}

.agent-node-action-form {
  margin: 0;
}

.agent-node-action-button {
  min-width: 96px;
}

.projects-setup-prompt {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.projects-setup-goal {
  margin: 12px 0 0;
  color: var(--theme-text);
}

.projects-setup-roles {
  display: grid;
  gap: 14px;
}

.projects-setup-role-row {
  display: grid;
  gap: 6px;
}

.projects-setup-history {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
}

.projects-setup-history h4 {
  margin: 0 0 8px;
}

.projects-setup-history-list {
  display: grid;
  gap: 10px;
}

.projects-setup-history-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.projects-topology-intro {
  margin: 8px 0 0;
  max-width: 70ch;
  opacity: 0.88;
}

.projects-topology-checkpoint-nav,
.projects-topology-checkpoint-graph {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-surface) 94%, var(--theme-primary-soft));
}

.projects-topology-checkpoint-nav-header,
.projects-topology-checkpoint-graph-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.projects-topology-checkpoint-nav-header h3,
.projects-topology-checkpoint-graph-header h3 {
  margin: 0;
}

.projects-topology-checkpoint-nav-header p,
.projects-topology-checkpoint-empty-copy {
  margin: 5px 0 0;
  opacity: 0.78;
}

.projects-topology-checkpoint-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.projects-topology-checkpoint-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-soft) 42%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--theme-primary-soft) var(--checkpoint-tone), var(--theme-surface));
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.projects-topology-checkpoint-card:hover,
.projects-topology-checkpoint-card.is-active {
  border-color: var(--theme-primary-pale);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-primary-pale) 24%, transparent);
}

.projects-topology-checkpoint-card.is-active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-primary-pale) 32%, transparent);
}

.projects-topology-checkpoint-number {
  color: var(--theme-primary-pale);
  font-weight: 700;
}

.projects-topology-checkpoint-name {
  font-weight: 600;
}

.projects-topology-checkpoint-key {
  overflow: hidden;
  color: var(--theme-primary-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-topology-checkpoint-graph {
  background: color-mix(in srgb, var(--theme-surface-deep) 90%, var(--theme-primary-soft));
}

.projects-topology-checkpoint-graph-eyebrow {
  margin: 0 0 4px;
  color: var(--theme-primary-pale);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-topology-checkpoint-tree {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-left: 2px solid color-mix(in srgb, var(--theme-primary-soft) 56%, transparent);
  font-size: 1rem;
}

.projects-topology-checkpoint-tree-node {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  min-height: 30px;
}

.projects-topology-checkpoint-tree-node code {
  color: var(--theme-primary-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
}

.projects-topology-checkpoint-tree-node--checkpoint {
  color: var(--theme-primary-pale);
  font-weight: 700;
}

.projects-topology-checkpoint-tree-node--branch {
  color: var(--theme-text);
  font-weight: 600;
}

.projects-topology-checkpoint-tree-node--channel {
  color: var(--theme-primary-faint);
}

.projects-topology-checkpoint-tree-node--output {
  color: var(--theme-primary-pale);
}

.projects-topology-checkpoint-tree-branch,
.projects-topology-checkpoint-tree-channel,
.projects-topology-checkpoint-tree-output {
  display: grid;
  gap: 8px;
}

.projects-topology-checkpoint-tree-branch {
  margin-left: 18px;
}

.projects-topology-checkpoint-tree-channel,
.projects-topology-checkpoint-tree-output {
  margin-left: 24px;
}

.projects-topology-checkpoint-empty {
  margin-top: 18px;
}

.projects-topology-runtime-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.projects-topology-runtime-summary span,
.projects-topology-edge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(var(--theme-surface-rgb) / 75.0%);
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 22.0%, transparent);
}

.projects-topology-stack,
.projects-topology-details {
  display: grid;
  gap: 14px;
}

.projects-topology-arrow {
  justify-self: center;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 26.0%, transparent);
  background: rgb(var(--theme-surface-rgb) / 70.0%);
  color: var(--theme-primary-soft);
  font-size: 1.1rem;
}

.projects-topology-lane {
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  padding: 14px;
}

.projects-topology-lane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.projects-topology-lane-header h3 {
  margin: 0;
}

.projects-topology-lane-subtitle {
  margin: 6px 0 0;
  opacity: 0.8;
}

.projects-topology-lane-items,
.projects-topology-detail-grid {
  display: grid;
  gap: 12px;
}

.projects-topology-tile {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 18.0%, transparent);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 72.0%);
  padding: 12px;
}

.projects-topology-tile:hover {
  border-color: color-mix(in srgb, var(--theme-primary-soft) 45.0%, transparent);
  transform: translateY(-1px);
}

.projects-topology-tile-header,
.projects-topology-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.projects-topology-tile-subtitle,
.projects-topology-detail-subtitle,
.projects-topology-detail-summary,
.projects-topology-tile-summary,
.projects-topology-empty {
  margin: 0;
  opacity: 0.85;
}

.projects-topology-connections {
  margin: 0;
}

.projects-topology-edge-list {
  display: grid;
  gap: 10px;
}

.projects-topology-edge-item {
  justify-content: space-between;
}

.projects-topology-detail-card {
  border: 1px solid var(--theme-panel-border);
  border-radius: 12px;
  background: rgb(var(--theme-surface-rgb) / 58.0%);
  scroll-margin-top: 96px;
}

.projects-topology-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px;
}

.projects-topology-accordion > summary::-webkit-details-marker {
  display: none;
}

.projects-topology-accordion > summary::after {
  content: "＋";
  float: right;
  color: var(--theme-primary-pale);
  font-size: 1.15rem;
  line-height: 1;
}

.projects-topology-accordion[open] > summary::after {
  content: "−";
}

.projects-topology-accordion > summary:hover {
  background: rgb(var(--theme-surface-rgb) / 28.0%);
}

.projects-topology-accordion-body {
  padding: 0 14px 14px;
}

.projects-topology-detail-card h4,
.projects-topology-detail-card h5 {
  margin: 0;
}

.projects-topology-detail-metadata {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.projects-topology-detail-metadata-row {
  display: grid;
  gap: 4px;
}

.projects-topology-detail-metadata-row dt {
  font-weight: 600;
  color: var(--theme-primary-pale);
}

.projects-topology-detail-metadata-row dd {
  margin: 0;
}

.projects-topology-detail-lists {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.projects-topology-detail-lists ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.projects-topology-detail-actions {
  margin-top: 14px;
}

.projects-json-panels {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.projects-json-panels > div {
  min-width: 0;
}

.projects-json-panels h4 {
  margin: 0 0 8px;
  text-align: left;
}

.projects-json-panels pre {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid var(--theme-panel-border);
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.projects-json-panels code {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

.projects-danger-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
  justify-content: flex-start;
}

.projects-section-card--knowledge-scopes {
  margin-top: 18px;
}

.projects-danger-zone form {
  margin: 0;
}

.projects-clone-button,
.projects-reset-button,
.projects-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.2;
  box-shadow: 0 6px 14px rgba(43, 31, 31, 0.08);
}

.projects-clone-button {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.24), rgba(219, 234, 254, 0.23));
  color: var(--theme-text);
  cursor: pointer;
  opacity: 1;
  appearance: none;
}

.projects-clone-button:hover {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.34), rgba(219, 234, 254, 0.32));
  transform: translateY(-1px);
}

.projects-reset-button {
  border: 1px solid rgba(216, 180, 254, 0.42);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(196, 181, 253, 0.1));
  color: #ddd6fe;
  cursor: pointer;
  opacity: 1;
  appearance: none;
  box-shadow: 0 8px 18px rgba(139, 92, 246, 0.12);
}

.projects-reset-button:hover {
  color: #f3e8ff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(196, 181, 253, 0.18));
  transform: translateY(-1px);
}

.projects-delete-button {
  border: 2px solid rgba(148, 27, 27, 0.5);
  background: linear-gradient(135deg, rgba(146, 34, 34, 0.18), rgba(254, 226, 226, 0.24));
  color: var(--theme-text);
  box-shadow: 0 8px 18px rgba(143, 29, 29, 0.08);
}

.projects-delete-button:hover {
  color: var(--theme-text);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.36), rgba(254, 202, 202, 0.34));
  transform: translateY(-1px);
}

.project-evidence-delete-dialog {
  border: 1px solid color-mix(in srgb, var(--theme-primary) 42%, transparent);
  border-radius: 18px;
  padding: 0;
  color: var(--theme-text);
  background: var(--app-chrome-background);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  max-width: min(560px, calc(100vw - 32px));
}

.project-evidence-delete-dialog::backdrop { background: rgba(2, 6, 23, 0.72); }
.project-evidence-delete-dialog__card { padding: 26px; }
.project-evidence-delete-dialog__eyebrow {
  margin: 0 0 8px; color: var(--theme-primary); font-size: 0.76rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.project-evidence-delete-dialog h2 { margin: 0 0 12px; }
.project-evidence-delete-dialog__actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px;
}

.project-destroy-page {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 32px 20px 48px;
  background:
    radial-gradient(circle at top, rgba(183, 28, 28, 0.08), transparent 38%),
    linear-gradient(180deg, #fffaf8 0%, #fff 100%);
}

.project-destroy-card {
  width: min(680px, 100%);
  padding: 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(143, 29, 29, 0.14);
  box-shadow: 0 24px 70px rgba(55, 31, 31, 0.14);
}

.project-destroy-kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8f1d1d;
}

.project-destroy-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.02;
  color: #251313;
}

.project-destroy-copy {
  margin: 0 0 14px;
  max-width: 54ch;
  line-height: 1.65;
  color: #4f3a38;
}

.campaign-destroy-projects-summary {
  margin-top: 8px;
}

.campaign-destroy-confirmation-phrase {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
  padding: 14px;
  border: 1px solid rgba(143, 29, 29, 0.16);
  border-radius: 16px;
  background: rgba(143, 29, 29, 0.055);
}

.campaign-destroy-confirmation-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7f1d1d;
}

.campaign-destroy-confirmation-phrase code {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid rgba(79, 58, 56, 0.14);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #251313;
  background: rgba(255, 255, 255, 0.86);
}

.campaign-destroy-confirmation-fill {
  justify-self: start;
  border: 1px solid rgba(79, 58, 56, 0.2);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  color: #472928;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.campaign-destroy-confirmation-fill:hover {
  border-color: rgba(143, 29, 29, 0.38);
  background: #fff;
}

.campaign-destroy-project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(79, 58, 56, 0.16);
  border-radius: 14px;
  overflow: hidden;
}

.campaign-destroy-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #2f1c1b;
  background: rgba(255, 255, 255, 0.92);
}

.campaign-destroy-project-item + .campaign-destroy-project-item {
  border-top: 1px solid rgba(79, 58, 56, 0.12);
}

.campaign-destroy-project-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.campaign-destroy-project-state.is-paused {
  color: #14532d;
  background: rgba(187, 247, 208, 0.95);
  border: 1px solid rgba(74, 222, 128, 0.45);
}

.campaign-destroy-project-state.is-running {
  color: #7f1d1d;
  background: rgba(254, 202, 202, 0.9);
  border: 1px solid rgba(248, 113, 113, 0.42);
}

.campaign-destroy-inline-alert {
  margin-top: 14px;
}

.campaign-destroy-pause-action {
  margin-top: 10px;
}

.project-destroy-field {
  margin-top: 28px;
}

.project-destroy-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #472928;
}

.project-destroy-input {
  width: 100%;
  border: 1px solid rgba(79, 58, 56, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1rem;
  color: #251313;
  background: #fff;
}

.project-destroy-input:focus {
  outline: none;
  border-color: rgba(143, 29, 29, 0.55);
  box-shadow: 0 0 0 4px rgba(143, 29, 29, 0.08);
}

.project-destroy-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.project-destroy-submit {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 700;
  color: var(--theme-text);
  background: linear-gradient(135deg, #b91c1c, #8f1d1d);
  box-shadow: 0 12px 28px rgba(143, 29, 29, 0.24);
  opacity: 0.4;
  cursor: not-allowed;
  transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.project-destroy-submit.is-enabled {
  opacity: 1;
  cursor: pointer;
}

.project-destroy-submit.is-enabled:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(143, 29, 29, 0.28);
}

@media (max-width: 700px) {
  .footer-bar--with-project-actions {
    justify-content: center;
  }

  .footer-bar-copy {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .footer-project-actions {
    justify-content: center;
    width: 100%;
  }

  .projects-danger-zone {
    flex-direction: column-reverse;
    align-items: stretch;
    margin-top: 24px;
  }

  .projects-clone-button,
  .projects-reset-button,
  .projects-delete-button {
    width: 100%;
  }

  .project-destroy-card {
    padding: 24px;
    border-radius: 20px;
  }

  .project-destroy-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.connection-test-flash-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1400;
}

.connection-test-flash {
  max-width: min(720px, calc(100vw - 48px));
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  text-align: center;
}

.connection-test-flash--success {
  background: rgba(16, 101, 62, 0.9);
  color: #e7fff2;
}

.connection-test-flash--error {
  background: rgba(132, 29, 35, 0.92);
  color: #ffe9ec;
}

.connection-test-flash-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.connection-test-flash-message {
  margin-top: 6px;
  font-size: 0.98rem;
  line-height: 1.35;
}

.projects-section-card--research-explorer {
  margin-top: 16px;
}

.projects-research-header {
  margin-bottom: 10px;
}

.reference-sources-intake-page .projects-main-card {
  max-width: 1120px;
}

.reference-sources-form-page .projects-main-card {
  max-width: 1120px;
}

.reference-library-show-page .projects-main-card {
  max-width: 1120px;
}

.reference-source-show-page .provider-settings-container {
  max-width: 1240px;
}

.reference-source-hero h1 {
  max-width: 980px;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.06;
}

.reference-source-url {
  max-width: 980px;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
  color: var(--theme-text-muted);
}

.reference-source-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reference-source-status-grid .dashboard-card {
  min-width: 0;
}

.reference-source-status-grid h3,
.reference-source-identity-card h2,
.reference-source-table-card h2,
.reference-source-show-page .dashboard-card-header h2 {
  margin: 0;
  text-align: left;
}

.reference-source-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reference-source-meta-grid dd,
.reference-source-workspace-path,
.reference-source-show-page pre {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reference-source-technical-details {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.reference-source-technical-details > summary {
  cursor: pointer;
  color: var(--theme-primary-soft);
  font-weight: 700;
}

.reference-source-technical-details .reference-source-meta-grid {
  margin-top: 14px;
}

.reference-source-technical-details pre,
.reference-source-show-page details pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
}

.reference-source-workspace-path,
.reference-source-manifest-links {
  margin: 0;
}

.reference-source-show-page .usage-table {
  width: 100%;
}

.reference-source-table-card {
  overflow-x: auto;
}

.reference-source-ingestion-receipts > .rag-packet-card {
  width: 100%;
}

@media (max-width: 980px) {
  .reference-source-status-grid,
  .reference-source-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .reference-source-status-grid,
  .reference-source-meta-grid {
    grid-template-columns: 1fr;
  }
}

.reference-library-training-sources-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.reference-library-training-sources-table th,
.reference-library-training-sources-table td {
  padding-right: 24px;
  vertical-align: top;
}

.reference-library-training-sources-table th {
  line-height: 1.15;
  text-align: left;
  vertical-align: bottom;
}

.reference-library-sort-button {
  align-items: center;
  background: rgba(27, 44, 76, 0.9);
  border: 1px solid color-mix(in srgb, var(--theme-primary-pale) 45.0%, transparent);
  border-radius: 8px;
  color: var(--theme-text);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 4px;
  line-height: 1;
  min-height: 30px;
  padding: 8px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.reference-library-sort-button:hover,
.reference-library-sort-button:focus,
.reference-library-sort-button.is-active {
  background: rgb(var(--theme-primary-rgb) / 36.0%);
  border-color: color-mix(in srgb, var(--theme-primary-soft) 78.0%, transparent);
  color: var(--theme-text);
}

.reference-library-training-sources-table th:nth-child(1),
.reference-library-training-sources-table td:nth-child(1) {
  width: 38%;
}

.reference-library-training-sources-table th:nth-child(2),
.reference-library-training-sources-table td:nth-child(2) {
  width: 12%;
}

.reference-library-training-sources-table th:nth-child(3),
.reference-library-training-sources-table td:nth-child(3) {
  width: 10%;
}

.reference-library-training-sources-table th:nth-child(4),
.reference-library-training-sources-table td:nth-child(4) {
  width: 10%;
}

.reference-library-training-sources-table th:nth-child(5),
.reference-library-training-sources-table td:nth-child(5) {
  width: 24%;
}

.reference-library-training-sources-table th:nth-child(6),
.reference-library-training-sources-table td:nth-child(6) {
  width: 6%;
  padding-right: 0;
}

.reference-library-source-url {
  color: var(--theme-text-muted);
  font-size: 0.9em;
  line-height: 1.25;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.reference-library-training-sources-table td:nth-child(n+2),
.reference-library-training-sources-table th:nth-child(n+2) {
  white-space: nowrap;
}

.reference-library-ingestion-log-summary {
  cursor: pointer;
  font-weight: 700;
}

.reference-library-ingestion-log-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 12px;
  margin-top: 12px;
}

.reference-library-ingestion-log-table th,
.reference-library-ingestion-log-table td {
  padding-right: 16px;
  vertical-align: top;
}

.reference-library-ingestion-log-table th {
  line-height: 1.15;
  text-align: left;
  vertical-align: bottom;
}

.reference-library-ingestion-log-table th:nth-child(1),
.reference-library-ingestion-log-table td:nth-child(1) {
  width: 23%;
}

.reference-library-ingestion-log-table th:nth-child(2),
.reference-library-ingestion-log-table td:nth-child(2) {
  width: 8%;
  white-space: nowrap;
}

.reference-library-ingestion-log-table th:nth-child(3),
.reference-library-ingestion-log-table td:nth-child(3) {
  width: 16%;
  white-space: nowrap;
}

.reference-library-ingestion-log-table th:nth-child(4),
.reference-library-ingestion-log-table td:nth-child(4) {
  width: 47%;
}

.reference-library-ingestion-log-table th:nth-child(5),
.reference-library-ingestion-log-table td:nth-child(5) {
  width: 6%;
  padding-right: 0;
  white-space: nowrap;
}

.reference-library-ingestion-log-error {
  color: var(--theme-primary-faint);
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.library-page-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: clamp(2rem, 2.9vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #e6edf9;
}

.reference-sources-intake-options {
  margin-top: 14px;
}

.reference-sources-intake-option {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.reference-sources-intake-option p {
  margin: 0;
  color: var(--theme-primary-pale);
  opacity: 0.88;
}

.reference-sources-intake-option:hover {
  border-color: color-mix(in srgb, var(--theme-primary-soft) 45.0%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-primary-soft) 20.0%, transparent);
  transform: translateY(-1px);
}

.projects-research-tree {
  list-style: none;
  margin: 10px 0 0;
  padding-left: 14px;
  border-left: 1px solid rgba(120, 170, 255, 0.22);
}

.projects-research-node {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(120, 170, 255, 0.16);
  background: rgba(6, 20, 52, 0.34);
}

.projects-research-node-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.projects-research-node-title {
  font-weight: 700;
}

.projects-research-node-open {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--theme-text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.projects-research-node-open:hover {
  color: #9ac3ff;
}

.projects-research-node-meta {
  margin-top: 4px;
  font-size: 0.86rem;
  color: rgb(var(--theme-text-rgb) / 80%);
}

.projects-research-sources {
  margin-top: 8px;
}

.projects-research-sources-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.projects-research-sources-item {
  border: 1px solid rgba(120, 170, 255, 0.16);
  background: rgba(6, 20, 52, 0.34);
  border-radius: 8px;
  padding: 6px 10px;
}

.projects-research-sources-link {
  color: #9ac3ff;
  text-decoration: none;
  word-break: break-word;
}

.projects-research-sources-link:hover {
  color: #c9e0ff;
  text-decoration: underline;
}

.projects-research-drawer {
  margin-top: 14px;
  border: 1px solid rgba(120, 170, 255, 0.28);
  border-radius: 10px;
  background: rgba(6, 14, 34, 0.7);
  padding: 12px;
}

.projects-research-drawer-controls {
  display: flex;
  justify-content: flex-end;
}

.projects-research-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.projects-research-drawer-header h4 {
  margin: 0;
  font-size: 1rem;
}

.projects-research-drawer-close {
  border: 1px solid rgba(150, 192, 255, 0.35);
  background: rgba(17, 33, 68, 0.74);
  color: var(--theme-text);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  line-height: 1;
  cursor: pointer;
}

.projects-research-drawer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.projects-research-drawer-meta {
  margin-top: 8px;
  margin-bottom: 0;
  color: rgb(var(--theme-text-rgb) / 82%);
  font-size: 0.88rem;
}

.projects-research-drawer-tabs {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.projects-research-drawer-tab {
  border: 1px solid rgba(150, 192, 255, 0.26);
  background: rgba(13, 27, 58, 0.64);
  color: var(--theme-text);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.84rem;
}

.projects-research-drawer-tab.is-active {
  background: rgba(56, 122, 242, 0.36);
  border-color: rgba(131, 183, 255, 0.55);
}

.projects-research-drawer-panel {
  margin-top: 10px;
}

.projects-research-drawer-panel h5 {
  margin: 0 0 6px;
  font-size: 0.84rem;
  color: var(--theme-text-secondary);
}

.projects-research-drawer-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  margin: 0;
}

.projects-research-drawer-list dt {
  color: rgb(var(--theme-text-rgb) / 84%);
}

.projects-research-drawer-list dd {
  margin: 0;
  color: #f0f6ff;
}

.projects-research-drawer-section + .projects-research-drawer-section {
  margin-top: 10px;
}

.projects-research-drawer-section h5 {
  margin: 0 0 6px;
  font-size: 0.86rem;
  color: var(--theme-text-secondary);
}

.projects-research-drawer-ul {
  margin: 0;
  padding-left: 18px;
}

.projects-research-drawer-empty {
  margin: 0;
  color: rgb(var(--theme-text-rgb) / 78%);
}

.projects-research-tool-call {
  border: 1px solid rgba(120, 170, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 21, 47, 0.62);
  padding: 8px;
}

.projects-research-tool-call + .projects-research-tool-call {
  margin-top: 8px;
}

.projects-research-tool-call h5 {
  margin: 0;
  font-size: 0.84rem;
}

.projects-research-tool-call-meta {
  margin-top: 3px;
  margin-bottom: 5px;
  color: rgb(var(--theme-text-rgb) / 80%);
  font-size: 0.78rem;
}

.projects-research-tool-call details + details {
  margin-top: 6px;
}

.projects-research-drawer-json {
  margin: 6px 0 0;
  max-height: 220px;
  overflow: auto;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: pre-wrap;
  border-radius: 6px;
  border: 1px solid rgba(132, 176, 255, 0.2);
  background: rgba(8, 19, 43, 0.76);
  padding: 8px;
}

.projects-research-drawer-fetch-note {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(132, 183, 255, 0.36);
  background: rgba(29, 73, 138, 0.3);
  color: var(--theme-text);
  font-size: 0.8rem;
}

.research-explorer-rollups {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}

.research-rollup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.research-rollup-label {
  font-size: 0.85rem;
  opacity: 0.85;
}

.research-rollup-value {
  font-weight: 700;
}

.research-rollup-danger {
  border-color: rgba(220, 53, 69, 0.45);
}

.research-rollup-warning {
  border-color: rgba(255, 193, 7, 0.45);
}

.research-rollup-success {
  border-color: rgba(25, 135, 84, 0.45);
}

.research-rollup-neutral {
  border-color: rgba(108, 117, 125, 0.45);
}

.projects-policy-warning {
  margin-top: 8px;
  font-style: italic;
}

.projects-policy-warning--warning {
  color: #ff8b8b;
}

.projects-policy-warning--danger {
  color: #ff5d5d;
}

.projects-policy-derived {
  margin-top: 10px;
  border: 1px solid rgba(120, 170, 255, 0.16);
  background: rgba(6, 20, 52, 0.34);
  border-radius: 8px;
  padding: 8px 10px;
}

.projects-policy-derived p {
  margin: 4px 0;
  font-size: 0.86rem;
}

@media (max-width: 1280px) {
  .dashboard-calendar-page {
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
    width: min(calc(100% + 72px), 1480px);
    margin: 0 -36px -8px;
  }

  .dashboard-calendar-shell-body {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  }

  .dashboard-calendar-project-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-calendar-summary-layout,
  .dashboard-calendar-page {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0;
  }

  .dashboard-calendar-shell-body {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar-topbar,
  .dashboard-calendar-topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-calendar-search-form {
    min-width: 0;
    width: 100%;
  }

  .dashboard-calendar-details {
    max-height: none;
    overflow-y: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 0;
  }

  .dashboard-calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-calendar-nav,
  .dashboard-calendar-actions {
    flex-wrap: wrap;
  }

  .dashboard-calendar-day-cell {
    min-height: 98px;
    padding: 8px;
  }

  .dashboard-calendar-weekday {
    padding: 10px 8px;
  }

  .dashboard-calendar-day-panel {
    max-height: none;
  }

  .dashboard-calendar-day-card,
  .dashboard-calendar-day-detail-lines {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar-day-card-kind {
    justify-self: start;
    max-width: 100%;
  }

  .dashboard-calendar-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Provider-authored review prose followed by the exact Rails score projection. */
.conversation-transcript .message-bubble--review-scorecard {
  width: min(940px, 92%);
  max-width: min(940px, 92%);
}

.project-review-scorecard {
  --review-accent: 198 166 100;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgb(var(--review-accent) / 34%);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgb(var(--review-accent) / 10%), transparent 38%),
    rgb(10 15 22 / 72%);
  box-shadow: 0 24px 60px rgb(0 0 0 / 20%);
  color: rgb(var(--theme-text-rgb) / 92%);
}

.project-review-scorecard--positive {
  --review-accent: 116 190 144;
}

.project-review-scorecard--human {
  --review-accent: 118 165 211;
}

.project-review-scorecard--blocked {
  --review-accent: 194 111 101;
}

.project-review-scorecard-header {
  padding: clamp(24px, 4vw, 42px) 24px 26px;
  text-align: center;
  border-bottom: 1px solid rgb(var(--review-accent) / 20%);
}

.project-review-scorecard-kicker,
.project-review-scorecard-section-label {
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--review-accent) / 92%);
}

.project-review-scorecard-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}

.project-review-scorecard-letter {
  font-family: var(--font-family-ui);
  font-size: clamp(4.75rem, 12vw, 7.5rem);
  font-weight: 790;
  line-height: 0.92;
  letter-spacing: -0.07em;
  color: rgb(var(--review-accent));
  text-shadow: 0 8px 30px rgb(var(--review-accent) / 14%);
}

.project-review-scorecard-score {
  margin-top: 12px;
  font-family: var(--font-family-ui);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 690;
  letter-spacing: -0.035em;
  color: rgb(var(--theme-text-rgb) / 96%);
}

.project-review-scorecard-title {
  margin: 8px 0 0;
  font-family: var(--font-family-ui);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--theme-text-rgb) / 58%);
}

.project-review-scorecard-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}

.project-review-scorecard-meta span,
.project-review-scorecard-finding-severity {
  border: 1px solid rgb(var(--review-accent) / 24%);
  border-radius: 999px;
  background: rgb(var(--review-accent) / 8%);
  padding: 5px 9px;
  font-size: 0.72rem;
  line-height: 1;
  color: rgb(var(--theme-text-rgb) / 74%);
}

.project-review-scorecard-overall,
.project-review-scorecard-detail-section {
  padding: 22px 24px;
  border-bottom: 1px solid rgb(var(--review-accent) / 14%);
}

.project-review-scorecard-overall p,
.project-review-scorecard-detail-section p {
  margin: 8px 0 0;
  font-size: 0.89rem;
  line-height: 1.62;
  color: rgb(var(--theme-text-rgb) / 76%);
}

.project-review-scorecard-dimensions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid rgb(var(--review-accent) / 14%);
}

.project-review-scorecard-dimension {
  padding: 22px 24px;
  border-right: 1px solid rgb(var(--review-accent) / 12%);
  border-bottom: 1px solid rgb(var(--review-accent) / 12%);
}

.project-review-scorecard-dimension:nth-child(2n) {
  border-right: 0;
}

.project-review-scorecard-dimension-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.project-review-scorecard-dimension h3 {
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: 0.94rem;
  line-height: 1.28;
  color: rgb(var(--theme-text-rgb) / 92%);
}

.project-review-scorecard-dimension-definition,
.project-review-scorecard-dimension-rationale {
  margin: 5px 0 0;
  font-size: 0.77rem;
  line-height: 1.48;
  color: rgb(var(--theme-text-rgb) / 54%);
}

.project-review-scorecard-dimension-rationale {
  margin-top: 10px;
  color: rgb(var(--theme-text-rgb) / 72%);
}

.project-review-scorecard-dimension-score {
  flex: 0 0 auto;
  font-family: var(--font-family-ui);
  font-size: 1.5rem;
  font-weight: 720;
  line-height: 1;
  color: rgb(var(--review-accent));
}

.project-review-scorecard-meter {
  height: 3px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(var(--theme-text-rgb) / 8%);
}

.project-review-scorecard-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgb(var(--review-accent));
}

.project-review-scorecard-findings {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.project-review-scorecard-finding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.project-review-scorecard-finding p {
  margin: 0;
}

.project-review-scorecard-finding-severity {
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-review-scorecard-required-changes {
  border-bottom: 0;
}

.project-review-scorecard-required-changes ol {
  margin: 10px 0 0;
  padding-left: 1.3rem;
}

.project-review-scorecard-required-changes li {
  padding-left: 5px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgb(var(--theme-text-rgb) / 76%);
}

.project-review-scorecard-required-changes li + li {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .conversation-transcript .message-bubble--review-scorecard {
    width: 100%;
    max-width: 100%;
  }

  .project-review-scorecard-dimensions {
    grid-template-columns: 1fr;
  }

  .project-review-scorecard-dimension,
  .project-review-scorecard-dimension:nth-child(2n) {
    border-right: 0;
  }

  .project-review-scorecard-finding {
    grid-template-columns: 1fr;
  }
}

/* Project management dashboard. All color is derived from the user's theme seeds. */
.projects-dashboard-shell {
  max-width: none;
  min-height: calc(100dvh - 128px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.projects-dashboard {
  --projects-dashboard-canvas: color-mix(in srgb, var(--theme-canvas) 94%, black);
  --projects-dashboard-surface: color-mix(in srgb, var(--theme-surface) 90%, transparent);
  --projects-dashboard-surface-lifted: color-mix(in srgb, var(--theme-surface-lift) 84%, transparent);
  --projects-dashboard-line: color-mix(in srgb, var(--theme-border-choice) 70%, transparent);
  --projects-dashboard-line-soft: color-mix(in srgb, var(--theme-border-choice) 42%, transparent);
  --projects-dashboard-muted: color-mix(in srgb, var(--theme-text) 62%, transparent);
  --projects-dashboard-subtle: color-mix(in srgb, var(--theme-text) 44%, transparent);
  container-type: inline-size;
  min-height: calc(100dvh - 128px);
  box-sizing: border-box;
  padding: clamp(28px, 4vw, 64px);
  color: var(--theme-text);
  font-family: var(--font-family-ui);
  background:
    radial-gradient(circle at 76% 12%, rgb(var(--theme-primary-rgb) / 7%), transparent 28%),
    linear-gradient(180deg, var(--projects-dashboard-canvas), color-mix(in srgb, var(--theme-canvas) 88%, black));
}

.projects-dashboard svg,
.projects-generation-modal svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.projects-dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--projects-dashboard-line-soft);
}

.projects-dashboard-heading {
  min-width: 0;
}

.projects-dashboard-heading h1 {
  margin: 0;
  color: var(--theme-text);
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  font-weight: 700;
  letter-spacing: -0.052em;
  line-height: 0.98;
}

.projects-dashboard-heading p {
  max-width: 620px;
  margin: 15px 0 0;
  color: var(--projects-dashboard-muted);
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  line-height: 1.55;
}

.projects-dashboard-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.projects-dashboard-header-side {
  display: grid;
  justify-items: end;
  gap: 13px;
  width: min(100%, 510px);
  flex: 0 1 510px;
}

.projects-dashboard-automation-status {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, 510px);
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgb(var(--theme-accent-rgb) / 34%);
  border-radius: 11px;
  background:
    linear-gradient(105deg, rgb(var(--theme-accent-rgb) / 10%), transparent 52%),
    color-mix(in srgb, var(--theme-surface) 72%, transparent);
  box-shadow: inset 3px 0 0 rgb(var(--theme-accent-rgb) / 62%);
}

.projects-dashboard-automation-status--enabled {
  border-color: color-mix(in srgb, var(--theme-primary) 32%, #5fd38d);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--theme-primary) 11%, #5fd38d 8%), transparent 58%),
    color-mix(in srgb, var(--theme-surface) 74%, transparent);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--theme-primary) 58%, #5fd38d);
}

.projects-dashboard-automation-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--theme-accent-soft);
  border: 1px solid rgb(var(--theme-accent-rgb) / 30%);
  border-radius: 10px;
  background: rgb(var(--theme-accent-rgb) / 9%);
}

.projects-dashboard-automation-status--enabled .projects-dashboard-automation-icon {
  color: color-mix(in srgb, var(--theme-primary-soft) 72%, #78e4a2);
  border-color: color-mix(in srgb, var(--theme-primary) 30%, #5fd38d);
  background: color-mix(in srgb, var(--theme-primary) 9%, #5fd38d 7%);
}

.projects-dashboard-automation-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.7;
}

.projects-dashboard-automation-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 14px;
  min-width: 0;
}

.projects-dashboard-automation-copy strong {
  grid-column: 1 / -1;
  color: var(--theme-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.projects-dashboard-automation-copy > span {
  min-width: 0;
  color: var(--projects-dashboard-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.projects-dashboard-automation-copy a {
  align-self: end;
  color: var(--theme-primary-soft);
  font-size: 0.7rem;
  font-weight: 680;
  line-height: 1.45;
  text-decoration: none;
  white-space: nowrap;
}

.projects-dashboard-automation-copy a:hover,
.projects-dashboard-automation-copy a:focus-visible {
  color: var(--theme-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.projects-dashboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  box-sizing: border-box;
  padding: 10px 16px;
  color: var(--theme-text);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--projects-dashboard-line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--theme-surface) 64%, transparent);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.projects-dashboard-action svg {
  width: 18px;
  height: 18px;
}

.projects-dashboard-action--primary {
  color: var(--theme-primary-soft);
  border-color: rgb(var(--theme-primary-rgb) / 72%);
  background: rgb(var(--theme-primary-rgb) / 9%);
}

.projects-dashboard-action--unread-tickets {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #dfffea;
  border-color: rgb(98 216 148 / 52%);
  box-shadow:
    0 0 0 1px rgb(98 216 148 / 9%),
    0 0 18px rgb(46 190 108 / 16%);
  animation: projects-dashboard-ticket-pulse 3.8s ease-in-out infinite;
}

.projects-dashboard-action--unread-tickets::after {
  position: absolute;
  z-index: 0;
  top: -45%;
  bottom: -45%;
  left: -72%;
  width: 58%;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(82 224 143 / 8%) 20%,
    rgb(119 255 176 / 34%) 52%,
    rgb(82 224 143 / 8%) 82%,
    transparent
  );
  filter: blur(1px);
  transform: skewX(-18deg);
  animation: projects-dashboard-ticket-wave 2.8s ease-in-out infinite;
}

.projects-dashboard-action--unread-tickets > svg,
.projects-dashboard-action--unread-tickets > span {
  position: relative;
  z-index: 1;
}

@keyframes projects-dashboard-ticket-wave {
  0%,
  16% {
    left: -72%;
  }

  72%,
  100% {
    left: 122%;
  }
}

@keyframes projects-dashboard-ticket-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgb(98 216 148 / 9%),
      0 0 14px rgb(46 190 108 / 13%);
  }

  50% {
    box-shadow:
      0 0 0 1px rgb(143 240 182 / 20%),
      0 0 24px rgb(46 190 108 / 28%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-dashboard-action--unread-tickets,
  .projects-dashboard-action--unread-tickets::after {
    animation: none;
  }
}

.projects-dashboard-action:hover,
.projects-dashboard-action:focus-visible {
  color: var(--theme-primary-soft);
  border-color: rgb(var(--theme-primary-rgb) / 74%);
  background: rgb(var(--theme-primary-rgb) / 12%);
  text-decoration: none;
  transform: translateY(-1px);
}

.projects-dashboard-action:focus-visible,
.projects-dashboard-generator-button:focus-visible,
.projects-dashboard-generator-command:focus-visible,
.projects-dashboard-row-arrow:focus-visible,
.projects-dashboard-project-link:focus-visible,
.projects-generation-dialog button:focus-visible,
.projects-generation-dialog textarea:focus-visible,
.projects-generation-dialog input:focus-visible,
.projects-dashboard-search input:focus-visible,
.projects-dashboard-filter select:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 3px;
}

.projects-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  max-width: 1420px;
  margin: 0 auto;
}

.projects-dashboard-projects {
  min-width: 0;
  padding: 28px 0 42px;
}

.projects-dashboard-list-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.projects-dashboard-list-heading-row h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-align: left;
}

.projects-dashboard-list-heading-row > div:first-child > p {
  margin: 7px 0 0;
  color: var(--projects-dashboard-subtle);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.projects-dashboard-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 410px);
}

.projects-dashboard-search,
.projects-dashboard-filter {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--projects-dashboard-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-canvas) 78%, transparent);
  transition: border-color 160ms ease, background 160ms ease;
}

.projects-dashboard-search {
  flex: 1 1 230px;
}

.projects-dashboard-search:focus-within,
.projects-dashboard-filter:focus-within {
  border-color: rgb(var(--theme-primary-rgb) / 66%);
  background: color-mix(in srgb, var(--theme-surface) 58%, transparent);
}

.projects-dashboard-search > svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--projects-dashboard-muted);
  pointer-events: none;
}

.projects-dashboard-search input,
.projects-dashboard-filter select {
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  color: var(--theme-text);
  font: 500 0.82rem/1.2 var(--font-family-ui);
  border: 0;
  outline: 0;
  background: transparent;
}

.projects-dashboard-search input {
  width: 100%;
  padding: 9px 12px 9px 39px;
}

.projects-dashboard-search input::placeholder {
  color: var(--projects-dashboard-subtle);
  opacity: 1;
}

.projects-dashboard-filter {
  flex: 0 0 146px;
}

.projects-dashboard-filter select {
  width: 100%;
  padding: 9px 34px 9px 12px;
  appearance: none;
  cursor: pointer;
}

.projects-dashboard-filter > svg {
  position: absolute;
  right: 11px;
  width: 16px;
  height: 16px;
  color: var(--projects-dashboard-muted);
  pointer-events: none;
}

.projects-dashboard-table {
  overflow: hidden;
  border: 1px solid var(--projects-dashboard-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--theme-canvas) 60%, transparent);
}

.projects-dashboard-table-header,
.projects-dashboard-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.45fr) minmax(92px, 0.46fr) minmax(104px, 0.52fr) minmax(104px, 0.5fr) minmax(96px, 0.48fr) minmax(144px, 0.6fr) 34px;
  gap: 14px;
  align-items: center;
}

.projects-dashboard-table-header {
  min-height: 46px;
  padding: 0 18px;
  color: var(--projects-dashboard-subtle);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--projects-dashboard-line-soft);
  background: color-mix(in srgb, var(--theme-surface) 32%, transparent);
}

.projects-dashboard-row {
  position: relative;
  min-height: 84px;
  box-sizing: border-box;
  padding: 13px 18px;
  border-bottom: 1px solid var(--projects-dashboard-line-soft);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.projects-dashboard-row:last-child {
  border-bottom: 0;
}

.projects-dashboard-row:hover,
.projects-dashboard-row:focus-within {
  background: rgb(var(--theme-primary-rgb) / 5%);
  box-shadow: inset 3px 0 0 rgb(var(--theme-primary-rgb) / 72%);
}

.projects-dashboard-row[hidden] {
  display: none;
}

.projects-dashboard-project-cell {
  display: grid;
  grid-template-columns: 28px 9px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-width: 0;
}

.projects-dashboard-project-cell > .projects-dashboard-activity-dot {
  margin-top: 8px;
}

.projects-dashboard-pause-form {
  display: inline-flex;
  margin: 0;
}

.projects-dashboard-pause-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  color: var(--projects-dashboard-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

button.projects-dashboard-pause-button {
  appearance: none;
  cursor: pointer;
}

.projects-dashboard-pause-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

button.projects-dashboard-pause-button:hover,
button.projects-dashboard-pause-button:focus-visible {
  color: var(--theme-accent);
  border-color: rgb(var(--theme-accent-rgb) / 40%);
  background: rgb(var(--theme-accent-rgb) / 8%);
  transform: translateY(-1px);
}

button.projects-dashboard-pause-button:focus-visible {
  outline: 2px solid rgb(var(--theme-accent-rgb) / 32%);
  outline-offset: 2px;
}

button.projects-dashboard-pause-button--resume {
  color: color-mix(in srgb, var(--theme-primary-soft) 72%, #62d894);
}

button.projects-dashboard-pause-button--resume:hover,
button.projects-dashboard-pause-button--resume:focus-visible {
  color: #8ff0b6;
  border-color: rgb(98 216 148 / 46%);
  background: rgb(98 216 148 / 10%);
}

.projects-dashboard-pause-button--inactive {
  color: var(--projects-dashboard-subtle);
  opacity: 0.42;
}

.projects-dashboard-project-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--theme-text);
  font-size: 0.96rem;
  font-weight: 680;
  line-height: 1.3;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-dashboard-project-link:hover {
  color: var(--theme-primary-soft);
  text-decoration: none;
}

.projects-dashboard-project-cell p {
  max-width: 680px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--projects-dashboard-muted);
  font-size: 0.77rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-dashboard-type-cell,
.projects-dashboard-activity-cell,
.projects-dashboard-control-cell,
.projects-dashboard-updated-cell {
  min-width: 0;
  color: var(--projects-dashboard-muted);
  font-size: 0.77rem;
  line-height: 1.35;
}

.projects-dashboard-updated-cell .index-activity-timestamp {
  white-space: nowrap;
}

.projects-dashboard-control-form {
  display: inline-flex;
  margin: 0;
}

.projects-dashboard-control-form select {
  min-height: 32px;
  max-width: 112px;
  padding: 5px 27px 5px 9px;
  color: var(--theme-text);
  font: 650 0.7rem/1 var(--font-family-ui);
  border: 1px solid var(--projects-dashboard-line);
  border-radius: 8px;
  outline: 0;
  background: color-mix(in srgb, var(--theme-surface) 45%, transparent);
}

.projects-dashboard-control-form select:focus-visible {
  border-color: rgb(var(--theme-primary-rgb) / 60%);
  outline: 2px solid rgb(var(--theme-primary-rgb) / 24%);
  outline-offset: 2px;
}

.projects-dashboard-control-form select.is-error {
  border-color: color-mix(in srgb, var(--theme-accent) 72%, var(--theme-text));
  outline: 2px solid rgb(var(--theme-accent-rgb) / 20%);
  outline-offset: 2px;
}

.projects-dashboard-control-static,
.projects-dashboard-priority-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--projects-dashboard-muted);
  font-size: 0.72rem;
  font-weight: 680;
}

.projects-dashboard-control-static--unavailable {
  color: var(--projects-dashboard-subtle);
  font-weight: 600;
}

.projects-dashboard-priority-status--ongoing {
  color: color-mix(in srgb, var(--theme-primary-soft) 72%, #5fd38d);
}

.projects-dashboard-priority-status--completed {
  color: color-mix(in srgb, var(--projects-dashboard-muted) 58%, transparent);
  font-style: italic;
}

.projects-dashboard-priority-status--severity {
  padding: 5px 9px;
  color: #ff9a9a;
  text-decoration: none;
  border: 1px solid rgb(255 85 85 / 44%);
  border-radius: 999px;
  background: rgb(180 22 38 / 18%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 3%);
}

.projects-dashboard-priority-status--severity:hover,
.projects-dashboard-priority-status--severity:focus-visible {
  color: #ffd0d0;
  border-color: rgb(255 107 107 / 72%);
  background: rgb(180 22 38 / 28%);
}

.project-scheduler-settings-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.project-scheduler-tickets-page .provider-settings-shell {
  width: min(1180px, calc(100% - 40px));
}

.project-scheduler-tickets-hero h1 {
  overflow-wrap: anywhere;
}

.project-scheduler-ticket-section {
  margin-top: 22px;
}

.settings-dashboard-chip--danger {
  color: #ffb1b1;
  border-color: rgb(255 85 85 / 38%);
  background: rgb(180 22 38 / 18%);
}

.project-scheduler-ticket-list {
  display: grid;
  margin-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
}

.project-scheduler-ticket-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 17px 4px;
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
}

.project-scheduler-ticket-row:hover,
.project-scheduler-ticket-row:focus-visible {
  background: rgb(var(--theme-primary-rgb) / 5%);
}

.project-scheduler-ticket-row > time {
  color: var(--theme-text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.project-scheduler-ticket-severity,
.project-scheduler-ticket-resolved-label {
  display: inline-flex;
  justify-content: center;
  padding: 6px 9px;
  color: #ffadad;
  font-size: 0.72rem;
  font-weight: 760;
  border: 1px solid rgb(255 85 85 / 40%);
  border-radius: 999px;
  background: rgb(180 22 38 / 16%);
}

.project-scheduler-ticket-resolved-label {
  color: color-mix(in srgb, var(--theme-text-muted) 72%, transparent);
  border-color: color-mix(in srgb, var(--theme-border) 76%, transparent);
  background: rgb(var(--theme-surface-rgb) / 28%);
  font-style: italic;
}

.project-scheduler-ticket-identity {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.project-scheduler-ticket-identity strong {
  overflow-wrap: anywhere;
}

.project-scheduler-ticket-identity small,
.project-scheduler-ticket-summary-card span,
.project-scheduler-ticket-history small {
  color: var(--theme-text-muted);
}

.project-scheduler-ticket-empty {
  margin: 18px 0 0;
  padding: 24px;
  color: var(--theme-text-muted);
  text-align: center;
  border: 1px dashed color-mix(in srgb, var(--theme-border) 78%, transparent);
  border-radius: 10px;
}

.project-scheduler-ticket-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.project-scheduler-ticket-summary-card {
  display: grid;
  gap: 8px;
}

.project-scheduler-ticket-summary-card > strong {
  color: var(--theme-text);
  font-size: 1.35rem;
}

.project-scheduler-ticket-summary-card--severity > strong {
  color: #ff9292;
  font-size: 2.25rem;
}

.project-scheduler-ticket-failure-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.project-scheduler-ticket-failure-details > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
  border-radius: 9px;
  background: rgb(var(--theme-surface-rgb) / 24%);
}

.project-scheduler-ticket-failure-details dt {
  color: var(--theme-text-muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-scheduler-ticket-failure-details dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: var(--theme-text);
}

.project-scheduler-ticket-history {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.project-scheduler-ticket-history li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 0;
  border-top: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
}

.project-scheduler-ticket-history-marker {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--theme-primary);
  box-shadow: 0 0 0 4px rgb(var(--theme-primary-rgb) / 12%);
}

.project-scheduler-ticket-history-marker--opened {
  background: #ff6f6f;
  box-shadow: 0 0 0 4px rgb(255 85 85 / 13%);
}

.project-scheduler-ticket-history-marker--resolved {
  background: #78d69d;
  box-shadow: 0 0 0 4px rgb(82 196 126 / 13%);
}

.project-scheduler-ticket-history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.project-scheduler-ticket-history-heading time {
  color: var(--theme-text-muted);
  font-size: 0.78rem;
}

.project-scheduler-ticket-history p {
  margin: 8px 0 6px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .project-scheduler-ticket-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .project-scheduler-ticket-row > time {
    white-space: normal;
  }

  .project-scheduler-ticket-severity,
  .project-scheduler-ticket-resolved-label {
    justify-self: start;
  }

  .project-scheduler-ticket-summary-grid {
    grid-template-columns: 1fr;
  }

  .project-scheduler-ticket-failure-details {
    grid-template-columns: 1fr;
  }

  .project-scheduler-ticket-history-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.projects-dashboard-type-cell > span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  box-sizing: border-box;
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  color: var(--theme-primary-soft);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgb(var(--theme-primary-rgb) / 30%);
  border-radius: 7px;
  background: rgb(var(--theme-primary-rgb) / 7%);
}

.projects-dashboard-activity-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.projects-dashboard-activity-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--projects-dashboard-subtle);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-text) 5%, transparent);
}

.projects-dashboard-activity-dot--success {
  background: var(--theme-primary);
  box-shadow: 0 0 0 3px rgb(var(--theme-primary-rgb) / 10%);
}

.projects-dashboard-activity-dot--info {
  background: var(--theme-accent-soft);
  box-shadow: 0 0 0 3px rgb(var(--theme-accent-rgb) / 11%);
}

.projects-dashboard-activity-dot--warning,
.projects-dashboard-activity-dot--danger {
  background: color-mix(in srgb, var(--theme-accent) 72%, var(--theme-text));
  box-shadow: 0 0 0 3px rgb(var(--theme-accent-rgb) / 10%);
}

.projects-dashboard-row-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--projects-dashboard-muted);
  border-radius: 50%;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.projects-dashboard-row-arrow svg {
  width: 18px;
  height: 18px;
}

.projects-dashboard-row:hover .projects-dashboard-row-arrow,
.projects-dashboard-row-arrow:hover {
  color: var(--theme-primary-soft);
  background: rgb(var(--theme-primary-rgb) / 9%);
  transform: translateX(2px);
}

.projects-dashboard-priority-form {
  display: inline-flex;
  margin: 0;
}

.projects-dashboard-priority-toggle {
  display: inline-grid;
  grid-template-columns: 21px auto;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  min-height: 32px;
  box-sizing: border-box;
  padding: 6px 10px;
  color: var(--projects-dashboard-muted);
  font-family: var(--font-family-ui);
  font-size: 0.72rem;
  font-weight: 680;
  line-height: 1;
  text-align: left;
  border: 1px solid var(--projects-dashboard-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-surface) 45%, transparent);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

button.projects-dashboard-priority-toggle {
  appearance: none;
  cursor: pointer;
}

button.projects-dashboard-priority-toggle:hover,
button.projects-dashboard-priority-toggle:focus-visible {
  border-color: color-mix(in srgb, currentColor 60%, var(--projects-dashboard-line));
  background: color-mix(in srgb, currentColor 8%, var(--projects-dashboard-surface));
  transform: translateY(-1px);
}

button.projects-dashboard-priority-toggle:focus-visible {
  outline: 2px solid rgb(var(--theme-primary-rgb) / 34%);
  outline-offset: 2px;
}

button.projects-dashboard-priority-toggle:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.projects-dashboard-priority-toggle.is-error {
  border-style: dashed;
}

.projects-dashboard-priority-toggle--medium {
  color: var(--theme-primary-soft);
  border-color: rgb(var(--theme-primary-rgb) / 36%);
  background: rgb(var(--theme-primary-rgb) / 7%);
}

.projects-dashboard-priority-toggle--high {
  color: var(--theme-accent);
  border-color: rgb(var(--theme-accent-rgb) / 42%);
  background: rgb(var(--theme-accent-rgb) / 8%);
}

.projects-dashboard-priority-toggle--readonly {
  border-color: transparent;
  background: transparent;
}

.projects-dashboard-priority-levels {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 21px;
  height: 14px;
}

.projects-dashboard-priority-levels > span {
  width: 4px;
  border-radius: 2px 2px 1px 1px;
  background: var(--projects-dashboard-line);
  transition: height 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.projects-dashboard-priority-levels > span:nth-child(1) { height: 6px; }
.projects-dashboard-priority-levels > span:nth-child(2) { height: 10px; }
.projects-dashboard-priority-levels > span:nth-child(3) { height: 14px; }

.projects-dashboard-priority-toggle--low .projects-dashboard-priority-levels > span:nth-child(1),
.projects-dashboard-priority-toggle--medium .projects-dashboard-priority-levels > span:nth-child(-n + 2),
.projects-dashboard-priority-toggle--high .projects-dashboard-priority-levels > span {
  background: currentColor;
  box-shadow: 0 0 6px color-mix(in srgb, currentColor 48%, transparent);
}

.projects-dashboard-empty {
  padding: 54px 24px;
  color: var(--projects-dashboard-muted);
  text-align: center;
}

.projects-dashboard-empty[hidden] {
  display: none;
}

.projects-dashboard-empty strong {
  display: block;
  color: var(--theme-text);
  font-size: 1rem;
}

.projects-dashboard-empty p {
  margin: 7px 0 0;
  font-size: 0.82rem;
}

.projects-dashboard-generator {
  display: none;
  min-width: 0;
  padding: 42px 18px 28px 30px;
  border-left: 1px solid var(--projects-dashboard-line-soft);
}

.projects-dashboard-generator-label {
  margin: 0 0 20px;
  color: var(--projects-dashboard-muted);
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0.11em;
  text-align: center;
  text-transform: uppercase;
}

.projects-dashboard-generator-button,
.projects-dashboard-generator-command {
  appearance: none;
  color: inherit;
  font-family: var(--font-family-ui);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.projects-dashboard-generator-button {
  display: grid;
  justify-items: center;
  width: 100%;
  padding: 0;
  text-align: center;
}

.projects-dashboard-knob {
  position: relative;
  display: grid;
  place-items: center;
  width: 214px;
  height: 214px;
  margin: 4px auto 31px;
  color: var(--theme-primary);
  border: 1px solid rgb(var(--theme-primary-rgb) / 34%);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -2deg, rgb(var(--theme-text-rgb) / 24%) 0deg 0.9deg, transparent 0.9deg 6deg),
    radial-gradient(circle, transparent 61%, rgb(var(--theme-primary-rgb) / 9%) 62%, transparent 68%);
  transition: transform 220ms ease, filter 220ms ease;
}

.projects-dashboard-generator-button:hover .projects-dashboard-knob,
.projects-dashboard-generator-button:focus-visible .projects-dashboard-knob,
.projects-dashboard-generator-command:hover .projects-dashboard-knob {
  filter: drop-shadow(0 0 18px rgb(var(--theme-primary-rgb) / 24%));
  transform: rotate(3deg) scale(1.015);
}

.projects-dashboard-knob-face {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  box-sizing: border-box;
  border: 2px solid rgb(var(--theme-primary-rgb) / 82%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgb(var(--theme-text-rgb) / 17%), transparent 22%),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-surface-lift) 94%, black), color-mix(in srgb, var(--theme-canvas) 76%, black));
  box-shadow:
    0 0 0 7px rgb(var(--theme-primary-rgb) / 10%),
    inset 0 0 22px rgb(var(--theme-primary-rgb) / 12%),
    0 16px 32px color-mix(in srgb, var(--theme-canvas) 72%, transparent);
}

.projects-dashboard-knob-face::before {
  content: "";
  position: absolute;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--theme-primary);
  box-shadow: 0 0 9px rgb(var(--theme-primary-rgb) / 80%);
}

.projects-dashboard-knob-face svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.7;
}

.projects-dashboard-knob-orbit {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 50%;
  pointer-events: none;
}

.projects-dashboard-knob-orbit--one {
  inset: -20px;
  border-top-color: var(--theme-primary);
  transform: rotate(-32deg);
}

.projects-dashboard-knob-orbit--two {
  inset: -12px;
  border-bottom-color: rgb(var(--theme-primary-rgb) / 74%);
  transform: rotate(-48deg);
}

.projects-dashboard-generator-copy {
  display: grid;
  gap: 10px;
}

.projects-dashboard-generator-copy strong {
  color: var(--theme-text);
  font-size: 1.15rem;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.projects-dashboard-generator-copy > span {
  max-width: 255px;
  color: var(--projects-dashboard-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.projects-dashboard-preview-note {
  margin: 52px 0 0;
  padding-top: 22px;
  color: var(--projects-dashboard-subtle);
  font-size: 0.72rem;
  text-align: center;
  border-top: 1px solid var(--projects-dashboard-line-soft);
}

.projects-dashboard-mobile-generator {
  display: block;
  max-width: 1420px;
  margin: 22px auto 0;
}

.projects-dashboard-generator-command {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 112px;
  box-sizing: border-box;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--projects-dashboard-line);
  border-radius: 11px;
  background:
    radial-gradient(circle at 14% 20%, rgb(var(--theme-primary-rgb) / 10%), transparent 30%),
    var(--projects-dashboard-surface);
}

.projects-dashboard-knob--compact {
  width: 76px;
  height: 76px;
  margin: 0;
}

.projects-dashboard-knob--compact .projects-dashboard-knob-face {
  width: 57px;
  height: 57px;
  border-width: 1px;
  box-shadow:
    0 0 0 4px rgb(var(--theme-primary-rgb) / 9%),
    inset 0 0 12px rgb(var(--theme-primary-rgb) / 10%);
}

.projects-dashboard-knob--compact .projects-dashboard-knob-face::before {
  top: 4px;
  width: 4px;
  height: 4px;
}

.projects-dashboard-knob--compact svg {
  width: 27px;
  height: 27px;
}

.projects-dashboard-command-arrow {
  width: 22px;
  height: 22px;
  color: var(--theme-primary-soft);
}

html.projects-generation-modal-open {
  overflow: hidden;
}

html.projects-generation-modal-open .home-content {
  box-shadow: none;
}

.projects-generation-modal {
  position: fixed;
  inset: 0;
  z-index: 20100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 28px;
  box-sizing: border-box;
  color: var(--theme-text);
  background: color-mix(in srgb, var(--theme-canvas) 72%, transparent);
  backdrop-filter: blur(3px);
}

.projects-generation-modal[hidden] {
  display: none;
}

.projects-generation-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(900px, calc(100dvh - 56px));
  overflow: auto;
  box-sizing: border-box;
  padding: clamp(24px, 3.4vw, 42px);
  font-family: var(--font-family-ui);
  border: 1px solid var(--theme-panel-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at 90% 8%, rgb(var(--theme-primary-rgb) / 8%), transparent 28%),
    color-mix(in srgb, var(--theme-surface) 96%, var(--theme-canvas));
  box-shadow: 0 30px 80px color-mix(in srgb, var(--theme-canvas) 72%, transparent);
  animation: projects-generation-enter 180ms ease-out;
}

@keyframes projects-generation-enter {
  from { opacity: 0; transform: translateX(18px) scale(0.99); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.projects-generation-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--projects-dashboard-muted, var(--theme-text-secondary));
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.projects-generation-close:hover {
  color: var(--theme-primary-soft);
  border-color: rgb(var(--theme-primary-rgb) / 28%);
  background: rgb(var(--theme-primary-rgb) / 7%);
}

.projects-generation-close svg {
  width: 20px;
  height: 20px;
}

.projects-generation-header {
  padding-right: 42px;
}

.projects-generation-header h2 {
  margin: 0;
  color: var(--theme-text);
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 690;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-align: left;
}

.projects-generation-header p {
  max-width: 500px;
  margin: 15px 0 0;
  color: var(--theme-text-secondary);
  font-size: 0.94rem;
  line-height: 1.58;
}

.projects-generation-form {
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.projects-generation-field {
  display: grid;
  gap: 9px;
}

.projects-generation-field > span:first-child,
.projects-generation-next-step h3 {
  color: var(--theme-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.3;
}

.projects-generation-field textarea,
.projects-generation-field input {
  width: 100%;
  box-sizing: border-box;
  color: var(--theme-text);
  font: 500 0.9rem/1.55 var(--font-family-ui);
  border: 1px solid var(--theme-border-choice);
  border-radius: 9px;
  outline: 0;
  background: color-mix(in srgb, var(--theme-canvas) 78%, transparent);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.projects-generation-field textarea {
  min-height: 164px;
  padding: 13px 14px;
  resize: vertical;
}

.projects-generation-field-hint {
  color: var(--projects-dashboard-subtle);
  font-size: 0.76rem;
  font-weight: 450;
  line-height: 1.45;
}

.projects-generation-field textarea::placeholder {
  color: color-mix(in srgb, var(--theme-text) 44%, transparent);
  opacity: 1;
}

.projects-generation-field textarea:focus,
.projects-generation-field input:focus {
  border-color: var(--theme-primary);
  background: color-mix(in srgb, var(--theme-canvas) 68%, var(--theme-surface));
  box-shadow: 0 0 0 3px rgb(var(--theme-primary-rgb) / 12%);
}

.projects-generation-field--count {
  width: min(210px, 100%);
}

.projects-generation-count-control {
  display: grid;
  grid-template-columns: 94px auto;
  align-items: center;
  gap: 13px;
}

.projects-generation-count-control input {
  min-height: 42px;
  padding: 8px 10px;
}

.projects-generation-count-control small {
  color: var(--theme-text-secondary);
  font-size: 0.76rem;
}

.projects-generation-next-step {
  padding: 20px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--theme-border-choice) 50%, transparent);
}

.projects-generation-next-step h3,
.projects-generation-next-step p {
  margin: 0;
  text-align: left;
}

.projects-generation-next-step p {
  margin-top: 8px;
  color: var(--theme-text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.projects-generation-footer {
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--theme-border-choice) 60%, transparent);
}

.projects-generation-footer > p {
  margin: 0;
  color: color-mix(in srgb, var(--theme-text) 52%, transparent);
  font-size: 0.75rem;
  line-height: 1.45;
}

.projects-generation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.projects-generation-secondary,
.projects-generation-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 16px;
  font: 650 0.82rem/1 var(--font-family-ui);
  border-radius: 8px;
}

.projects-generation-secondary {
  color: var(--theme-text);
  border: 1px solid var(--theme-border-choice);
  background: transparent;
  cursor: pointer;
}

.projects-generation-secondary:hover {
  color: var(--theme-primary-soft);
  border-color: rgb(var(--theme-primary-rgb) / 62%);
  background: rgb(var(--theme-primary-rgb) / 7%);
}

.projects-generation-primary {
  color: color-mix(in srgb, var(--theme-text) 58%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-border-choice) 58%, transparent);
  background: color-mix(in srgb, var(--theme-surface-lift) 72%, var(--theme-canvas));
  cursor: not-allowed;
  opacity: 0.62;
}

.projects-generation-primary svg {
  width: 17px;
  height: 17px;
}

@container (min-width: 920px) {
  .projects-dashboard-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  }

  .projects-dashboard-generator {
    display: block;
  }

  .projects-dashboard-mobile-generator {
    display: none;
  }
}

@container (max-width: 740px) {
  .projects-dashboard-header,
  .projects-dashboard-list-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .projects-dashboard-header-actions,
  .projects-dashboard-tools {
    justify-content: stretch;
    width: 100%;
  }

  .projects-dashboard-header-side {
    justify-items: stretch;
    width: 100%;
    flex: none;
  }

  .projects-dashboard-header-actions > *,
  .projects-dashboard-tools > * {
    flex: 1 1 0;
  }

  .projects-dashboard-table-header {
    display: none;
  }

  .projects-dashboard-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) 34px;
    gap: 12px 14px;
    min-height: 158px;
    padding: 17px 15px;
  }

  .projects-dashboard-project-cell {
    grid-column: 1 / -1;
  }

  .projects-dashboard-activity-cell {
    display: none;
  }

  .projects-dashboard-type-cell,
  .projects-dashboard-control-cell,
  .projects-dashboard-priority-cell,
  .projects-dashboard-updated-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    align-items: start;
  }

  .projects-dashboard-type-cell {
    grid-column: 1;
    grid-row: 2;
  }

  .projects-dashboard-control-cell {
    grid-column: 1;
    grid-row: 3;
  }

  .projects-dashboard-updated-cell {
    grid-column: 1 / 3;
    grid-row: 4;
  }

  .projects-dashboard-priority-cell {
    grid-column: 2;
    grid-row: 2;
  }

  .projects-dashboard-type-cell::before,
  .projects-dashboard-control-cell::before,
  .projects-dashboard-priority-cell::before,
  .projects-dashboard-updated-cell::before {
    content: attr(data-label);
    color: var(--projects-dashboard-subtle);
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .projects-dashboard-type-cell > span {
    min-height: auto;
    padding: 0;
    font-size: 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .projects-dashboard-row-arrow {
    grid-column: 3;
    grid-row: 2 / 5;
  }
}

@media (max-width: 620px) {
  html.projects-dashboard-active .projects-launcher-button,
  html.projects-dashboard-active .helper-launcher-button {
    display: none;
  }

  .projects-dashboard {
    min-height: calc(100dvh - 90px);
    padding: 28px 18px 50px;
  }

  .projects-dashboard-heading h1 {
    font-size: clamp(2.5rem, 14vw, 3.6rem);
  }

  .projects-dashboard-header-actions,
  .projects-dashboard-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .projects-dashboard-automation-status {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 11px 12px;
  }

  .projects-dashboard-automation-icon {
    width: 38px;
    height: 38px;
  }

  .projects-dashboard-automation-copy {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .projects-dashboard-automation-copy strong,
  .projects-dashboard-automation-copy > span,
  .projects-dashboard-automation-copy a {
    grid-column: 1;
  }

  .projects-dashboard-action {
    padding-inline: 12px;
  }

  .projects-dashboard-tools .projects-dashboard-search {
    grid-column: 1 / -1;
  }

  .projects-dashboard-tools .projects-dashboard-filter {
    grid-column: 1 / -1;
  }

  .projects-dashboard-generator-command {
    gap: 13px;
    min-height: 108px;
    padding: 14px;
  }

  .projects-dashboard-knob--compact {
    width: 66px;
    height: 66px;
  }

  .projects-dashboard-knob--compact .projects-dashboard-knob-face {
    width: 49px;
    height: 49px;
  }

  .projects-dashboard-generator-copy {
    gap: 6px;
  }

  .projects-dashboard-generator-copy strong {
    font-size: 0.98rem;
  }

  .projects-dashboard-generator-copy > span {
    font-size: 0.74rem;
    line-height: 1.45;
  }

  .projects-generation-modal {
    align-items: flex-end;
    padding: 0;
  }

  .projects-generation-dialog {
    width: 100%;
    max-height: 94dvh;
    padding: 28px 20px 24px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    animation-name: projects-generation-mobile-enter;
  }

  .projects-generation-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .projects-generation-actions > * {
    width: 100%;
  }
}

@media (max-width: 980px) {
  html.projects-dashboard-active .main-content-area.projects-dual-sidebar > .project-sidebar-shell,
  html.projects-dashboard-active .main-content-area.projects-dual-sidebar > .project-sidebar-toggle {
    display: none;
  }

  html.projects-dashboard-active .edge-corner-wordmark {
    display: none;
  }

  html.projects-dashboard-active .main-content-area.projects-dual-sidebar > .home-content {
    width: 100%;
    min-width: 0;
  }
}

@keyframes projects-generation-mobile-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .projects-dashboard *,
  .projects-generation-modal * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
