/* Inline thinking shimmer for labels (gray variant) */
.thinking-text-gray {
  background: linear-gradient(90deg,
      var(--text-primary) 0%,
      var(--text-secondary) 30%,
      var(--color-neutral-300) 60%,
      var(--text-primary) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: thinkingShimmer 4s ease-in-out infinite;
}

:root {
  /* Base */
  --color-base-black: #1A1A1A;
  --color-base-white: #FFFFFF;
  /* light UI is pure white now */
  --color-neutral-050: #F5F5F5;
  --color-neutral-100: #E7E7E7;
  --color-neutral-200: #CFCFCF;
  --color-neutral-300: #999999;

  /* Accents */
  --color-matcha: #5A8A4A;
  /* darker matcha for better contrast */
  --color-deep-forest: #3E5C48;
  --color-cappuccino: #C6A585;
  --color-latte-foam: #F1E5D2;
  --color-cedar: #9C6B43;
  --color-clay: #C27A5B;

  /* Light & Energy */
  --color-warm-light: #F7C77E;
  --color-amber-glow: #E89B4F;

  /* Semantic — default to LIGHT THEME */
  --bg-default: var(--color-base-white);
  --bg-elevated: var(--color-base-white);
  /* stay white in light mode */
  --text-primary: var(--color-base-black);
  --text-secondary: #555555;
  --text-accent: var(--color-deep-forest);
  --border-subtle: var(--color-neutral-100);
  --brand-primary: var(--color-cedar);
  /* CEDAR is now primary */
  --brand-secondary: var(--color-cappuccino);
  --cta-primary: var(--color-cedar);
  /* primary actions use Cedar */
  --cta-hover: #8B5A3A;
  /* darker hover for contrast */
  --success: var(--color-deep-forest);
  --warning: var(--color-amber-glow);

  --radius: 8px;
  --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* Dark theme overrides */
[data-theme="dark"] {
  --bg-default: var(--color-base-black);
  --bg-elevated: #1E1E1E;
  --text-primary: #F7F7F7;
  --text-secondary: #CFCFCF;
  --text-accent: var(--color-matcha);
  --border-subtle: #2E2E2E;
  --cta-primary: var(--color-cedar);
  --cta-hover: #8B5A3A;
  --success: var(--color-cedar);
  --warning: var(--color-warm-light);
}

html,
body {
  height: 100%;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  margin: 0;
  background: var(--bg-default);
  color: var(--text-primary);
  line-height: 1.5;
  display: flex;
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar .brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-secondary) 60%, transparent);
}

.sidebar nav {
  flex: 1;
  padding: 24px 0;
}

.sidebar nav a {
  display: block;
  padding: 12px 24px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover {
  background: color-mix(in oklab, var(--brand-primary) 8%, var(--bg-default));
}

.sidebar nav a.active {
  background: color-mix(in oklab, var(--brand-primary) 12%, var(--bg-default));
  border-left-color: var(--brand-primary);
  font-weight: 600;
  color: var(--text-accent);
}

/* Sidebar submenu */
.submenu {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--border-subtle);
}

.submenu-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 8px;
}

.submenu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submenu-item {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.submenu-item:hover {
  background: color-mix(in oklab, var(--brand-primary) 8%, var(--bg-default));
  color: var(--text-primary);
}

.submenu-item.active {
  color: var(--brand-primary);
  font-weight: 500;
}

/* Main content wrapper */
.main-wrapper {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(1.2) blur(6px);
  background: color-mix(in oklab, var(--bg-default) 85%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1120px;
  margin: 0 auto;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 80px;
  flex: 1;
}

.btn {
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background .2s;
}

.btn:hover {
  box-shadow: var(--shadow-1);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--cta-primary);
  border-color: color-mix(in oklab, var(--cta-primary) 80%, black);
  color: white;
}

.btn.primary:hover {
  background: var(--cta-hover);
}

.btn.ghost {
  background: transparent;
}

/* Action Button Style - for Keep/Undo type buttons */
.btn.action {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn.action:hover {
  background: color-mix(in oklab, var(--bg-elevated) 90%, var(--color-cedar));
  border-color: color-mix(in oklab, var(--border-subtle) 70%, var(--color-cedar));
  transform: translateY(-1px);
}

.btn.action.keep {
  background: var(--color-matcha);
  border-color: var(--color-matcha);
  color: white;
}

.btn.action.keep:hover {
  background: color-mix(in oklab, var(--color-matcha) 90%, var(--color-cedar));
  border-color: color-mix(in oklab, var(--color-matcha) 70%, var(--color-cedar));
}

.btn.action .shortcut {
  font-size: 12px;
  opacity: 0.7;
  font-family: var(--font-mono);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1000px) {

  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 200px;
  }

  .main-wrapper {
    margin-left: 200px;
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

h1 {
  font-size: 34px;
  margin: 0 0 8px;
}

h2 {
  font-size: 22px;
  margin: 28px 0 10px;
}

h3 {
  font-size: 18px;
  margin: 18px 0 10px;
}

h4 {
  font-size: 16px;
  margin: 16px 0 8px;
}

p {
  margin: 6px 0 10px;
  color: var(--text-secondary);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Swatches */
.swatch {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.chip {
  height: 84px;
}

.meta {
  padding: 10px 12px;
  background: color-mix(in oklab, var(--bg-default) 94%, transparent);
}

.meta .name {
  font-weight: 600;
}

.meta .ratio {
  font-size: 12px;
  color: var(--text-secondary);
}

/* AI Effect — animated gradient from palette */
.ai-effect {
  position: relative;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(60% 120% at 20% 10%, color-mix(in oklab, var(--color-warm-light) 70%, transparent), transparent 60%),
    radial-gradient(70% 140% at 80% 10%, color-mix(in oklab, var(--color-cappuccino) 70%, transparent), transparent 60%),
    radial-gradient(80% 160% at 40% 90%, color-mix(in oklab, var(--color-cedar) 60%, transparent), transparent 60%),
    radial-gradient(100% 100% at 70% 70%, color-mix(in oklab, var(--color-amber-glow) 50%, transparent), transparent 60%);
  filter: saturate(1.1);
  animation: floaty 8s ease-in-out infinite alternate;
}

@keyframes floaty {
  0% {
    transform: translateY(0) scale(1);
    filter: blur(0px) saturate(1.1);
  }

  100% {
    transform: translateY(-6px) scale(1.02);
    filter: blur(0.5px) saturate(1.15);
  }
}

/* Conversation component */
.chat {
  display: grid;
  gap: 10px;
}

.bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.bubble.user {
  margin-left: auto;
  background: var(--bg-default);
}

.bubble.assistant {
  background: color-mix(in oklab, var(--brand-primary) 6%, var(--bg-default));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--brand-primary) 20%, transparent);
}

.bubble .meta {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0;
  background: transparent;
}

.chip-inline {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--brand-primary);
  color: white;
}

/* Executable card */
.exec-card .kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in oklab, var(--bg-elevated) 85%, var(--bg-default));
}

.footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === AI Presence Elements (glow/button/card/link) === */
.ai-glow {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.ai-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--color-cedar) 20%,
      var(--color-warm-light) 40%,
      var(--color-amber-glow) 60%,
      var(--color-cedar) 80%,
      transparent 100%);
  background-size: 200% 100%;
  z-index: -1;
  opacity: 0.8;
  animation: slidingGlow 3s ease-in-out infinite alternate;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseGlow {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }

  100% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes borderGlow {
  0% {
    opacity: 0.6;
    filter: brightness(1);
  }

  100% {
    opacity: 1;
    filter: brightness(1.2);
  }
}

@keyframes slidingGlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

.ai-glow .btn {
  position: relative;
  z-index: 1;
  background: hsla(0, 0%, 100%, 0.1);
  border: 1px solid transparent;
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  transform: translateZ(0);
  box-shadow: 0 0 20px 0 rgba(156, 107, 67, 0.1);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.ai-glow .btn:hover {
  background: hsla(0, 0%, 100%, 0.15);
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 0 25px 0 rgba(156, 107, 67, 0.15);
}

.ai-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-elevated);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.ai-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, color-mix(in oklab, var(--color-cedar) 50%, transparent) 0%, transparent 70%),
    radial-gradient(circle at 80% 20%, color-mix(in oklab, var(--color-amber-glow) 50%, transparent) 0%, transparent 70%);
  opacity: 0.25;
  filter: blur(24px);
  animation: floatGlow 10s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes floatGlow {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-8px);
  }
}

.ai-link {
  background: linear-gradient(90deg, var(--color-cedar), var(--color-warm-light), var(--color-amber-glow));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
  text-decoration: none;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

.ai-link:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* Font examples */
.font-example {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.font-inter {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.font-lora {
  font-family: 'Lora', Georgia, serif;
}

.type-scale {
  margin: 12px 0;
}

.weight-demo {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.weight-demo>div {
  flex: 1;
  min-width: 200px;
}

/* Form elements */
input,
select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-default);
  color: var(--text-primary);
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

thead {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-top: 1px solid var(--border-subtle);
}

thead th {
  border-top: none;
}


.category-section {
  display: none;
  margin-bottom: 32px;
  scroll-margin-top: 20px;
  /* Add space above when scrolling to section */
}

.category-section.active {
  display: block;
}

/* Show all sections by default when "All Examples" is selected */
body:not([data-category]) .category-section,
body[data-category="all"] .category-section {
  display: block;
}

/* Background Builder Styles */
.builder-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.builder-preview {
  width: 100%;
  height: 400px;
  margin-bottom: 20px;
}

.builder-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1000px) {
  .builder-controls {
    grid-template-columns: 1fr;
  }
}

.preview-canvas {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.color-category {
  margin-bottom: 20px;
}

.color-category h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: var(--bg-elevated);
}

.color-swatch:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.color-swatch.selected {
  border-color: var(--brand-primary);
  background: color-mix(in oklab, var(--brand-primary) 8%, var(--bg-elevated));
}

.color-chip {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

.color-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: var(--brand-primary);
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.color-swatch.selected .color-check {
  display: flex;
}

.control-group {
  margin-bottom: 16px;
}

.control-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-subtle);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand-primary) 20%, transparent);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-primary);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand-primary) 20%, transparent);
}

.slider-value {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primary);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border-subtle);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-default);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-body pre {
  background: var(--bg-default);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  justify-content: flex-end;
}

/* Source Component */
.source {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.source:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in oklab, var(--border-subtle) 80%, var(--brand-primary));
}

.source-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-default);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.source-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.source-icon .icon-placeholder {
  width: 20px;
  height: 20px;
  background: var(--brand-primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.source-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.source-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.source-domain {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.source-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-action {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.source:hover .source-action {
  color: var(--brand-primary);
  background: color-mix(in oklab, var(--brand-primary) 8%, var(--bg-default));
}

.source-action svg {
  width: 16px;
  height: 16px;
}

/* Dark mode specific adjustments for source component */
[data-theme="dark"] .source {
  background: #1E1E1E;
  border-color: #2E2E2E;
}

[data-theme="dark"] .source:hover {
  border-color: color-mix(in oklab, #2E2E2E 80%, var(--brand-primary));
}

[data-theme="dark"] .source-icon {
  background: #1A1A1A;
  border-color: #2E2E2E;
}

/* Source component variants */
.source.compact {
  padding: 8px 12px;
}

.source.compact .source-icon {
  width: 24px;
  height: 24px;
}

.source.compact .source-icon img,
.source.compact .source-icon .icon-placeholder {
  width: 16px;
  height: 16px;
}

.source.compact .source-domain {
  font-size: 11px;
}

.source.compact .source-title {
  font-size: 13px;
}

.source.compact .source-action {
  width: 16px;
  height: 16px;
}

.source.compact .source-action svg {
  width: 12px;
  height: 12px;
}

.source.large {
  padding: 16px 20px;
}

.source.large .source-icon {
  width: 40px;
  height: 40px;
}

.source.large .source-icon img,
.source.large .source-icon .icon-placeholder {
  width: 24px;
  height: 24px;
}

.source.large .source-domain {
  font-size: 13px;
}

.source.large .source-title {
  font-size: 16px;
}

.source.large .source-action {
  width: 24px;
  height: 24px;
}

.source.large .source-action svg {
  width: 16px;
  height: 16px;
}

/* Connect Component */
.connect {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.connect:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in oklab, var(--border-subtle) 80%, var(--brand-primary));
}

.connect-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connect-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-default);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.connect-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.connect-icon .icon-placeholder {
  width: 32px;
  height: 32px;
  background: var(--brand-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.connect-icon .icon-overlay {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: var(--color-cedar);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border: 2px solid var(--bg-elevated);
}

.connect-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.connect-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.connect-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.connect-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.connect-skip {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.connect-skip:hover {
  background: color-mix(in oklab, var(--text-secondary) 8%, var(--bg-default));
  color: var(--text-primary);
}

.connect-button {
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.connect-button:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
  transform: translateY(-1px);
}

.connect-button:active {
  transform: translateY(0);
}

/* Connect component variants */
.connect.compact {
  padding: 16px;
}

.connect.compact .connect-icon {
  width: 40px;
  height: 40px;
}

.connect.compact .connect-icon img,
.connect.compact .connect-icon .icon-placeholder {
  width: 24px;
  height: 24px;
}

.connect.compact .connect-icon .icon-overlay {
  width: 14px;
  height: 14px;
  font-size: 9px;
}

.connect.compact .connect-title {
  font-size: 15px;
}

.connect.compact .connect-description {
  font-size: 13px;
}

.connect.compact .connect-skip,
.connect.compact .connect-button {
  font-size: 13px;
  padding: 6px 12px;
}

.connect.large {
  padding: 24px;
}

.connect.large .connect-icon {
  width: 56px;
  height: 56px;
}

.connect.large .connect-icon img,
.connect.large .connect-icon .icon-placeholder {
  width: 40px;
  height: 40px;
}

.connect.large .connect-icon .icon-overlay {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

.connect.large .connect-title {
  font-size: 18px;
}

.connect.large .connect-description {
  font-size: 15px;
}

.connect.large .connect-skip,
.connect.large .connect-button {
  font-size: 15px;
  padding: 10px 20px;
}

/* Contextual text for connect components */
.connect-context {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

/* Dark mode specific adjustments for connect component */
[data-theme="dark"] .connect {
  background: #1E1E1E;
  border-color: #2E2E2E;
}

[data-theme="dark"] .connect:hover {
  border-color: color-mix(in oklab, #2E2E2E 80%, var(--brand-primary));
}

[data-theme="dark"] .connect-icon {
  background: #1A1A1A;
  border-color: #2E2E2E;
}

[data-theme="dark"] .connect-button {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

[data-theme="dark"] .connect-button:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
}

/* Thinking Component */
.thinking {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thinking.with-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--color-cedar) 20%,
      var(--color-warm-light) 50%,
      var(--color-cedar) 80%,
      transparent 100%);
  background-size: 200% 100%;
  animation: thinkingGlow 3s ease-in-out infinite;
}

@keyframes thinkingGlow {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.thinking-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-cedar);
  position: relative;
  animation: thinkingPulse 2s ease-in-out infinite;
}

.thinking-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: thinkingDot 1.5s ease-in-out infinite;
}

@keyframes thinkingPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes thinkingDot {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.thinking-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  background: linear-gradient(90deg,
      var(--text-primary) 0%,
      var(--color-cedar) 30%,
      var(--color-warm-light) 60%,
      var(--text-primary) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: thinkingShimmer 4s ease-in-out infinite;
  letter-spacing: 0.01em;
}

/* Color scheme variations */
.thinking.gray .thinking-text {
  background: linear-gradient(90deg,
      var(--text-primary) 0%,
      var(--text-secondary) 30%,
      var(--color-neutral-300) 60%,
      var(--text-primary) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.thinking.primary .thinking-text {
  background: linear-gradient(90deg,
      var(--text-primary) 0%,
      var(--brand-primary) 30%,
      var(--color-cedar) 60%,
      var(--text-primary) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.thinking.secondary .thinking-text {
  background: linear-gradient(90deg,
      var(--text-primary) 0%,
      var(--brand-secondary) 30%,
      var(--color-cappuccino) 60%,
      var(--text-primary) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes thinkingShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.thinking-content {
  color: var(--color-neutral-300);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  animation: thinkingFadeIn 0.8s ease-out 0.5s forwards;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.thinking-content.visible {
  max-height: 200px;
}

@keyframes thinkingFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thinking-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}

.thinking-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-cedar);
  animation: thinkingDotBounce 1.4s ease-in-out infinite both;
}

.thinking-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.thinking-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes thinkingDotBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Thinking component variants */
.thinking.minimal {
  padding: 16px;
  min-height: 60px;
}

.thinking.minimal .thinking-text {
  font-size: 14px;
}

.thinking.minimal .thinking-content {
  font-size: 13px;
}

.thinking.detailed {
  padding: 24px;
  min-height: 120px;
}

.thinking.detailed .thinking-text {
  font-size: 18px;
}

.thinking.detailed .thinking-content {
  font-size: 15px;
}

.thinking.compact {
  padding: 12px 16px;
  min-height: 50px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.thinking.compact .thinking-header {
  margin-bottom: 0;
}

.thinking.compact .thinking-content {
  font-size: 13px;
  margin-left: 32px;
}

/* Dark mode adjustments for thinking component */
[data-theme="dark"] .thinking {
  background: #1E1E1E;
  border-color: #2E2E2E;
}

[data-theme="dark"] .thinking-text {
  background: linear-gradient(90deg,
      #F7F7F7 0%,
      var(--color-cedar) 30%,
      var(--color-warm-light) 60%,
      #F7F7F7 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .thinking.gray .thinking-text {
  background: linear-gradient(90deg,
      #F7F7F7 0%,
      #CFCFCF 30%,
      #999999 60%,
      #F7F7F7 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .thinking.primary .thinking-text {
  background: linear-gradient(90deg,
      #F7F7F7 0%,
      var(--brand-primary) 30%,
      var(--color-cedar) 60%,
      #F7F7F7 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .thinking.secondary .thinking-text {
  background: linear-gradient(90deg,
      #F7F7F7 0%,
      var(--brand-secondary) 30%,
      var(--color-cappuccino) 60%,
      #F7F7F7 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .thinking-content {
  color: #999999;
}

/* Dropdown Component */
.dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
  overflow: visible;
}

.dropdown-trigger {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-1);
}

.dropdown-trigger:hover {
  border-color: color-mix(in oklab, var(--border-subtle) 80%, var(--brand-primary));
  box-shadow: var(--shadow-2);
}

.dropdown-trigger:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-primary) 20%, transparent);
}

.dropdown-trigger .trigger-text {
  flex: 1;
  text-align: left;
}

.dropdown-trigger .trigger-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
  color: var(--text-primary);
}

.dropdown-trigger.open .trigger-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  z-index: 50;
  margin-top: 4px;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
  position: relative;
}

.dropdown-item:hover {
  background: color-mix(in oklab, var(--brand-primary) 8%, var(--bg-default));
}

.dropdown-item.selected {
  background: color-mix(in oklab, var(--brand-primary) 12%, var(--bg-default));
  color: var(--brand-primary);
}

.dropdown-item.selected .item-text {
  color: var(--brand-primary);
}

.dropdown-item.selected .item-check {
  color: var(--brand-primary);
}

.dropdown-item .item-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.dropdown-item .item-text {
  flex: 1;
}

.dropdown-item .item-badge {
  background: transparent;
  color: var(--color-amber-glow);
  border: 1px solid var(--color-amber-glow);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.dropdown-item .item-check {
  width: 16px;
  height: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  flex-shrink: 0;
}

.dropdown-item .item-tag {
  background: transparent;
  color: var(--color-amber-glow);
  border: 1px solid var(--color-amber-glow);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.dropdown-item .item-tag.primary {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.dropdown-item .item-tag.secondary {
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

.dropdown-item .item-tag.success {
  color: var(--success);
  border-color: var(--success);
}

.dropdown-item .item-tag.warning {
  color: var(--warning);
  border-color: var(--warning);
}

.dropdown-item .item-description {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 2px;
}

/* Dark mode adjustments for dropdown */
[data-theme="dark"] .dropdown-trigger {
  background: #1E1E1E;
  border-color: #2E2E2E;
}

[data-theme="dark"] .dropdown-trigger:hover {
  border-color: color-mix(in oklab, #2E2E2E 80%, var(--brand-primary));
}

[data-theme="dark"] .dropdown-menu {
  background: #1E1E1E;
  border-color: #2E2E2E;
}

[data-theme="dark"] .dropdown-item {
  border-bottom-color: #2E2E2E;
}

[data-theme="dark"] .dropdown-item:hover {
  background: color-mix(in oklab, var(--brand-primary) 8%, #1E1E1E);
}

[data-theme="dark"] .dropdown-item.selected {
  background: color-mix(in oklab, var(--brand-primary) 12%, #1E1E1E);
}

/* Submenu styles */
.dropdown-item.has-submenu {
  position: relative;
}

.dropdown-item.has-submenu .item-chevron {
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  margin-left: 8px;
}

.dropdown-item.has-submenu:hover .item-chevron {
  transform: translateX(2px);
}

.dropdown-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  z-index: 100;
  margin-left: 4px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: all 0.2s ease;
  overflow: hidden;
}

.dropdown-item.has-submenu:hover .dropdown-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0.1s;
}

.dropdown-submenu .dropdown-item {
  padding: 12px 16px;
}

.dropdown-submenu .dropdown-item .item-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.dropdown-submenu .dropdown-item .item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-submenu .dropdown-item .item-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.dropdown-submenu .dropdown-item .item-icon .icon-placeholder {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 600;
}

.dropdown-submenu .dropdown-item .item-external {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  margin-left: auto;
  flex-shrink: 0;
}

/* Dark mode adjustments for submenu */
[data-theme="dark"] .dropdown-submenu {
  background: #1E1E1E;
  border-color: #2E2E2E;
}

[data-theme="dark"] .dropdown-submenu .dropdown-item {
  border-bottom-color: #2E2E2E;
}

/* Dropdown item icons */
.dropdown-item .item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.dropdown-item .item-icon i {
  font-size: 14px;
}

/* Secondary menu items */
.dropdown-item.secondary {
  margin-top: 8px;
}

.dropdown-item.secondary .item-text {
  color: var(--color-neutral-300);
  font-weight: 400;
}

.dropdown-item.secondary:hover {
  background: color-mix(in oklab, var(--brand-primary) 8%, var(--bg-default));
}

/* Menu separators */
.dropdown-separator {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

/* Dark mode adjustments for secondary items */
[data-theme="dark"] .dropdown-item.secondary .item-text {
  color: #999999;
}

[data-theme="dark"] .dropdown-item.secondary:hover {
  background: color-mix(in oklab, var(--brand-primary) 8%, #1E1E1E);
}

[data-theme="dark"] .dropdown-separator {
  background: #2E2E2E;
}

/* ===== Wizard Styles ===== */
body.wizard-page {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.wizard-window {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.window-control.close {
  background: #ff5f57;
}

.window-control.minimize {
  background: #ffbd2e;
}

.window-control.maximize {
  background: #28ca42;
}

.wizard-brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  /* smaller mention */
  font-family: 'Lora', Georgia, serif;
}

.wizard-brand-logo .brand-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.wizard-brand-logo .brand-text {
  letter-spacing: 0.2px;
}

.wizard-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wizard-header-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.wizard-header-link:hover {
  opacity: 1;
}

.wizard-header-icon {
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.wizard-header-icon:hover {
  opacity: 1;
}

.wizard-inline-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 300;
  font-size: 18px;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  opacity: 0.9;
  margin-bottom: 40px;
  /* push other elements lower */
}

.wizard-inline-brand .brand-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.wizard-inline-brand .brand-text {
  letter-spacing: 0.2px;
}

/* Step 1: inline brand inside main (bigger and centered) */
.wizard-inline-brand-step1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wizard-inline-brand-step1 .brand-icon {
  width: 40px;
  height: 40px;
}

.wizard-inline-brand-step1 .brand-text {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* Hide header brand on step 1 only */
body.is-step-1 .wizard-topbar .wizard-inline-brand {
  display: none;
}

/* Keep progress/download aligned right when brand is hidden on step 1 */
body.is-step-1 .wizard-topbar {
  justify-content: flex-end;
}

.wizard-background {
  position: fixed;
  inset: 0;
  background: #1A1A1A;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.background-arc {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(60px);
  animation: float 20s ease-in-out infinite;
}

.arc-1 {
  background: radial-gradient(circle, #9C6B43 0%, transparent 70%);
  left: -200px;
  top: -100px;
  animation-delay: 0s;
}

.arc-2 {
  background: radial-gradient(circle, #F7C77E 0%, transparent 70%);
  right: -150px;
  top: 200px;
  animation-delay: 2s;
}

.arc-3 {
  background: radial-gradient(circle, #5A8A4A 0%, transparent 70%);
  left: 50%;
  bottom: -200px;
  animation-delay: 4s;
  transform: translateX(-50%);
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(30px, -30px);
  }

  50% {
    transform: translate(-20px, 20px);
  }

  75% {
    transform: translate(20px, 10px);
  }
}

.wizard-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 2px, rgba(255, 255, 255, 0.03) 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 2px, rgba(255, 255, 255, 0.03) 3px);
  pointer-events: none;
}

.wizard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  z-index: 1;
}

.wizard-main {
  text-align: center;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.wizard-heading {
  font-family: 'Lora', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: white;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.wizard-description {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0 0 48px;
}

.wizard-icon-container {
  display: none;
}

.wizard-icon {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(156, 107, 67, 0.3), rgba(247, 199, 126, 0.3));
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 60px rgba(156, 107, 67, 0.5),
    inset 0 0 60px rgba(247, 199, 126, 0.3),
    0 0 120px rgba(90, 138, 74, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: iconPulse 3s ease-in-out infinite;
}

.wizard-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--brand-primary), var(--color-warm-light));
  opacity: 0.2;
  z-index: -1;
  animation: iconRotate 10s linear infinite;
}

.wizard-icon-inner {
  font-size: 64px;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 60px rgba(156, 107, 67, 0.5),
      inset 0 0 60px rgba(247, 199, 126, 0.3),
      0 0 120px rgba(90, 138, 74, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow:
      0 0 80px rgba(156, 107, 67, 0.6),
      inset 0 0 80px rgba(247, 199, 126, 0.4),
      0 0 140px rgba(90, 138, 74, 0.4);
  }
}

@keyframes iconRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.wizard-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

/* OTP inputs */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.otp-input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
}

.otp-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(156, 107, 67, 0.2);
}

.wizard-dropdown {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.wizard-dropdown-trigger {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.wizard-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.wizard-dropdown-trigger .dropdown-icon {
  font-size: 12px;
  opacity: 0.6;
  transition: transform 0.2s;
}

.wizard-dropdown-trigger.open .dropdown-icon {
  transform: rotate(180deg);
}

.wizard-button-primary {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in oklab, var(--brand-primary) 80%, var(--color-warm-light)));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
  box-sizing: border-box;
}

.wizard-button-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg,
      color-mix(in oklab, var(--brand-primary) 90%, var(--color-warm-light)),
      color-mix(in oklab, var(--brand-primary) 70%, var(--color-warm-light)));
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.04);
}

.wizard-button-primary:active {
  transform: translateY(0);
}

/* Secondary button for subtle CTAs */
.wizard-button-secondary {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}

.wizard-button-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.wizard-button-secondary:active {
  transform: translateY(0);
}

.wizard-input {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 300;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

/* Input with leading icon */
.input-with-icon {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.input-with-icon .wizard-input {
  padding-left: 52px;
  /* space for icon */
}

.input-with-icon .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.55;
  /* light, non-distracting */
}

/* Inline email row */
.wizard-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.wizard-inline .wizard-input {
  max-width: none;
  margin: 0;
}

/* Icon-only primary button */
.wizard-icon-button-primary {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in oklab, var(--brand-primary) 80%, var(--color-warm-light)));
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(156, 107, 67, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wizard-icon-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(156, 107, 67, 0.6);
}

.wizard-icon-button-primary:active {
  transform: translateY(0);
}

.wizard-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.wizard-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(156, 107, 67, 0.2);
}

.wizard-footer {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-footer-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: white;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.wizard-footer-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.wizard-footer-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Hide footer controls for step 1 */
.wizard-step-1-only {
  display: none !important;
}

.wizard-footer-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.wizard-footer-link:hover {
  color: var(--color-warm-light);
  gap: 6px;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px;
  margin-left: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .kbd-hint {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Emphasize keyboard hints on step 6 with brand colors */
.wizard-step-6 .kbd-hint {
  background: color-mix(in oklab, var(--brand-primary) 28%, transparent);
  border-color: color-mix(in oklab, var(--brand-primary) 45%, transparent);
  color: white;
}

[data-theme="light"] .wizard-step-6 .kbd-hint {
  background: color-mix(in oklab, var(--brand-primary) 18%, white 82%);
  border-color: color-mix(in oklab, var(--brand-primary) 35%, #000 0%);
  color: #1A1A1A;
}

.wizard-theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

.wizard-theme-toggle .btn {
  padding: 6px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
}

.wizard-theme-toggle .btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

[property] --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.siri-orb {
  display: grid;
  grid-template-areas: "stack";
  overflow: hidden;
  border-radius: 50%;
  position: relative;
  transform: scale(1.1);
  margin: 10px;
}

.siri-orb::before,
.siri-orb::after {
  content: "";
  display: block;
  grid-area: stack;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translateZ(0);
}

.siri-orb::before {
  background:
    conic-gradient(from calc(var(--angle) * 2) at 25% 70%,
      var(--c3),
      transparent 20% 80%,
      var(--c3)),
    conic-gradient(from calc(var(--angle) * 2) at 45% 75%,
      var(--c2),
      transparent 30% 60%,
      var(--c2)),
    conic-gradient(from calc(var(--angle) * -3) at 80% 20%,
      var(--c1),
      transparent 40% 60%,
      var(--c1)),
    conic-gradient(from calc(var(--angle) * 2) at 15% 5%,
      var(--c2),
      transparent 10% 90%,
      var(--c2)),
    conic-gradient(from calc(var(--angle) * 1) at 20% 80%,
      var(--c1),
      transparent 10% 90%,
      var(--c1)),
    conic-gradient(from calc(var(--angle) * -2) at 85% 10%,
      var(--c3),
      transparent 20% 80%,
      var(--c3));
  box-shadow:
    0 0 calc(var(--shadow-spread) * 3) var(--c1);
  filter: blur(var(--blur-amount)) contrast(var(--contrast-amount)) brightness(1.1);
  animation: rotate var(--animation-duration) linear infinite;
}

.siri-orb::after {
  background-image: radial-gradient(circle at center,
      var(--bg) var(--dot-size),
      transparent var(--dot-size));
  background-size: calc(var(--dot-size) * 2) calc(var(--dot-size) * 2);
  backdrop-filter: blur(calc(var(--blur-amount) * 2)) contrast(calc(var(--contrast-amount) * 2));
  mix-blend-mode: overlay;
  opacity: 0.1;
}

.siri-orb:not([style*="--mask-radius: 0% "])::after {
  mask-image: radial-gradient(black var(--mask-radius), transparent 75%);
}

@keyframes rotate {
  to {
    --angle: 360deg;
  }
}

[data-theme="light"] .wizard-background {
  background: #F5F5F5;
}

[data-theme="light"] .wizard-background::before {
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.03) 0px, transparent 1px, transparent 2px, rgba(0, 0, 0, 0.03) 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.03) 0px, transparent 1px, transparent 2px, rgba(0, 0, 0, 0.03) 3px);
}

[data-theme="light"] .wizard-heading {
  color: #1A1A1A;
}

[data-theme="light"] .wizard-inline-brand {
  color: #1A1A1A;
  opacity: 0.9;
}

[data-theme="light"] .wizard-inline-brand .brand-icon {
  filter: brightness(0);
}

[data-theme="light"] .wizard-description {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .wizard-icon {
  background: linear-gradient(135deg, rgba(156, 107, 67, 0.2), rgba(247, 199, 126, 0.2));
  box-shadow:
    0 0 40px rgba(156, 107, 67, 0.3),
    inset 0 0 40px rgba(247, 199, 126, 0.2),
    0 0 80px rgba(90, 138, 74, 0.2);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .wizard-icon-inner {
  color: var(--brand-primary);
  text-shadow: none;
}

[data-theme="light"] .wizard-dropdown-trigger {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1A1A1A;
}

[data-theme="light"] .wizard-dropdown-trigger:hover {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .wizard-input {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1A1A1A;
}

[data-theme="light"] .wizard-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .wizard-input:focus {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(156, 107, 67, 0.2);
}

[data-theme="light"] .wizard-footer-button {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1A1A1A;
}

[data-theme="light"] .wizard-footer-button:hover {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .wizard-footer-text {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .wizard-header-link,
[data-theme="light"] .wizard-header-icon {
  color: #1A1A1A;
}

[data-theme="light"] .wizard-theme-toggle .btn {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1A1A1A;
}

[data-theme="light"] .wizard-theme-toggle .btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* Wizard step management */
.wizard-step {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.wizard-step.active {
  display: block;
  position: relative;
  opacity: 1;
  pointer-events: auto;
  animation: fadeIn 0.4s ease-out forwards;
}

.wizard-step.leaving {
  animation: fadeOut 0.4s ease-out forwards;
}

.wizard-step.entering {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Step 6 staged appearance */
.wizard-step-6 .step6-appear {
  opacity: 0;
  transform: translateY(8px);
}

.wizard-step-6.active .step6-orb {
  animation: fadeUp 0.6s ease-out 0.15s forwards;
}

.wizard-step-6.active .step6-title {
  animation: fadeUp 0.6s ease-out 0.3s forwards;
}

.wizard-step-6.active .step6-instruction {
  animation: fadeUp 0.9s ease-out 0.55s forwards;
}

.wizard-step-6.active .step6-button {
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Step 1 staged appearance */
.wizard-step-1 .step1-appear {
  opacity: 0;
  transform: translateY(8px);
}

.wizard-step-1.active .step1-brand {
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.wizard-step-1.active .step1-title {
  animation: fadeUp 0.6s ease-out 0.22s forwards;
}

.wizard-step-1.active .step1-desc {
  animation: fadeUp 0.7s ease-out 0.35s forwards;
}

.wizard-step-1.active .step1-controls {
  animation: fadeUp 0.8s ease-out 0.48s forwards;
}

/* Step 3 staged appearance */
.wizard-step-3 .step3-appear {
  opacity: 0;
  transform: translateY(8px);
}

.wizard-step-3.active .step3-title {
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.wizard-step-3.active .step3-desc {
  animation: fadeUp 0.7s ease-out 0.22s forwards;
}

.wizard-step-3.active .step3-controls {
  animation: fadeUp 0.8s ease-out 0.35s forwards;
}

/* Step 4 staged appearance */
.wizard-step-4 .step4-appear {
  opacity: 0;
  transform: translateY(8px);
}

.wizard-step-4.active .step4-title {
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.wizard-step-4.active .step4-desc {
  animation: fadeUp 0.7s ease-out 0.22s forwards;
}

.wizard-step-4.active .step4-options {
  animation: fadeUp 0.8s ease-out 0.35s forwards;
}

/* Step 5 staged appearance */
.wizard-step-5 .step5-appear {
  opacity: 0;
  transform: translateY(8px);
}

.wizard-step-5.active .step5-title {
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.wizard-step-5.active .step5-desc {
  animation: fadeUp 0.7s ease-out 0.22s forwards;
}

.wizard-step-5.active .step5-grid {
  animation: fadeUp 0.8s ease-out 0.35s forwards;
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Wizard step 2 styles */
.wizard-main-wide {
  max-width: 700px;
  margin: 0 auto;
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.wizard-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.wizard-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.wizard-option.active {
  background: rgba(156, 107, 67, 0.1);
  border-color: var(--brand-primary);
}

.wizard-option-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(247, 199, 126, 0.1);
  border: 2px solid rgba(247, 199, 126, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.wizard-option-icon i {
  font-size: 24px;
  color: var(--color-warm-light);
}

.wizard-option-icon .small-icon {
  position: absolute;
  font-size: 12px;
  background: var(--color-warm-light);
  color: #1A1A1A;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-option-icon .fa-arrow-up {
  top: -4px;
  right: -4px;
}

.wizard-option-icon .fa-plus {
  bottom: -4px;
  left: -4px;
}

.wizard-option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wizard-option-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  line-height: 1.4;
}

.wizard-option-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.wizard-option-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.wizard-option-check i {
  font-size: 12px;
  color: transparent;
  transition: all 0.2s;
}

.wizard-option.active .wizard-option-check {
  background: var(--color-warm-light);
  border-color: var(--color-warm-light);
}

.wizard-option.active .wizard-option-check i {
  color: #1A1A1A;
}

/* Light theme for step 2 */
[data-theme="light"] .wizard-option {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .wizard-option:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .wizard-option.active {
  background: rgba(156, 107, 67, 0.08);
  border-color: var(--brand-primary);
}

[data-theme="light"] .wizard-option-icon {
  background: rgba(156, 107, 67, 0.1);
  border-color: rgba(156, 107, 67, 0.2);
}

[data-theme="light"] .wizard-option-icon i {
  color: var(--brand-primary);
}

[data-theme="light"] .wizard-option-icon .small-icon {
  background: var(--brand-primary);
  color: white;
}

[data-theme="light"] .wizard-option-title {
  color: #1A1A1A;
}

[data-theme="light"] .wizard-option-description {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .wizard-option-check {
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .wizard-option.active .wizard-option-check {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

[data-theme="light"] .wizard-option.active .wizard-option-check i {
  color: white;
}

@media (max-width: 768px) {
  .wizard-heading {
    font-size: 36px;
  }

  .wizard-description {
    font-size: 14px;
  }

  .wizard-icon {
    width: 120px;
    height: 120px;
  }

  .wizard-icon-inner {
    font-size: 48px;
  }

  .wizard-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .wizard-option {
    padding: 16px;
  }

  .wizard-option-icon {
    width: 48px;
    height: 48px;
  }

  .wizard-option-icon i {
    font-size: 20px;
  }

  .wizard-option-title {
    font-size: 15px;
  }

  .wizard-option-description {
    font-size: 13px;
  }
}

/* MCP Grid and Cards */
.wizard-step-5 .wizard-content {
  overflow-y: auto;
  justify-content: flex-start;
  padding-top: 40px;
  padding-bottom: 40px;
}

.wizard-step-5 .wizard-main {
  max-width: 1200px;
}

.wizard-mcp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.mcp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mcp-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.mcp-card.mcp-card-selected {
  background: rgba(156, 107, 67, 0.1);
  border-color: var(--brand-primary);
}

.mcp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mcp-card-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.mcp-icon-notion {
  filter: brightness(0) invert(1);
}

.mcp-card-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.4;
  text-align: left;
}

.mcp-card-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
  text-align: left;
}

.mcp-toggle-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Toggle Switch */
.mcp-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.mcp-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mcp-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.mcp-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  border-radius: 50%;
}

.mcp-toggle-input:checked+.mcp-toggle-slider {
  background-color: var(--color-warm-light);
  border-color: var(--color-warm-light);
}

.mcp-toggle-input:checked+.mcp-toggle-slider:before {
  transform: translateX(20px) translateY(-50%);
  background-color: #1A1A1A;
}

/* Coming Soon Badge */
.mcp-coming-soon {
  font-size: 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  white-space: nowrap;
}

/* Light theme for MCP cards */
[data-theme="light"] .mcp-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .mcp-card:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .mcp-card.mcp-card-selected {
  background: rgba(156, 107, 67, 0.08);
  border-color: var(--brand-primary);
}

[data-theme="light"] .mcp-card-title {
  color: #1A1A1A;
}

[data-theme="light"] .mcp-card-description {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .mcp-toggle-slider {
  background-color: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .mcp-toggle-slider:before {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  top: 50%;
  transform: translateY(-50%);
}

[data-theme="light"] .mcp-toggle-input:checked+.mcp-toggle-slider {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

[data-theme="light"] .mcp-toggle-input:checked+.mcp-toggle-slider:before {
  transform: translateX(20px) translateY(-50%);
  background-color: white;
}

[data-theme="light"] .mcp-coming-soon {
  color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .wizard-mcp-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 32px;
  }

  .mcp-card {
    padding: 16px;
  }

  .mcp-card-icon {
    width: 36px;
    height: 36px;
  }

  .mcp-card-title {
    font-size: 15px;
  }

  .mcp-card-description {
    font-size: 12px;
  }

  .mcp-toggle {
    width: 40px;
    height: 22px;
  }

  .mcp-toggle-slider:before {
    height: 16px;
    width: 16px;
  }

  .mcp-toggle-input:checked+.mcp-toggle-slider:before {
    transform: translateX(18px) translateY(-50%);
  }
}

@media (max-width: 576px) {
  .mcp-card-icon {
    width: 32px;
    height: 32px;
  }

  .mcp-toggle {
    width: 36px;
    height: 20px;
  }

  .mcp-toggle-slider:before {
    height: 14px;
    width: 14px;
  }

  .mcp-toggle-input:checked+.mcp-toggle-slider:before {
    transform: translateX(16px) translateY(-50%);
  }
}