:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #18201d;
  background: #f5f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

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

.app-shell {
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 247, 244, 0.94)),
    #f5f7f4;
}

.workspace {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 28px;
  border-bottom: 1px solid #d8ded6;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  font-weight: 720;
  line-height: 1.1;
}

.topbar p {
  margin-top: 8px;
  color: #5a665f;
  font-size: 15px;
}

.status {
  min-width: 76px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid #cbd5cf;
  border-radius: 8px;
  background: #ffffff;
  color: #2d3b34;
  font-size: 13px;
  font-weight: 650;
}

.status[data-state="error"] {
  border-color: #d9a6a6;
  color: #842d2d;
}

.profile-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
}

.profile-toolbar label {
  display: grid;
  gap: 7px;
  width: min(520px, 100%);
}

.profile-toolbar label span {
  color: #5a665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #cbd5cf;
  border-radius: 8px;
  background: #ffffff;
  color: #18201d;
}

input {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #cbd5cf;
  border-radius: 8px;
  background: #ffffff;
  color: #18201d;
}

textarea {
  width: 100%;
  min-height: 92px;
  padding: 9px 10px;
  border: 1px solid #cbd5cf;
  border-radius: 8px;
  background: #ffffff;
  color: #18201d;
  resize: vertical;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd5cf;
  border-radius: 8px;
  background: #ffffff;
  color: #18201d;
  font-weight: 650;
  cursor: pointer;
}

button:hover {
  border-color: #98a59e;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

.profile-summary p,
.profile-summary code {
  margin-top: 8px;
  color: #5a665f;
  font-size: 13px;
}

.profile-summary code {
  overflow-wrap: anywhere;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
}

article {
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

article[data-state="pass"] {
  border-left: 4px solid #2f7d4f;
}

article[data-state="warn"] {
  border-left: 4px solid #b7781f;
}

article[data-state="fail"] {
  border-left: 4px solid #b13b3b;
}

h2 {
  font-size: 15px;
  font-weight: 720;
}

article p {
  margin-top: 10px;
  color: #5a665f;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

article span {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf1ee;
  color: #2d3b34;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.error {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #d9a6a6;
  border-radius: 8px;
  background: #fff7f7;
  color: #842d2d;
}

.action-result {
  margin: 18px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #111815;
  color: #eef5ef;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.projects-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #d8ded6;
}

.onboarding-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #d8ded6;
}

.section-heading,
.project-card-main,
.project-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-heading p {
  margin-top: 7px;
  color: #5a665f;
  font-size: 14px;
}

.project-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.project-actions:has(label + label) {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr) auto;
}

.project-actions label {
  display: grid;
  gap: 7px;
}

.project-actions label span {
  color: #5a665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.setup-repo-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

.setup-repo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr) minmax(260px, 0.8fr);
  gap: 12px;
  margin-top: 14px;
}

.setup-repo-grid label {
  display: grid;
  gap: 7px;
}

.setup-repo-grid label span,
.setup-repo-controls label span {
  color: #5a665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.setup-repo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.setup-repo-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.setup-repo-controls input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.empty-state {
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed var(--rho-border-strong);
  border-radius: 8px;
  background: var(--rho-panel-strong);
}

.empty-state p {
  margin-top: 8px;
  color: var(--rho-muted);
  font-size: 14px;
}

.project-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.project-card {
  min-height: auto;
  display: grid;
  gap: 12px;
}

.project-card[data-state="dirty"] {
  border-left: 4px solid #346eb8;
}

.project-card-main h2 {
  overflow-wrap: anywhere;
}

.project-card-main p,
.project-card > p {
  margin-top: 8px;
  color: #5a665f;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-meta span,
.project-card-main > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf1ee;
  color: #2d3b34;
  font-size: 12px;
  font-weight: 750;
}

.project-warning {
  color: #8a570f !important;
}

.project-card-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.detected-accounts {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.onboarding-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

.onboarding-summary div {
  display: grid;
  gap: 5px;
}

.onboarding-summary strong {
  font-size: 13px;
}

.onboarding-summary span {
  color: #5a665f;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-card {
  min-height: auto;
  display: grid;
  gap: 12px;
}

.account-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-main p,
.account-card p,
.account-card code {
  margin-top: 8px;
  color: #5a665f;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-main > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf1ee;
  color: #2d3b34;
  font-size: 12px;
  font-weight: 750;
}

.manual-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.manual-profile label {
  display: grid;
  gap: 7px;
}

.manual-profile label span {
  color: #5a665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.repo-detail-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #d8ded6;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-summary span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d8ded6;
  color: #2d3b34;
  font-size: 12px;
  font-weight: 750;
}

.repo-actions-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

.repo-action-buttons,
.repo-action-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.repo-action-form label {
  display: grid;
  gap: 7px;
  flex: 1 1 260px;
}

.repo-action-form label span {
  color: #5a665f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.detail-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

.detail-block h2 {
  margin-bottom: 12px;
}

.detail-block p {
  color: #5a665f;
  font-size: 13px;
  line-height: 1.45;
}

.pending-block {
  margin-top: 12px;
}

.file-list,
.compact-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.file-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.file-row span {
  padding: 3px 6px;
  border-radius: 6px;
  background: #edf1ee;
  color: #2d3b34;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.file-row code,
.compact-list code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #4f5d55;
  font-size: 12px;
}

.compact-list > div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #edf1ee;
  border-radius: 8px;
  background: #fbfcfb;
}

.compact-list strong {
  color: #18201d;
  font-size: 13px;
}

.compact-list span {
  color: #5a665f;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .checks {
    grid-template-columns: 1fr;
  }

  .profile-toolbar,
  .profile-summary,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .project-actions,
  .project-actions:has(label + label),
  .setup-repo-grid,
  .manual-profile {
    grid-template-columns: 1fr;
  }

  .setup-repo-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
  }

  .profile-actions {
    justify-content: stretch;
  }

  .profile-actions button {
    flex: 1 1 160px;
  }
}

:root {
  --rho-bg: #f8fafc;
  --rho-fg: #18201d;
  --rho-muted: #65736b;
  --rho-card: #ffffff;
  --rho-panel: #f1f5f9;
  --rho-panel-strong: #e9f1ed;
  --rho-border: #d5ddd8;
  --rho-border-strong: #9fb0a8;
  --rho-accent: #10b981;
  --rho-accent-strong: #059669;
  --rho-teal: #0d9488;
  --rho-warn: #d97706;
  --rho-danger: #b13b3b;
  --rho-shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --rho-bg: #08110d;
    --rho-fg: #e5ece8;
    --rho-muted: #94a3b8;
    --rho-card: #111827;
    --rho-panel: #1f2937;
    --rho-panel-strong: #1a1f2e;
    --rho-border: #334155;
    --rho-border-strong: #475569;
    --rho-accent: #34d399;
    --rho-accent-strong: #10b981;
    --rho-teal: #2dd4bf;
    --rho-warn: #f59e0b;
    --rho-danger: #f87171;
    --rho-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

/* Manual theme override (set on <html data-theme>); wins over the OS media query. */
:root[data-theme="light"] {
  --rho-bg: #f8fafc;
  --rho-fg: #18201d;
  --rho-muted: #65736b;
  --rho-card: #ffffff;
  --rho-panel: #f1f5f9;
  --rho-panel-strong: #e9f1ed;
  --rho-border: #d5ddd8;
  --rho-border-strong: #9fb0a8;
  --rho-accent: #10b981;
  --rho-accent-strong: #059669;
  --rho-teal: #0d9488;
  --rho-warn: #d97706;
  --rho-danger: #b13b3b;
  --rho-shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --rho-bg: #08110d;
  --rho-fg: #e5ece8;
  --rho-muted: #94a3b8;
  --rho-card: #111827;
  --rho-panel: #1f2937;
  --rho-panel-strong: #1a1f2e;
  --rho-border: #334155;
  --rho-border-strong: #475569;
  --rho-accent: #34d399;
  --rho-accent-strong: #10b981;
  --rho-teal: #2dd4bf;
  --rho-warn: #f59e0b;
  --rho-danger: #f87171;
  --rho-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

[data-theme="light"] .desktop-wallpaper {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 28%, #ccfbf1 54%, #dbeafe 100%);
}

[data-theme="dark"] .desktop-wallpaper {
  background: linear-gradient(135deg, #0d3320 0%, #14532d 28%, #134e4a 55%, #1e3a5f 100%);
}

body {
  background: var(--rho-bg);
  color: var(--rho-fg);
}

.desktop-wallpaper {
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 28%, #ccfbf1 54%, #dbeafe 100%);
}

.crash-screen {
  max-width: 520px;
  margin: 12vh auto 0;
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--rho-border);
  border-radius: 14px;
  background: var(--rho-card);
  box-shadow: var(--rho-shadow);
}

.crash-screen h1 {
  font-size: 20px;
}

.crash-screen p {
  color: var(--rho-muted);
  font-size: 14px;
}

.crash-screen pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  background: #111815;
  color: #f3b9b9;
  font-size: 12px;
  white-space: pre-wrap;
}

.crash-actions {
  display: flex;
  gap: 10px;
}

@media (prefers-color-scheme: dark) {
  .desktop-wallpaper {
    background: linear-gradient(135deg, #0d3320 0%, #14532d 28%, #134e4a 55%, #1e3a5f 100%);
  }
}

.desktop-window {
  position: relative;
  width: 100%;
  height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--rho-card);
  box-shadow: none;
}

.desktop-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 10px;
  overflow: hidden;
  border-right: 1px solid var(--rho-border);
  background: var(--rho-panel);
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border-radius: 9px;
  color: var(--rho-accent);
  background: color-mix(in srgb, var(--rho-accent) 14%, transparent);
}

.sidebar-icon {
  width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 7px;
  border-color: transparent;
  background: transparent;
  color: var(--rho-muted);
  font-size: 12px;
}

.sidebar-icon[data-active="true"] {
  background: color-mix(in srgb, var(--rho-accent) 18%, transparent);
  color: var(--rho-accent);
}

.sidebar-icon:disabled {
  cursor: default;
  opacity: 0.48;
}

.sidebar-icon svg {
  width: 17px;
  height: 17px;
}

.sidebar-icon[data-state="fail"] {
  color: var(--rho-danger);
}

.sidebar-icon[data-state="warn"] {
  color: var(--rho-warn);
}

.sidebar-bottom {
  margin-top: auto;
}

.onboarding-workspace {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--rho-card);
}

.window-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--rho-border);
  background: var(--rho-panel);
}

.window-titlebar h1 {
  font-size: 18px;
}

.window-titlebar p {
  margin-top: 6px;
  color: var(--rho-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.titlebar-actions {
  display: flex;
  gap: 8px;
}

.onboarding-dashboard {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px;
  overflow: auto;
}

.dependency-screen {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
}

.dependency-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--rho-border);
  border-radius: 12px;
  background: var(--rho-panel-strong);
}

.dependency-hero h2 {
  font-size: 18px;
}

.dependency-hero p {
  margin-top: 7px;
  color: var(--rho-muted);
  font-size: 13px;
  line-height: 1.45;
}

.dependency-hero > span,
.dependency-detail-heading > span {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 5px 9px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--rho-accent) 12%, transparent);
  color: var(--rho-accent);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.dependency-hero > span[data-state="warn"],
.dependency-detail-heading > span[data-state="warn"] {
  background: color-mix(in srgb, var(--rho-warn) 14%, transparent);
  color: var(--rho-warn);
}

.dependency-hero > span[data-state="fail"],
.dependency-detail-heading > span[data-state="fail"] {
  background: color-mix(in srgb, var(--rho-danger) 14%, transparent);
  color: var(--rho-danger);
}

.dependency-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.dependency-list,
.dependency-detail {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--rho-border);
  border-radius: 12px;
  background: var(--rho-card);
}

.dependency-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.dependency-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.dependency-item:hover {
  background: var(--rho-panel-strong);
  border-color: var(--rho-border);
}

.dependency-item[data-active="true"] {
  background: var(--rho-panel-strong);
  border-color: color-mix(in srgb, var(--rho-accent) 45%, var(--rho-border));
}

.dependency-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--rho-muted);
}

.dependency-item[data-state="pass"] .dependency-dot {
  background: var(--rho-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rho-accent) 22%, transparent);
}

.dependency-item[data-state="warn"] .dependency-dot {
  background: var(--rho-warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rho-warn) 22%, transparent);
}

.dependency-item[data-state="fail"] .dependency-dot {
  background: var(--rho-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rho-danger) 22%, transparent);
}

.dependency-item-name {
  color: var(--rho-fg);
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dependency-item-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rho-muted);
}

.dependency-item[data-state="pass"] .dependency-item-status {
  color: var(--rho-accent);
}

.dependency-item[data-state="warn"] .dependency-item-status {
  color: var(--rho-warn);
}

.dependency-item[data-state="fail"] .dependency-item-status {
  color: var(--rho-danger);
}

.dependency-link {
  color: var(--rho-accent-strong);
  text-decoration: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.dependency-link:hover {
  text-decoration: underline;
}

.dependency-detail {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px;
}

.dependency-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dependency-detail-heading p {
  margin-top: 8px;
  color: var(--rho-muted);
  font-size: 13px;
  line-height: 1.45;
}

.dependency-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.dependency-facts div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--rho-border);
  border-radius: 8px;
  background: var(--rho-panel-strong);
}

.dependency-facts dt {
  color: var(--rho-muted);
  font-size: 12px;
  font-weight: 750;
}

.dependency-facts dd {
  margin: 0;
  color: var(--rho-fg);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.install-command-list {
  display: grid;
  gap: 10px;
}

.install-command-list code {
  display: block;
  padding: 11px 12px;
  border: 1px solid var(--rho-border);
  border-radius: 8px;
  background: #111815;
  color: #e5ece8;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.install-command-list p {
  color: var(--rho-muted);
  font-size: 13px;
}

.readiness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.readiness-strip > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--rho-border);
  border-radius: 10px;
  background: var(--rho-panel-strong);
}

.readiness-strip strong {
  color: var(--rho-fg);
  font-size: 13px;
}

.readiness-strip span {
  color: var(--rho-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.onboarding-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.onboarding-stage {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--rho-border);
  border-radius: 12px;
  background: var(--rho-card);
}

.stage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.stage-heading p {
  margin-top: 7px;
  color: var(--rho-muted);
  font-size: 13px;
}

.stage-heading > span,
.setup-card > span,
.account-main > span {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--rho-accent) 12%, transparent);
  color: var(--rho-accent);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.stage-heading > span[data-state="warn"] {
  background: color-mix(in srgb, var(--rho-warn) 14%, transparent);
  color: var(--rho-warn);
}

.check-grid,
.account-grid,
.profile-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.setup-card {
  min-height: 118px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--rho-border);
  border-radius: 10px;
  background: var(--rho-panel-strong);
}

.setup-card[data-state="pass"] {
  border-color: color-mix(in srgb, var(--rho-accent) 45%, var(--rho-border));
}

.setup-card[data-state="warn"] {
  border-color: color-mix(in srgb, var(--rho-warn) 45%, var(--rho-border));
}

.setup-card[data-state="fail"] {
  border-color: color-mix(in srgb, var(--rho-danger) 45%, var(--rho-border));
}

.setup-card h2 {
  color: var(--rho-fg);
}

.setup-card p,
.setup-card code {
  color: var(--rho-muted);
}

.setup-card > span {
  background: var(--rho-card);
}

.setup-card[data-state="warn"] > span {
  color: var(--rho-warn);
}

.setup-card[data-state="fail"] > span {
  color: var(--rho-danger);
}

.compact-setup-card {
  min-height: 92px;
}

.accounts-screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
}

.accounts-section-label {
  color: var(--rho-muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.accounts-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--rho-border);
}

.accounts-empty-available {
  display: grid;
  gap: 8px;
}

.accounts-empty-available p {
  margin: 0;
  color: var(--rho-muted);
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-profile {
  border: 1px solid var(--rho-border);
  overflow: hidden;
}

.sidebar-profile .avatar {
  width: 26px;
  height: 26px;
}

.account-pick-list {
  display: grid;
  gap: 10px;
}

.account-pick {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--rho-border);
  border-radius: 12px;
  background: var(--rho-card);
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.account-pick:hover {
  border-color: var(--rho-border-strong);
  background: var(--rho-panel-strong);
}

.account-pick-static {
  cursor: default;
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.account-pick-static:hover {
  border-color: var(--rho-border);
  background: var(--rho-card);
}

.account-pick-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rho-accent) 18%, transparent);
  color: var(--rho-accent);
  font-size: 16px;
  font-weight: 750;
}

.avatar {
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  background: var(--rho-panel-strong);
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--rho-accent) 18%, transparent);
  color: var(--rho-accent);
  font-weight: 750;
}

.settings-page {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 58px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: var(--rho-card);
}

@media (max-width: 860px) {
  .settings-page {
    left: 0;
  }
}

.settings-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 17, 13, 0.55);
  backdrop-filter: blur(2px);
}

.modal-panel {
  width: min(520px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rho-border);
  border-radius: 14px;
  background: var(--rho-card);
  box-shadow: var(--rho-shadow);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rho-border);
}

.modal-head h2 {
  font-size: 16px;
}

.switcher-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  overflow: auto;
}

.switcher-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--rho-border);
  border-radius: 11px;
  background: var(--rho-card);
}

.switcher-row[data-current="true"] {
  border-color: color-mix(in srgb, var(--rho-accent) 45%, var(--rho-border));
  background: var(--rho-panel-strong);
}

.switcher-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.switcher-info strong {
  color: var(--rho-fg);
  font-size: 14px;
}

.switcher-info span {
  color: var(--rho-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switcher-current {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: color-mix(in srgb, var(--rho-accent) 16%, transparent);
  color: var(--rho-accent);
}

.switcher-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--rho-border);
}

.account-pick-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-pick-info strong {
  color: var(--rho-fg);
  font-size: 15px;
  font-weight: 700;
}

.account-pick-info > span {
  color: var(--rho-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-pick-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: color-mix(in srgb, var(--rho-warn) 16%, transparent);
  color: var(--rho-warn);
}

.account-pick[data-state="ready"] .account-pick-status,
.account-pick-status[data-state="ready"] {
  background: color-mix(in srgb, var(--rho-accent) 16%, transparent);
  color: var(--rho-accent);
}

.account-pick-chevron {
  color: var(--rho-muted);
  font-size: 20px;
  line-height: 1;
}

.account-add {
  justify-self: start;
  margin-top: 4px;
  border-style: dashed;
  color: var(--rho-muted);
  background: transparent;
}

.empty-actions {
  margin-top: 14px;
}

.profile-prepare {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--rho-border);
  border-radius: 12px;
  background: var(--rho-card);
}

.profile-prepare-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.profile-prepare-id {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-prepare-id strong {
  color: var(--rho-fg);
  font-size: 16px;
  font-weight: 720;
}

.profile-prepare-id span {
  color: var(--rho-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.prepare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--rho-accent) 40%, var(--rho-border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--rho-accent) 8%, transparent);
}

.guide-callout p {
  color: var(--rho-fg);
  font-size: 13px;
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.guide-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--rho-border);
  border-radius: 12px;
  background: var(--rho-card);
}

.guide-step-num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--rho-panel-strong);
  color: var(--rho-muted);
  font-size: 13px;
  font-weight: 750;
}

.guide-step[data-ok="true"] .guide-step-num {
  background: color-mix(in srgb, var(--rho-accent) 18%, transparent);
  color: var(--rho-accent);
}

.guide-step-body {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.guide-step-body h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--rho-fg);
}

.guide-step-body p {
  margin: 0;
  color: var(--rho-muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-muted {
  font-style: italic;
}

.guide-ok-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: color-mix(in srgb, var(--rho-accent) 16%, transparent);
  color: var(--rho-accent);
}

.guide-missing-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: color-mix(in srgb, var(--rho-danger) 18%, transparent);
  color: var(--rho-danger);
}

.guide-step[data-missing="true"] {
  border-color: color-mix(in srgb, var(--rho-danger) 45%, var(--rho-border));
}

.guide-step[data-missing="true"] .guide-step-num {
  background: color-mix(in srgb, var(--rho-danger) 18%, transparent);
  color: var(--rho-danger);
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--rho-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--rho-panel-strong);
}

.copy-field code {
  padding: 9px 11px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--rho-fg);
  font-size: 12px;
  line-height: 1.6;
}

.copy-btn {
  min-height: auto;
  border: 0;
  border-left: 1px solid var(--rho-border);
  border-radius: 0;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rho-muted);
  background: var(--rho-card);
}

.copy-btn:hover {
  color: var(--rho-accent);
}

.guide-folder {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--rho-fg);
  font-size: 12px;
}

.guide-folder svg {
  flex: 0 0 auto;
  color: var(--rho-muted);
}

.guide-folder span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.verify-button {
  position: relative;
  min-width: 130px;
}

.verify-button[data-loading="true"] {
  cursor: progress;
  opacity: 1;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  animation: rho-spin 0.6s linear infinite;
}

@keyframes rho-spin {
  to {
    transform: rotate(360deg);
  }
}

.account-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-check {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--rho-border);
  border-radius: 9px;
  background: var(--rho-panel-strong);
}

.account-check-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-check-action {
  align-self: center;
  height: 30px;
  min-height: 30px;
  min-width: 0;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--rho-muted);
}

.account-check-action.text {
  font-size: 12px;
  font-weight: 700;
  color: var(--rho-accent-strong);
}

.account-check-action:hover {
  color: var(--rho-fg);
  border-color: var(--rho-border-strong);
}

.account-check-dot {
  margin-top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--rho-warn);
}

.account-check[data-ok="true"] .account-check-dot {
  background: var(--rho-accent);
}

.account-check strong {
  display: block;
  color: var(--rho-fg);
  font-size: 13px;
}

.account-check span {
  color: var(--rho-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.stage-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.stage-actions button {
  height: 42px;
  min-width: 130px;
}

.split-actions {
  flex-wrap: wrap;
}

.primary-action {
  border-color: var(--rho-accent-strong);
  background: var(--rho-accent-strong);
  color: #ffffff;
}

.primary-action:hover {
  border-color: var(--rho-accent);
  background: var(--rho-accent);
}

.app-shell {
  background: var(--rho-bg);
  color: var(--rho-fg);
}

button,
input,
textarea,
select {
  border-color: var(--rho-border);
}

button {
  background: var(--rho-card);
  color: var(--rho-fg);
}

button:hover {
  border-color: var(--rho-border-strong);
}

input,
textarea,
select {
  background: var(--rho-card);
  color: var(--rho-fg);
}

@media (max-width: 860px) {
  .desktop-window {
    grid-template-columns: 1fr;
  }

  .desktop-sidebar {
    display: none;
  }

  .readiness-strip,
  .dependency-panel,
  .onboarding-layout,
  .check-grid,
  .account-grid,
  .profile-setup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .desktop-wallpaper {
    padding: 0;
  }

  .desktop-window {
    height: 100vh;
    border-radius: 0;
  }

  .window-titlebar,
  .dependency-hero,
  .dependency-detail-heading,
  .stage-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .titlebar-actions,
  .stage-actions {
    justify-content: stretch;
  }

  .titlebar-actions button,
  .stage-actions button {
    flex: 1 1 auto;
  }
}
