:root {
  --bg: #12161b;
  --bg-deep: #0d1116;
  --bg-elevated: #1a2128;
  --bg-panel: rgba(24, 31, 38, 0.82);
  --bg-panel-strong: rgba(29, 37, 45, 0.96);
  --bg-card: linear-gradient(180deg, rgba(36, 44, 53, 0.9), rgba(24, 31, 38, 0.96));
  --bg-card-soft: linear-gradient(180deg, rgba(33, 41, 50, 0.76), rgba(22, 28, 35, 0.92));
  --border: rgba(189, 198, 209, 0.18);
  --border-strong: rgba(221, 231, 244, 0.24);
  --text: #f4f7fb;
  --text-muted: #aab6c5;
  --text-subtle: #7d8897;
  --accent: #2f81ff;
  --accent-strong: #5c9cff;
  --accent-soft: rgba(47, 129, 255, 0.16);
  --success: #41c084;
  --warning: #e0a341;
  --danger: #df5f73;
  --neutral: #7f8b9c;
  --surface-1: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.052);
  --surface-3: rgba(255, 255, 255, 0.07);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 30px 60px rgba(4, 7, 12, 0.32);
  --shadow-soft: 0 18px 40px rgba(4, 7, 12, 0.22);
  --radius: 22px;
  --card-radius: 20px;
  --transition: 200ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color-scheme: dark;
  background:
    radial-gradient(circle at top left, rgba(47, 129, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 20%),
    linear-gradient(180deg, #181d23 0%, #101419 54%, #0c1014 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 88%);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible,
.organization-row:focus-visible,
.favorite-row:focus-visible,
.developer-link:focus-visible,
.journey-action:focus-visible {
  outline: 2px solid rgba(104, 168, 255, 0.92);
  outline-offset: 3px;
}

.citadel-app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(620px, 1fr) minmax(280px, 320px);
  gap: 22px;
  min-height: 100vh;
  max-width: 1760px;
  margin: 0 auto;
  padding: 18px;
  align-items: start;
}

.citadel-sidebar,
.citadel-detail-panel,
.citadel-workspace,
.organization-stage,
.workspace-card,
.summary-card,
.developer-dock,
.wizard-shell {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  min-width: 0;
}

.citadel-sidebar,
.citadel-detail-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(21, 27, 34, 0.98), rgba(13, 18, 24, 0.98));
  border-radius: 28px;
  min-height: calc(100vh - 36px);
}

.citadel-sidebar {
  padding: 20px;
  gap: 18px;
}

.sidebar-top {
  display: grid;
  gap: 16px;
}

.brand-emblem {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.brand-logo-shell,
.hero-logo-shell {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.brand-logo,
.hero-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-logo-fallback,
.hero-logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.05;
  padding: 6px;
}

.brand-logo-fallback {
  border-radius: 18px;
  font-size: 0.58rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(18, 23, 29, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-logo-fallback {
  font-size: 0.9rem;
}

.sidebar-title,
.workspace-hero h2,
.stage-header h3,
.detail-header h3,
.wizard-header h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.eyebrow,
.summary-label,
.detail-label,
.search-label,
.accordion-count,
.section-heading,
.card-heading .eyebrow {
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.73rem;
  font-weight: 700;
}

.search-shell {
  display: grid;
  gap: 9px;
}

.search-hint {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sidebar-intro {
  margin: -4px 2px 0;
  color: var(--text-subtle);
  font-size: 0.84rem;
  line-height: 1.5;
}

.search-shell input {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-radius: 16px;
  padding: 15px 16px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.search-shell input::placeholder {
  color: rgba(181, 194, 208, 0.62);
}

.search-shell input:hover,
.search-shell input:focus-visible {
  border-color: rgba(92, 156, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(47, 129, 255, 0.08);
}

.primary-cta,
.ghost-action,
.capability-action,
.stage-action,
.developer-link {
  border-radius: 16px;
  border: 1px solid transparent;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.primary-cta {
  background: linear-gradient(135deg, #2f81ff, #1f63d8);
  color: white;
  font-weight: 700;
  padding: 15px 18px;
  box-shadow: 0 14px 30px rgba(31, 99, 216, 0.22);
}

.primary-cta:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 34px rgba(31, 99, 216, 0.26);
}

.primary-cta:hover,
.stage-action:hover,
.capability-action:hover,
.developer-link:hover,
.ghost-action:hover,
.organization-row:hover,
.favorite-row:hover,
.stage-tab:hover,
.sidebar-accordion summary:hover {
  transform: translateY(-1px);
}

.sidebar-scroll {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 18px;
  padding-right: 4px;
}

.sidebar-section {
  display: grid;
  gap: 14px;
}

.sidebar-accordion,
.letter-accordion {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.sidebar-accordion summary,
.letter-accordion summary {
  list-style: none;
  padding: 14px 16px;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
}

.sidebar-accordion summary::-webkit-details-marker,
.letter-accordion summary::-webkit-details-marker {
  display: none;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}

.section-heading.compact {
  padding-bottom: 8px;
}

.favorites-list,
.letter-list {
  display: grid;
}

.row-copy {
  display: grid;
  gap: 7px;
}

.favorite-row,
.organization-row {
  width: 100%;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  color: inherit;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 15px 16px;
  text-align: left;
  align-items: center;
  transition: background var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.favorite-row:first-child,
.organization-row:first-child {
  border-top: 0;
}

.organization-row.is-selected,
.favorite-row.is-selected {
  background:
    linear-gradient(90deg, rgba(47, 129, 255, 0.18), rgba(47, 129, 255, 0.06) 72%, transparent 100%);
  box-shadow: inset 3px 0 0 rgba(92, 156, 255, 0.9), inset 0 0 0 1px rgba(92, 156, 255, 0.08);
}

.organization-row:hover,
.favorite-row:hover {
  background: rgba(255, 255, 255, 0.042);
}

.row-mark,
.organization-mark,
.detail-logo {
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(18, 23, 29, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: white;
  font-weight: 700;
}

.row-mark {
  width: 34px;
  height: 34px;
  font-size: 0.76rem;
}

.organization-mark,
.detail-logo {
  width: 68px;
  height: 68px;
  font-size: 1.15rem;
}

.row-title,
.row-meta,
.card-subtitle,
.detail-caption,
.stage-summary {
  margin: 0;
}

.row-title {
  font-weight: 600;
  font-size: 1rem;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.row-meta,
.card-subtitle,
.detail-caption,
.stage-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.status-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.02);
}

.status-dot.healthy,
.status-pill.healthy {
  background: rgba(65, 192, 132, 0.18);
  color: #8ce4b5;
  border-color: rgba(65, 192, 132, 0.28);
}

.status-dot.healthy::before,
.status-dot.needs_setup::before,
.status-dot.needs_attention::before,
.status-dot.inactive::before {
  content: "";
}

.status-dot.healthy {
  background: var(--success);
}

.status-dot.needs_setup,
.status-pill.needs_setup {
  background: rgba(224, 163, 65, 0.18);
  color: #f0c679;
  border-color: rgba(224, 163, 65, 0.28);
}

.status-dot.needs_setup {
  background: var(--warning);
}

.status-dot.needs_attention,
.status-pill.needs_attention {
  background: rgba(223, 95, 115, 0.2);
  color: #f29aa8;
  border-color: rgba(223, 95, 115, 0.28);
}

.status-dot.needs_attention {
  background: var(--danger);
}

.status-dot.inactive,
.status-pill.inactive,
.status-pill.neutral {
  background: rgba(127, 139, 156, 0.18);
  color: #bfcae0;
  border-color: rgba(127, 139, 156, 0.28);
}

.status-dot.inactive {
  background: var(--neutral);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill.compact {
  padding: 7px 10px;
  font-size: 0.72rem;
}

.developer-dock {
  background: linear-gradient(180deg, rgba(18, 24, 30, 0.7), rgba(13, 18, 24, 0.82));
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 34px rgba(4, 7, 12, 0.16);
}

.developer-dock-header {
  display: grid;
  gap: 8px;
}

.developer-note {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.8rem;
  line-height: 1.45;
}

.developer-links {
  display: grid;
  gap: 12px;
}

.developer-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--text-muted);
  padding: 13px 14px;
  text-decoration: none;
}

.developer-link span:last-child {
  color: var(--accent);
  font-size: 0.82rem;
}

.citadel-workspace {
  display: grid;
  gap: 26px;
  align-content: start;
  padding: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(47, 129, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(20, 26, 33, 0.98), rgba(12, 17, 22, 0.98));
}

.workspace-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 24px;
  padding: 26px 18px 22px;
}

.hero-emblem {
  width: clamp(210px, 17vw, 286px);
  height: clamp(210px, 17vw, 286px);
  padding: clamp(20px, 2vw, 30px);
  display: grid;
  place-items: center;
  border-radius: 44px;
  background:
    radial-gradient(circle at 50% 38%, rgba(47, 129, 255, 0.18), transparent 54%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.025)),
    rgba(21, 27, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.32),
    0 0 70px rgba(47, 129, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 920px;
}

.workspace-hero h2 {
  font-size: clamp(3.75rem, 5.8vw, 5.8rem);
  line-height: 0.9;
}

.hero-heading {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  font-weight: 600;
}

.hero-subtitle {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.55;
}

.hero-model {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.summary-card {
  background: linear-gradient(180deg, rgba(31, 38, 46, 0.92), rgba(21, 27, 34, 0.94));
  border-radius: var(--card-radius);
  padding: 22px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(255, 255, 255, 0.09);
}

.summary-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2.05rem;
  font-family: "Sora", sans-serif;
  line-height: 1;
}

.summary-card.attention {
  border-color: rgba(224, 163, 65, 0.22);
}

.organization-stage {
  background: linear-gradient(180deg, rgba(18, 23, 29, 0.7), rgba(14, 19, 25, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow: none;
  border-radius: 28px;
  padding: 28px;
  display: grid;
  gap: 24px;
}

.stage-header,
.card-heading,
.wizard-header,
.wizard-footer,
.spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.stage-copy {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.stage-actions-group {
  display: grid;
  gap: 10px;
  min-width: min(100%, 520px);
}

.stage-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.stage-action,
.capability-action,
.ghost-action {
  min-height: 44px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 600;
}

.stage-action.primary,
.capability-action.primary {
  background: linear-gradient(135deg, rgba(47, 129, 255, 0.32), rgba(47, 129, 255, 0.16));
  border-color: rgba(92, 156, 255, 0.42);
  box-shadow: 0 10px 24px rgba(31, 99, 216, 0.14);
}

.stage-action.secondary,
.capability-action.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.stage-action.quiet,
.capability-action.quiet,
.ghost-action {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding-left: 2px;
  padding-right: 2px;
  box-shadow: none;
}

.stage-action.quiet:hover,
.capability-action.quiet:hover,
.ghost-action:hover {
  color: var(--text);
  background: transparent;
}

.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 2px;
}

.stage-tab {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(255, 255, 255, 0.028);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 600;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.stage-tab.is-active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: rgba(94, 154, 255, 0.28);
}

.stage-panel {
  display: none;
}

.stage-panel.is-active {
  display: block;
}

.panel-grid {
  display: grid;
  gap: 18px;
}

.panel-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  padding: 22px;
  display: grid;
  gap: 18px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.card-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.spotlight-card {
  gap: 20px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.signal-item,
.highlight-card,
.capability-card,
.capability-preview-card,
.detail-list-item,
.activity-item,
.branding-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.signal-item,
.highlight-card {
  padding: 16px;
}

.signal-item strong,
.highlight-card strong {
  display: block;
  font-size: 1.5rem;
  font-family: "Sora", sans-serif;
  margin-top: 8px;
}

.activity-list,
.detail-list {
  display: grid;
  gap: 12px;
}

.journey-list,
.brand-quickfacts {
  display: grid;
  gap: 12px;
}

.activity-list.compact,
.detail-list.compact {
  gap: 10px;
}

.activity-item,
.detail-list-item {
  padding: 15px;
}

.detail-list-item {
  display: grid;
  gap: 4px;
}

.detail-list-item strong {
  font-size: 0.94rem;
}

.activity-item time,
.detail-list-item .meta {
  display: block;
  color: var(--text-subtle);
  font-size: 0.84rem;
  margin-top: 4px;
  line-height: 1.45;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.journey-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
}

.journey-step {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(47, 129, 255, 0.14);
  border: 1px solid rgba(92, 156, 255, 0.2);
  color: #8dbbff;
  font-family: "Sora", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.journey-copy {
  display: grid;
  gap: 4px;
}

.journey-copy strong {
  font-size: 0.98rem;
}

.journey-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.journey-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(92, 156, 255, 0.24);
  background: rgba(47, 129, 255, 0.12);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

button.journey-action {
  font: inherit;
  cursor: pointer;
}

.journey-action:hover {
  transform: translateY(-1px);
  border-color: rgba(92, 156, 255, 0.36);
  background: rgba(47, 129, 255, 0.16);
}

.capability-card {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.capability-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.capability-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
}

.capability-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 8px 0 0;
  line-height: 1.5;
}

.capability-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.capability-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.capability-fact {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.capability-fact-label {
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
}

.capability-fact-value {
  font-size: 0.92rem;
  line-height: 1.35;
}

.capability-badges,
.capability-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.overview-capability-preview {
  display: grid;
  gap: 14px;
}

.capability-preview-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.capability-preview-card .capability-meta {
  margin-top: 6px;
  max-width: 30rem;
}

.branding-preview {
  display: grid;
  gap: 16px;
}

.branding-chip {
  padding: 16px;
}

.brand-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.swatch {
  display: grid;
  gap: 8px;
}

.swatch-color {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.swatch span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.citadel-detail-panel {
  padding: 22px;
  gap: 20px;
  background:
    radial-gradient(circle at top left, rgba(47, 129, 255, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(18, 23, 29, 0.98), rgba(12, 17, 22, 0.98));
}

.detail-header {
  display: grid;
  gap: 10px;
}

.detail-stack {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding-right: 4px;
}

.detail-card {
  background: linear-gradient(180deg, rgba(33, 40, 48, 0.82), rgba(22, 28, 35, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--card-radius);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.wizard-dialog {
  width: min(920px, calc(100vw - 32px));
  border: 0;
  background: transparent;
  padding: 0;
}

.wizard-dialog::backdrop {
  background: rgba(6, 8, 12, 0.74);
  backdrop-filter: blur(12px);
}

.wizard-shell {
  background: linear-gradient(180deg, rgba(26, 32, 39, 0.98), rgba(18, 23, 29, 0.98));
  border-radius: 28px;
  padding: 24px;
  color: var(--text);
  display: grid;
  gap: 20px;
}

.wizard-progress,
.wizard-review-grid,
.wizard-review-summary,
.wizard-form-grid,
.wizard-choice-grid,
.wizard-module-grid,
.wizard-user-list,
.wizard-launch-grid {
  display: grid;
}

.wizard-progress {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.wizard-progress-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.wizard-progress-item.is-active {
  border-color: rgba(92, 156, 255, 0.32);
  background: rgba(47, 129, 255, 0.09);
}

.wizard-progress-item.is-complete {
  border-color: rgba(65, 192, 132, 0.18);
  background: rgba(65, 192, 132, 0.08);
}

.wizard-progress-index {
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.wizard-progress-label {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}

.wizard-content {
  min-height: 480px;
}

.wizard-screen {
  display: grid;
  gap: 18px;
}

.wizard-section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.wizard-section-header.compact {
  align-items: start;
}

.wizard-section-header h4,
.wizard-welcome-copy h4,
.wizard-launch-copy h4,
.wizard-review-card h4,
.wizard-brand-preview h4,
.wizard-inline-note strong {
  margin: 0;
  font-family: "Sora", sans-serif;
}

.wizard-helper {
  margin: 0;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.wizard-welcome {
  align-content: start;
}

.wizard-welcome-mark,
.wizard-launch-mark {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02)),
    rgba(21, 27, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.wizard-welcome-copy,
.wizard-launch-copy {
  display: grid;
  gap: 8px;
}

.wizard-welcome-copy p,
.wizard-launch-copy p,
.wizard-review-card p,
.wizard-inline-note span,
.wizard-launch-note span,
.wizard-user-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.wizard-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.wizard-promise {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.wizard-promise strong {
  font-family: "Sora", sans-serif;
  font-size: 0.96rem;
}

.wizard-promise span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.wizard-form-grid.users {
  align-items: end;
}

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

.wizard-field-wide {
  grid-column: 1 / -1;
}

.wizard-field-label {
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.wizard-field input,
.wizard-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 12px 14px;
}

.wizard-field input[type="color"] {
  padding: 6px;
}

.wizard-field-note {
  color: var(--text-subtle);
  font-size: 0.82rem;
}

.wizard-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wizard-choice-card,
.wizard-toggle,
.wizard-module-card,
.wizard-review-card,
.wizard-inline-note,
.wizard-brand-preview,
.wizard-user-card,
.wizard-launch-note {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.wizard-choice-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: left;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.wizard-choice-card strong,
.wizard-module-card h5,
.wizard-user-card strong {
  font-family: "Sora", sans-serif;
}

.wizard-choice-card span,
.wizard-module-card p,
.wizard-brand-preview .card-subtitle {
  color: var(--text-muted);
  line-height: 1.5;
}

.wizard-choice-card.is-selected,
.wizard-toggle.is-selected,
.wizard-module-card.is-selected {
  border-color: rgba(92, 156, 255, 0.32);
  background: rgba(47, 129, 255, 0.09);
}

.wizard-choice-card:hover,
.wizard-toggle:hover,
.wizard-module-card:hover {
  transform: translateY(-1px);
}

.wizard-inline-note {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.wizard-toggle-row,
.wizard-inline-actions,
.wizard-footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.wizard-toggle {
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 600;
}

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

.wizard-module-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.wizard-module-top,
.wizard-module-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.wizard-module-footer {
  align-items: center;
}

.wizard-module-meta {
  color: var(--text-subtle);
  font-size: 0.84rem;
  line-height: 1.5;
}

.wizard-empty-state {
  color: var(--text-muted);
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  line-height: 1.55;
}

.wizard-brand-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  align-items: center;
}

.wizard-brand-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: white;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.wizard-user-list {
  gap: 12px;
}

.wizard-user-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

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

.wizard-review-card,
.wizard-launch-note {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.wizard-review-summary,
.wizard-launch-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard-launch-screen {
  align-content: start;
}

.wizard-launch-grid {
  margin-top: 4px;
}

.wizard-inline-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.dialog-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
}

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

.wizard-step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 20px;
  padding: 16px;
}

.wizard-step span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(47, 129, 255, 0.16);
  color: #7eb6ff;
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

.wizard-step h4 {
  margin: 0 0 6px;
}

.wizard-step p {
  margin: 0;
  color: var(--text-muted);
}

.wizard-footer {
  justify-content: space-between;
}

.wizard-note {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 38rem;
  flex: 1;
}

.empty-state {
  color: var(--text-muted);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.014));
  line-height: 1.5;
  min-height: 72px;
  display: grid;
  align-content: center;
}

.workspace-card:hover,
.summary-card:hover,
.detail-card:hover,
.capability-card:hover,
.capability-preview-card:hover,
.signal-item:hover,
.highlight-card:hover,
.activity-item:hover,
.detail-list-item:hover,
.branding-chip:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(4, 7, 12, 0.08);
}

@media (max-width: 1500px) {
  .citadel-app-shell {
    grid-template-columns: minmax(252px, 296px) minmax(520px, 1fr) minmax(252px, 296px);
    gap: 18px;
  }
}

@media (max-width: 1320px) {
  .stage-header {
    flex-direction: column;
  }

  .stage-actions-group {
    min-width: 0;
    width: 100%;
  }

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

@media (max-width: 1100px) {
  .citadel-app-shell {
    grid-template-columns: minmax(232px, 272px) minmax(0, 1fr) minmax(232px, 272px);
    padding: 16px;
    gap: 16px;
  }

  .organization-stage {
    padding: 22px;
  }

  .workspace-hero {
    gap: 20px;
  }

  .panel-grid.two-column,
  .panel-grid.three-column {
    grid-template-columns: 1fr;
  }

  .wizard-progress {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .journey-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .journey-action {
    grid-column: 2;
    justify-self: start;
  }

  .stage-actions {
    gap: 10px;
  }

  .stage-action,
  .capability-action {
    padding: 10px 13px;
  }

  .capability-facts {
    grid-template-columns: 1fr;
  }

  .hero-emblem {
    width: 178px;
    height: 178px;
  }

  .workspace-hero h2 {
    font-size: clamp(3rem, 5vw, 4.4rem);
  }
}

@media (max-width: 900px) {
  .citadel-app-shell {
    grid-template-columns: 1fr;
  }

  .citadel-sidebar,
  .citadel-detail-panel {
    min-height: auto;
  }

  .panel-grid.two-column,
  .panel-grid.three-column,
  .wizard-steps,
  .wizard-intro {
    grid-template-columns: 1fr;
  }

  .wizard-form-grid,
  .wizard-choice-grid,
  .wizard-module-grid,
  .wizard-review-grid,
  .wizard-review-summary,
  .wizard-launch-grid,
  .wizard-progress {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .citadel-app-shell {
    padding: 12px;
    gap: 14px;
  }

  .citadel-sidebar,
  .citadel-detail-panel,
  .organization-stage,
  .wizard-shell {
    border-radius: 22px;
  }

  .workspace-hero,
  .stage-header,
  .card-heading,
  .wizard-header,
  .wizard-footer,
  .spotlight-top {
    flex-direction: column;
  }

  .brand-emblem {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .hero-emblem {
    width: 138px;
    height: 138px;
    padding: 16px;
  }

  .citadel-workspace {
    padding: 22px;
  }

  .panel-grid.two-column,
  .panel-grid.three-column,
  .summary-strip,
  .capability-grid,
  .wizard-steps,
  .wizard-intro,
  .signal-grid,
  .brand-swatches,
  .capability-facts {
    grid-template-columns: 1fr;
  }

  .journey-card {
    grid-template-columns: 1fr;
  }

  .wizard-section-header,
  .wizard-module-top,
  .wizard-module-footer,
  .wizard-user-card,
  .wizard-brand-preview {
    display: grid;
    grid-template-columns: 1fr;
  }

  .journey-action {
    grid-column: auto;
    justify-self: stretch;
  }

  .stage-actions,
  .capability-actions,
  .wizard-footer-actions {
    width: 100%;
  }

  .stage-actions > *,
  .capability-actions > *,
  .wizard-footer-actions > * {
    flex: 1 1 100%;
  }

  .capability-preview-card {
    display: grid;
    justify-content: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
