/* Homepage — tool-forward layout inspired by reference color-code hubs */

.cx-home {
  --cx-home-radius: var(--radius-xl);
}

/* —— Hero + live color studio —— */

.cx-home-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-bottom: none;
  background:
    linear-gradient(125deg, rgba(124, 58, 237, 0.12) 0%, transparent 38%),
    linear-gradient(235deg, rgba(6, 182, 212, 0.1) 0%, transparent 42%),
    linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, transparent 55%),
    var(--bg-base);
}

.cx-home-hero__glow {
  pointer-events: none;
  position: absolute;
  inset: -20% -10% auto;
  height: min(520px, 70vh);
  background:
    radial-gradient(ellipse 55% 45% at 15% 20%, rgba(124, 58, 237, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 35% at 85% 10%, rgba(236, 72, 153, 0.2), transparent 65%),
    radial-gradient(ellipse 50% 40% at 60% 80%, rgba(59, 130, 246, 0.14), transparent 70%);
  opacity: 0.95;
}

.cx-home-hero__mesh {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.12), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.08), transparent 40%);
  opacity: 0.85;
}

.cx-text-gradient {
  background: linear-gradient(105deg, #7c3aed 0%, #ec4899 38%, #06b6d4 72%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cx-eyebrow--gradient {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.cx-btn--gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 45%, #06b6d4 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  font-weight: 600;
  text-decoration: none;
}

.cx-btn--gradient:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px rgba(236, 72, 153, 0.4);
  color: #fff;
}

/* Beat global [data-theme='light'] link colors (hcc-design.css) */
[data-theme='light'] a.cx-btn--gradient,
[data-theme='light'] a.cx-btn--gradient:hover,
[data-theme='light'] a.cx-btn--gradient:focus-visible,
[data-theme='light'] a.cx-btn--primary,
[data-theme='light'] a.cx-btn--primary:hover,
[data-theme='light'] a.cx-btn--primary:focus-visible {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.cx-home-spectrum {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-bottom: 1px solid var(--bg-border);
}

.cx-home-spectrum__bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #ef4444,
    #f97316,
    #eab308,
    #22c55e,
    #06b6d4,
    #3b82f6,
    #8b5cf6,
    #ec4899,
    #ef4444
  );
  background-size: 200% 100%;
  animation: cx-spectrum-shift 12s linear infinite;
}

.cx-home-spectrum__bar--warm {
  opacity: 0.35;
  mix-blend-mode: overlay;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: cx-spectrum-shine 4s ease-in-out infinite;
}

@keyframes cx-spectrum-shift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes cx-spectrum-shine {
  0%,
  100% {
    transform: translateX(-30%);
  }
  50% {
    transform: translateX(30%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx-home-spectrum__bar {
    animation: none;
  }
  .cx-home-spectrum__bar--warm {
    animation: none;
  }
  .cx-home-studio__picker-hit:hover .cx-home-studio__picker-ring {
    transform: none;
  }
}

.cx-home-hero__grid {
  position: relative;
  z-index: 1;
}

.cx-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.cx-home-hero__refs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.cx-home-hero__refs a {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.cx-home-hero__refs a:hover {
  border-color: rgba(124, 58, 237, 0.45);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

[data-theme='light'] .cx-home-hero {
  background:
    linear-gradient(125deg, rgba(124, 58, 237, 0.08) 0%, transparent 38%),
    linear-gradient(235deg, rgba(6, 182, 212, 0.06) 0%, transparent 42%),
    linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, transparent 55%),
    var(--bg-base);
}

.cx-home-hero__grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 992px) {
  .cx-home-hero__grid {
    grid-template-columns: 1fr minmax(320px, 420px);
    gap: var(--space-3xl);
  }
}

.cx-home-hero__title {
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
  max-width: 18ch;
}

.cx-home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cx-home-hero__stats strong {
  display: block;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--text-primary) 30%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cx-home-directories {
  padding: var(--space-xl) 0 var(--space-2xl);
  margin-top: calc(-1 * var(--space-lg));
}

.cx-home-directories__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

a.cx-home-dir-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  padding-top: calc(var(--space-md) + 4px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-border);
  background:
    linear-gradient(180deg, var(--dir-tint, rgba(124, 58, 237, 0.06)) 0%, transparent 55%),
    var(--bg-surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

a.cx-home-dir-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--dir-accent, linear-gradient(90deg, #7c3aed, #06b6d4));
}

a.cx-home-dir-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 8px 24px var(--dir-glow, rgba(124, 58, 237, 0.12));
}

.cx-home-directories__grid a:nth-child(1) {
  --dir-accent: linear-gradient(90deg, #7c3aed, #a78bfa);
  --dir-tint: rgba(124, 58, 237, 0.1);
  --dir-glow: rgba(124, 58, 237, 0.15);
}
.cx-home-directories__grid a:nth-child(2) {
  --dir-accent: linear-gradient(90deg, #ec4899, #f472b6);
  --dir-tint: rgba(236, 72, 153, 0.1);
  --dir-glow: rgba(236, 72, 153, 0.12);
}
.cx-home-directories__grid a:nth-child(3) {
  --dir-accent: linear-gradient(90deg, #3b82f6, #60a5fa);
  --dir-tint: rgba(59, 130, 246, 0.1);
}
.cx-home-directories__grid a:nth-child(4) {
  --dir-accent: linear-gradient(90deg, #8b5cf6, #c084fc);
  --dir-tint: rgba(139, 92, 246, 0.1);
}
.cx-home-directories__grid a:nth-child(5) {
  --dir-accent: linear-gradient(90deg, #06b6d4, #22d3ee);
  --dir-tint: rgba(6, 182, 212, 0.1);
}
.cx-home-directories__grid a:nth-child(6) {
  --dir-accent: linear-gradient(90deg, #10b981, #34d399);
  --dir-tint: rgba(16, 185, 129, 0.1);
}
.cx-home-directories__grid a:nth-child(7) {
  --dir-accent: linear-gradient(90deg, #f59e0b, #fbbf24);
  --dir-tint: rgba(245, 158, 11, 0.1);
}
.cx-home-directories__grid a:nth-child(8) {
  --dir-accent: linear-gradient(90deg, #ef4444, #f87171);
  --dir-tint: rgba(239, 68, 68, 0.08);
}
.cx-home-directories__grid a:nth-child(9) {
  --dir-accent: linear-gradient(90deg, #14b8a6, #2dd4bf);
  --dir-tint: rgba(20, 184, 166, 0.1);
}

.cx-home-dir-card__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.cx-home-dir-card__label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.cx-home-dir-card__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cx-home-hero__lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 42ch;
  margin: 0 0 var(--space-lg);
}

.cx-home-hero__formats {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-xl);
  max-width: 44ch;
}

.cx-home-hero__formats strong {
  color: var(--text-secondary);
}

.cx-home-studio {
  padding: var(--space-lg);
  border-radius: var(--cx-home-radius);
  border: 1px solid var(--bg-border);
  background:
    linear-gradient(160deg, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
    var(--bg-surface);
  box-shadow: var(--shadow-md), 0 0 60px rgba(124, 58, 237, 0.08);
  position: relative;
}

.cx-home-studio::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    135deg,
    #7c3aed,
    #ec4899 35%,
    #06b6d4 65%,
    #f59e0b 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

[data-theme='light'] .cx-home-studio {
  background:
    linear-gradient(160deg, rgba(124, 58, 237, 0.04) 0%, transparent 50%),
    #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 0 48px rgba(124, 58, 237, 0.06);
}

.cx-home-studio__badge {
  margin: 0 0 var(--space-sm);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cx-home-studio__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1.75;
  max-height: 180px;
  border-radius: var(--radius-lg);
  background: var(--cx-studio-color, #7c3aed);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: var(--space-md);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: var(--space-md);
  box-shadow: inset 0 -40px 80px rgba(0, 0, 0, 0.15);
  transition: background var(--transition-base);
}

.cx-home-studio__preview-mesh {
  position: absolute;
  inset: 0;
  background: var(--cx-studio-gradient, none);
  opacity: 0.92;
  transition: background var(--transition-base);
}

.cx-home-studio__preview-hex {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.cx-home-studio__picker-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-md);
}

.cx-home-studio__picker-hit {
  position: relative;
  display: block;
  width: 4rem;
  height: 4rem;
  cursor: pointer;
  flex-shrink: 0;
}

.cx-home-studio__picker-ring {
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-lg);
  background: conic-gradient(
    from 0deg,
    #ef4444,
    #f59e0b,
    #22c55e,
    #06b6d4,
    #3b82f6,
    #8b5cf6,
    #ec4899,
    #ef4444
  );
  opacity: 0.85;
  transition: transform 0.35s ease;
}

.cx-home-studio__picker-hit:hover .cx-home-studio__picker-ring {
  transform: rotate(90deg);
}

.cx-home-studio__picker {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 3px solid var(--bg-surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
}

.cx-home-studio__sliders {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.cx-home-studio__slider label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.cx-home-studio__slider label span {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.cx-home-studio__slider input[type='range'] {
  width: 100%;
  height: 0.55rem;
  border-radius: var(--radius-full);
  appearance: none;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
}

.cx-home-studio__slider input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  background: var(--cx-slider-thumb, var(--brand-primary));
  cursor: pointer;
}

.cx-home-studio__slider--hue input[type='range'] {
  background: linear-gradient(
    90deg,
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
}

.cx-home-studio__slider--sat input[type='range'] {
  background: linear-gradient(90deg, var(--cx-slider-desat, #808080), var(--cx-studio-color, #7c3aed));
}

.cx-home-studio__slider--light input[type='range'] {
  background: linear-gradient(90deg, #000, var(--cx-studio-color, #7c3aed), #fff);
}

.cx-home-studio__presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.cx-home-studio__preset {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cx-home-studio__preset:hover {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.6);
}

.cx-home-studio__preset.is-active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-surface);
  transform: scale(1.08);
}

.cx-home-studio__open {
  flex: 1 1 100%;
  justify-content: center;
  text-align: center;
}

.cx-home-studio__hex {
  flex: 1;
  min-width: 8rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.cx-home-studio__harmony-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.cx-home-studio__harmony {
  width: 100%;
  margin-bottom: var(--space-md);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.cx-home-studio__palette {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.cx-home-studio__chip {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cx-home-studio__chip:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cx-home-studio__chip.is-active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-surface);
}

.cx-home-studio__formats {
  display: grid;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.cx-home-studio__formats dt {
  font-family: var(--font-body);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0;
}

.cx-home-studio__formats dd {
  margin: 0 0 var(--space-sm);
  word-break: break-all;
}

.cx-home-studio__copy {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  padding: 0.2rem 0.35rem;
  margin: -0.2rem -0.35rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  word-break: break-all;
  transition: background var(--transition-fast);
}

.cx-home-studio__copy:hover {
  background: rgba(124, 58, 237, 0.12);
}

.cx-home-studio__copy:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.cx-home-studio__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* —— Feature rows (picker, image, wheel, chart, names, library) —— */

.cx-home-feature {
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid var(--bg-border);
}

.cx-home-feature:nth-child(even) {
  background: var(--bg-surface);
}

[data-theme='light'] .cx-home-feature:nth-child(even) {
  background: rgba(248, 248, 252, 0.85);
}

.cx-home-feature__grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 900px) {
  .cx-home-feature__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }

  .cx-home-feature--reverse .cx-home-feature__grid {
    direction: rtl;
  }

  .cx-home-feature--reverse .cx-home-feature__grid > * {
    direction: ltr;
  }
}

.cx-home-feature__visual {
  border-radius: var(--cx-home-radius);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  padding: var(--space-lg);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.cx-home-feature__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #7c3aed, #ec4899 35%, #06b6d4 65%, #f59e0b 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}

.cx-home-feature__visual--picker {
  flex-direction: column;
  gap: var(--space-md);
}

.cx-home-feature__mock-input {
  width: 100%;
  max-width: 280px;
  height: 3rem;
  border-radius: var(--radius-md);
  border: 2px dashed var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cx-home-feature__mock-sliders {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cx-home-feature__mock-sliders span {
  display: block;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  opacity: 0.5;
}

.cx-home-feature__visual--image {
  background:
    linear-gradient(135deg, #f54927 0%, #f5b027 50%, #7c3aed 100%);
  min-height: 260px;
  position: relative;
}

.cx-home-feature__mock-dots {
  position: absolute;
  inset: auto var(--space-lg) var(--space-lg) auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cx-home-feature__mock-dots span {
  display: block;
  width: 3rem;
  height: 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.cx-home-feature__visual--wheel {
  padding: var(--space-xl);
}

.cx-home-feature__mock-wheel {
  width: min(220px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
  box-shadow: inset 0 0 0 12px var(--bg-elevated), var(--shadow-md);
}

.cx-home-feature__visual--chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
  padding: var(--space-md);
  align-content: start;
}

.cx-home-feature__chart-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.cx-home-feature__visual--names {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.cx-home-feature__name-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--bg-border);
  align-items: center;
}

.cx-home-feature__name-row:nth-child(odd) {
  background: var(--bg-surface);
}

.cx-home-feature__name-row span:last-child {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.cx-home-feature__visual--library {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md);
}

.cx-home-feature__lib-cell {
  aspect-ratio: 0.85;
  border-radius: var(--radius-sm);
}

.cx-home-feature__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin: 0 0 var(--space-sm);
}

.cx-home-feature h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
}

.cx-home-feature p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 var(--space-lg);
  max-width: 48ch;
}

.cx-home-feature__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.cx-home-feature__cta:hover {
  color: var(--brand-accent);
}

/* —— Prose + common colors table —— */

.cx-home-edu {
  padding: var(--space-3xl) 0;
}

.cx-home-edu h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-lg);
}

.cx-home-edu h3 {
  font-size: 1.15rem;
  margin: var(--space-xl) 0 var(--space-md);
}

.cx-home-edu p {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 65ch;
  margin-bottom: var(--space-md);
}

.cx-home-edu__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.cx-home-edu__swatch {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.cx-home-edu__swatch:hover {
  transform: scale(1.08);
}

.cx-home-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-border);
}

.cx-home-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cx-home-table th,
.cx-home-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--bg-border);
}

.cx-home-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.cx-home-table tbody tr {
  transition: background var(--transition-fast);
}

.cx-home-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.04);
}

.cx-home-table tr:last-child td {
  border-bottom: none;
}

/* —— Full tool grid (compact cards) —— */

.cx-home-palettes,
.cx-home-shades,
.cx-home-tech,
.cx-home-brands,
.cx-home-cars,
.cx-home-gaming,
.cx-home-dev,
.cx-home-culture {
  padding: var(--space-2xl) 0;
  position: relative;
}

.cx-home-palettes::before,
.cx-home-shades::before,
.cx-home-learn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 720px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.35), transparent);
}

.cx-home-tool-card {
  position: relative;
  overflow: hidden;
}

.cx-home-tool-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.5), rgba(236, 72, 153, 0.4), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.cx-home-tool-card:hover::after {
  opacity: 1;
}

.cx-home-tools {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--bg-border);
  background:
    linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.03)),
    var(--bg-surface);
}

.cx-home-tools__head {
  margin-bottom: var(--space-xl);
}

.cx-home-tools__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.cx-home-tool-card {
  min-height: 100%;
}

.cx-home-tool-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.cx-home-tool-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.cx-home-tool-card .cx-tool-card__icon {
  font-size: 1.35rem;
  margin-bottom: var(--space-sm);
}

.cx-home-table__color {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cx-home-table__dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.cx-home-table button.cx-code-chip {
  font-size: 0.8rem;
}

/* —— Quick links band —— */

.cx-home-quick {
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: var(--bg-base);
}

.cx-home-quick__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.cx-home-quick a {
  display: block;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, transparent 55%),
    var(--bg-surface);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.cx-home-quick a::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.65), rgba(6, 182, 212, 0.55), transparent);
  opacity: 0.8;
}

.cx-home-quick a:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.cx-home-quick a span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.cx-home-section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.cx-home-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.0), rgba(124, 58, 237, 0.55), rgba(236, 72, 153, 0.45), rgba(6, 182, 212, 0.45), rgba(245, 158, 11, 0.0));
}

.cx-home-section-lead {
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: var(--space-xl);
}

.cx-home .cx-faq {
  padding-bottom: var(--space-3xl);
}
