/* Curate My Colors — project styles. */

:root {
  /* Brand palette (see product brief §15). */
  --cmc-terracotta: #d16b48;
  --cmc-terracotta-soft: #e08e72;
  --cmc-olive: #8c9f68;
  --cmc-olive-soft: #aebb8f;
  --cmc-gold: #f4a261;
  --cmc-off-white: #faf7f0;
  --cmc-charcoal: #1f1f1f;
  --cmc-soft-black: #2a2927;
  --cmc-warm-grey: #d8d1c7;
  --cmc-muted-sand: #efe4d3;

  --cmc-text: var(--cmc-charcoal);
  --cmc-text-muted: #6c655d;
  --cmc-border: #e7e1d6;
  --cmc-shadow: 0 6px 20px rgba(31, 31, 31, 0.06);
  --cmc-radius: 14px;
  --cmc-radius-sm: 8px;
  --cmc-navbar-height: 64px;
  --cmc-nav-offset: 88px;
  --cmc-nav-offset-mobile: 76px;

  /* Translucent glass surfaces (sticky navbar + ownership pill). */
  --cmc-glass-bg: rgba(250, 247, 240, 0.72);
  --cmc-glass-bg-opaque: rgba(250, 247, 240, 0.95);
  --cmc-glass-filter: blur(14px) saturate(1.2);

  --bs-body-bg: var(--cmc-off-white);
  --bs-body-color: var(--cmc-text);
  --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI",
    sans-serif;
}

html,
body {
  font-family: var(--bs-body-font-family);
  background: var(--cmc-off-white);
  color: var(--cmc-text);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cmc-charcoal);
}

a {
  color: var(--cmc-terracotta);
  text-decoration: none;
}
a:hover {
  color: var(--cmc-terracotta-soft);
}

/* Top navigation. */
.cmc-navbar {
  background: var(--cmc-off-white);
  border-bottom: 1px solid var(--cmc-border);
  padding: 0.85rem 0;
  position: relative;
  z-index: 100;
}
.cmc-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.cmc-brand .brand-curate { color: var(--cmc-terracotta); }
.cmc-brand .brand-my { color: var(--cmc-charcoal); }
.cmc-brand .brand-colors { color: var(--cmc-olive); }

.cmc-nav-link {
  color: var(--cmc-charcoal);
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: background 120ms ease, color 120ms ease;
}
.cmc-nav-link:hover { background: var(--cmc-muted-sand); color: var(--cmc-charcoal); }
.cmc-nav-link.active { background: var(--cmc-charcoal); color: var(--cmc-off-white); }

/* Buttons. */
.btn-primary,
.btn-cmc-primary {
  --bs-btn-bg: var(--cmc-terracotta);
  --bs-btn-border-color: var(--cmc-terracotta);
  --bs-btn-hover-bg: #b75a3b;
  --bs-btn-hover-border-color: #b75a3b;
  --bs-btn-active-bg: #a04f33;
  --bs-btn-active-border-color: #a04f33;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
}

.btn-cmc-secondary {
  background: transparent;
  color: var(--cmc-charcoal);
  border: 1px solid var(--cmc-border);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 500;
  transition: background 120ms ease;
}
.btn-cmc-secondary:hover { background: var(--cmc-muted-sand); }

.btn-cmc-ghost {
  background: transparent;
  border: none;
  color: var(--cmc-text-muted);
  font-weight: 500;
}
.btn-cmc-ghost:hover { color: var(--cmc-charcoal); }

/* Cards. */
.cmc-card {
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  box-shadow: var(--cmc-shadow);
  overflow: hidden;
}
.cmc-card-body { padding: 1rem 1.1rem; }

/* Color swatches. */
.cmc-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--cmc-radius-sm);
  border: 1px solid var(--cmc-border);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.5rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.cmc-swatch--sm { aspect-ratio: 1 / 1; height: 22px; width: 22px; padding: 0; }
.cmc-swatch--lg { height: 110px; width: 100%; }

/* Status pills. */
.cmc-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--cmc-muted-sand);
  color: var(--cmc-charcoal);
}
.cmc-pill--ready { background: var(--cmc-olive); color: #fff; }
.cmc-pill--almost { background: var(--cmc-gold); color: var(--cmc-charcoal); }
.cmc-pill--missing { background: var(--cmc-warm-grey); color: var(--cmc-charcoal); }

/* Back link. */
.cmc-back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--cmc-soft-black);
  opacity: 0.7;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: opacity 150ms ease;
}
.cmc-back-link:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .cmc-back-link { transition: none; }
}

/* Inspiration grid. */
.cmc-inspiration-grid {
  column-count: 2;
  column-gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .cmc-inspiration-grid { column-count: 3; }
}
@media (min-width: 992px) {
  .cmc-inspiration-grid { column-count: 4; }
}

/* Inspiration card. */
.cmc-inspiration-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  break-inside: avoid;
  position: relative;
  border-radius: var(--cmc-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cmc-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.cmc-inspiration-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31, 31, 31, 0.08);
}
.cmc-inspiration-card__image {
  width: 100%;
  height: auto;
  display: block;
}
.cmc-inspiration-card__pieces {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--cmc-radius-sm);
  backdrop-filter: blur(4px);
  max-width: calc(100% - 1rem);
}
@media (prefers-reduced-motion: reduce) {
  .cmc-inspiration-card { transition: none; }
  .cmc-inspiration-card:hover { transform: none; }
}

/* Closet sections / family sub-groups. */
.cmc-closet-section { margin-top: 2.5rem; }
.cmc-closet-section__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--cmc-charcoal);
}
.cmc-closet-family { margin-bottom: 1.25rem; }
.cmc-closet-family__heading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--cmc-charcoal);
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
  transition: opacity 150ms ease;
}
.cmc-closet-family__heading:hover { opacity: 0.7; }
.cmc-closet-family__name {
  font-size: 0.92rem;
  font-weight: 600;
}
.cmc-closet-family__chev {
  font-size: 0.85rem;
  opacity: 0.5;
}
.cmc-closet-family__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: 1.5rem;
}
@media (prefers-reduced-motion: reduce) {
  .cmc-closet-family__heading { transition: none; }
}

/* Stat strip. */
.cmc-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.75rem;
}
.cmc-stat-strip__item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.cmc-stat-strip__value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
}
.cmc-stat-strip__label {
  font-size: 0.85rem;
  color: var(--cmc-soft-black);
  opacity: 0.7;
}

/* Closet toggle. */
.cmc-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--cmc-border);
  background: #fff;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--cmc-charcoal);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.cmc-toggle-pill:hover { transform: translateY(-1px); }
.cmc-toggle-pill[data-owned="true"] {
  background: var(--cmc-muted-sand);
  border-color: var(--cmc-olive);
}
.cmc-toggle-pill__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.cmc-toggle-pill__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--cmc-charcoal);
}
.cmc-toggle-pill__count {
  font-size: 0.72rem;
  color: var(--cmc-soft-black);
  opacity: 0.65;
  padding: 0 0.25rem;
}
.cmc-toggle-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cmc-muted-sand);
  color: var(--cmc-charcoal);
  font-size: 0.85rem;
  line-height: 1;
}
.cmc-toggle-pill[data-owned="true"] .cmc-toggle-pill__icon {
  background: var(--cmc-olive);
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .cmc-toggle-pill { transition: none; }
  .cmc-toggle-pill:hover { transform: none; }
}

/* Page chrome. */
.cmc-page-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 1.25rem 0 0.25rem;
}
.cmc-page-sub {
  color: var(--cmc-text-muted);
  margin-bottom: 1.5rem;
}

/* Toast. */
.cmc-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cmc-charcoal);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  z-index: 1080;
  opacity: 0;
  transition: opacity 200ms ease, transform 220ms ease;
  pointer-events: none;
}
.cmc-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Form pieces. */
.form-control, .form-select {
  border-radius: var(--cmc-radius-sm);
  border-color: var(--cmc-border);
  padding: 0.6rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cmc-terracotta);
  box-shadow: 0 0 0 0.2rem rgba(209, 107, 72, 0.15);
}

/* Empty state. */
.cmc-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cmc-text-muted);
}
.cmc-empty h3 { color: var(--cmc-charcoal); margin-bottom: 0.4rem; }

/* Mobile nav menu — teleported to <body>, fixed-positioned below the navbar. */
.cmc-mobile-menu {
  position: fixed;
  top: calc(var(--cmc-navbar-height) + 8px);
  left: 8px;
  right: 8px;
  background: var(--cmc-glass-bg);
  -webkit-backdrop-filter: var(--cmc-glass-filter);
  backdrop-filter: var(--cmc-glass-filter);
  border: 1px solid rgba(31, 31, 31, 0.06);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(31, 31, 31, 0.12);
  padding: 1rem 0;
  z-index: 1040;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cmc-mobile-menu { background: var(--cmc-glass-bg-opaque); }
}

/* Alpine.js — hide x-cloak elements until Alpine initialises. */
[x-cloak] { display: none !important; }

/* Legacy alert overrides (cookiecutter defaults). */
.alert-debug { color: black; background-color: white; border-color: #d6e9c6; }
.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Sticky pill navbar.
   At top: full-width edge-to-edge. After scrolling past 80px, morphs into a
   floating translucent pill with backdrop blur. */
.cmc-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    top 280ms cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 280ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 280ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),
    padding 280ms cubic-bezier(0.4, 0, 0.2, 1),
    max-width 280ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 280ms cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
  max-width: 100%;
  border-radius: 0;
}

.cmc-navbar.is-scrolled {
  top: 12px;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 999px;
  background-color: var(--cmc-glass-bg);
  -webkit-backdrop-filter: var(--cmc-glass-filter);
  backdrop-filter: var(--cmc-glass-filter);
  border: 1px solid rgba(31, 31, 31, 0.06);
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.08);
  padding: 0.5rem 1.25rem;
}

/* Fallback for browsers without backdrop-filter support. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cmc-navbar.is-scrolled {
    background-color: var(--cmc-glass-bg-opaque);
  }
}

/* Mobile: hug the edges, smaller float offset. */
@media (max-width: 767.98px) {
  .cmc-navbar.is-scrolled {
    top: 8px;
    max-width: calc(100% - 16px);
    padding: 0.5rem 1rem;
  }
}

/* Reduced motion: keep styling, drop the transition. */
@media (prefers-reduced-motion: reduce) {
  .cmc-navbar {
    transition: none;
  }
}

/* Pill variant — inverse (terracotta filled). */
.cmc-pill--inverse {
  background: var(--cmc-terracotta);
  color: #fff;
  font-size: 0.7rem;
}

/* Sections — shared. */
.cmc-section {
  padding: 4rem 0;
  scroll-margin-top: calc(var(--cmc-navbar-height) + 36px);
}
.cmc-section-header {
  margin-bottom: 2rem;
}
.cmc-section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.5rem;
}
.cmc-section-subtitle {
  color: var(--cmc-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Hero. */
.cmc-hero {
  padding: 4rem 0 3rem;
}
.cmc-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 992px) {
  .cmc-hero-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}
.cmc-hero-headline {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 1rem 0;
}
.cmc-hero-subhead {
  color: var(--cmc-text-muted);
  font-size: 1.125rem;
  max-width: 480px;
  margin-bottom: 1.5rem;
}
.cmc-hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Problem section. */
.cmc-problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .cmc-problem-grid { grid-template-columns: repeat(3, 1fr); }
}
.cmc-problem-item {
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 1.5rem;
}
.cmc-problem-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.cmc-problem-item p { color: var(--cmc-text-muted); margin: 0; }

/* Step cards. */
.cmc-step-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  position: relative;
}
@media (min-width: 768px) {
  .cmc-step-grid { grid-template-columns: repeat(3, 1fr); }
}
.cmc-step-card {
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 1.75rem;
  box-shadow: var(--cmc-shadow);
}
.cmc-step-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cmc-terracotta);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.cmc-step-title { font-size: 1.15rem; margin: 0 0 0.5rem; }
.cmc-step-body { color: var(--cmc-text-muted); margin: 0; }

/* Demo palette strip — horizontally scrollable row with hidden scrollbar
   and soft side-fades so cards appear to drift in/out of view. */
.cmc-demo-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 2rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Soft fade on left and right edges */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0,
    #000 5%,
    #000 95%,
    transparent 100%);
          mask-image: linear-gradient(to right,
    transparent 0,
    #000 5%,
    #000 95%,
    transparent 100%);
  /* Hide scrollbar */
  scrollbar-width: none;
}
.cmc-demo-grid::-webkit-scrollbar { display: none; }
.cmc-demo-grid > * {
  flex: 0 0 380px;
  min-height: 200px;
  scroll-snap-align: center;
}
@media (max-width: 600px) {
  .cmc-demo-grid > * { flex-basis: 300px; }
  .cmc-demo-grid { padding: 0.5rem 1rem 1.5rem; }
}

/* Feature grid. */
.cmc-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .cmc-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
.cmc-feature-card {
  display: flex;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 1.25rem;
  box-shadow: var(--cmc-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.cmc-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(31, 31, 31, 0.1);
}
.cmc-feature-card-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  transition: transform 200ms ease;
}
.cmc-feature-card:hover .cmc-feature-card-icon { transform: scale(1.1); }
.cmc-feature-card-title { font-size: 1.05rem; margin: 0 0 0.25rem; }
.cmc-feature-card-body { color: var(--cmc-text-muted); margin: 0; font-size: 0.95rem; }

/* Comparison. */
.cmc-comparison {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  overflow: hidden;
}
.cmc-comparison-headerrow,
.cmc-comparison-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cmc-border);
}
.cmc-comparison-row:last-child { border-bottom: none; }
.cmc-comparison-headerrow {
  background: var(--cmc-muted-sand);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cmc-comparison-label { font-weight: 500; }
.cmc-comparison-them { color: var(--cmc-text-muted); }
.cmc-comparison-us { color: var(--cmc-olive); font-weight: 500; }

/* Pricing. */
.cmc-pricing-wrap { max-width: 480px; margin: 0 auto; }
.cmc-pricing-card {
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--cmc-shadow);
}
.cmc-pricing-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.cmc-pricing-sub { color: var(--cmc-text-muted); margin: 0 0 1.5rem; }
.cmc-pricing-amounts {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.cmc-pricing-amount { text-align: center; }
.cmc-pricing-value { font-size: 2rem; font-weight: 700; }
.cmc-pricing-amount--yearly .cmc-pricing-value { color: var(--cmc-terracotta); }
.cmc-pricing-period { font-size: 0.85rem; color: var(--cmc-text-muted); }
.cmc-pricing-or { color: var(--cmc-text-muted); padding-bottom: 0.35rem; }
.cmc-pricing-features {
  text-align: left;
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 0 0 1.5rem;
  display: inline-block;
}
.cmc-pricing-features li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.cmc-pricing-features li::before {
  content: "✓";
  color: var(--cmc-olive);
  margin-right: 0.5rem;
}
.cmc-pricing-cta { margin-bottom: 0.5rem; }
.cmc-pricing-trial { font-size: 0.8rem; color: var(--cmc-text-muted); margin: 0; }

/* Upgrade / start-trial page. */
.cmc-upgrade { display: flex; justify-content: center; }
.cmc-upgrade-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: calc(var(--cmc-radius) + 4px);
  padding: 2.5rem 2rem 1.75rem;
  box-shadow: 0 18px 48px rgba(31, 31, 31, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cmc-upgrade-swatches {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.cmc-upgrade-swatches span {
  width: 34px;
  height: 8px;
  border-radius: 999px;
}
.cmc-upgrade-head { margin-bottom: 1.5rem; }
.cmc-upgrade-title {
  font-size: 1.9rem;
  line-height: 1.12;
  font-weight: 700;
  margin: 0.9rem 0 0.6rem;
}
.cmc-upgrade-sub {
  color: var(--cmc-text-muted);
  font-size: 0.95rem;
  margin: 0 auto;
  max-width: 34ch;
}

/* Segmented billing-interval control. */
.cmc-seg {
  display: inline-flex;
  background: var(--cmc-muted-sand);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 1.25rem;
}
.cmc-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--cmc-text-muted);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}
.cmc-seg__btn.is-active {
  background: #fff;
  color: var(--cmc-charcoal);
  box-shadow: 0 2px 8px rgba(31, 31, 31, 0.1);
}
.cmc-seg__badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cmc-olive);
  background: rgba(140, 159, 104, 0.16);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.cmc-upgrade-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
}
.cmc-upgrade-price__value {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cmc-upgrade-price__period { color: var(--cmc-text-muted); font-weight: 500; }
.cmc-upgrade-billnote {
  color: var(--cmc-text-muted);
  font-size: 0.82rem;
  margin: 0.35rem 0 1.4rem;
}

.cmc-upgrade-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  text-align: left;
  display: inline-block;
}
.cmc-upgrade-benefits li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  color: var(--cmc-charcoal);
}
.cmc-upgrade-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: rgba(140, 159, 104, 0.18);
}
.cmc-upgrade-benefits li::after {
  content: "✓";
  position: absolute;
  left: 0.27rem;
  top: 0.02em;
  color: var(--cmc-olive);
  font-size: 0.72rem;
  font-weight: 700;
}
.cmc-upgrade-form { margin: 0; }
.cmc-upgrade-cta {
  width: 100%;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  font-size: 1rem;
}
.cmc-upgrade-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--cmc-text-muted);
  font-size: 0.78rem;
  margin: 1rem 0 0;
}
.cmc-upgrade-trust svg { color: var(--cmc-olive); flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .cmc-seg__btn { transition: none; }
}

/* FAQ. */
.cmc-faq-wrap { max-width: 760px; margin: 0 auto; }
.cmc-faq-item {
  border: 1px solid var(--cmc-border) !important;
  border-radius: var(--cmc-radius-sm) !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.cmc-faq-button {
  font-weight: 500;
  background: var(--cmc-off-white) !important;
}
.cmc-faq-body {
  font-size: 0.95rem;
  color: var(--cmc-text-muted);
}

/* CTA band. */
.cmc-cta-band {
  background: linear-gradient(135deg, var(--cmc-terracotta), var(--cmc-terracotta-soft));
  color: #fff;
  padding: 4rem 0;
  margin-top: 3rem;
}
.cmc-cta-headline {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.cmc-cta-subtext { color: rgba(255, 255, 255, 0.92); margin-bottom: 1.5rem; }
.cmc-cta-buttons { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.cmc-cta-band .btn-cmc-primary { background: #fff; color: var(--cmc-terracotta); border-color: #fff; }
.cmc-cta-band .btn-cmc-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cmc-cta-band .btn-cmc-secondary:hover { background: rgba(255, 255, 255, 0.1); }

/* Footer. */
.cmc-footer {
  background: var(--cmc-charcoal);
  color: var(--cmc-warm-grey);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.cmc-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
  .cmc-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.cmc-footer-brand .cmc-brand { font-size: 1.2rem; }
.cmc-footer-brand .brand-my { color: var(--cmc-off-white); }
.cmc-footer-tagline {
  margin: 0.75rem 0 1rem;
  color: var(--cmc-warm-grey);
  font-size: 0.9rem;
}
.cmc-footer-social { display: flex; gap: 0.5rem; }
.cmc-footer-social-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: var(--cmc-warm-grey);
  transition: background 150ms ease, color 150ms ease;
}
.cmc-footer-social-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.cmc-footer-heading {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.cmc-footer-list { list-style: none; padding: 0; margin: 0; }
.cmc-footer-list li { margin-bottom: 0.5rem; }
.cmc-footer-list a {
  color: var(--cmc-warm-grey);
  font-size: 0.9rem;
  transition: color 120ms ease;
}
.cmc-footer-list a:hover { color: #fff; }
.cmc-footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
  .cmc-footer-newsletter { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cmc-footer-newsletter-copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--cmc-warm-grey);
}
.cmc-footer-newsletter-icon { font-size: 1.2rem; }
.cmc-newsletter-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.cmc-newsletter-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  min-width: 240px;
  font-family: inherit;
}
.cmc-newsletter-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.cmc-newsletter-input:focus { outline: 2px solid var(--cmc-terracotta); outline-offset: 1px; }
.cmc-newsletter-error {
  color: var(--cmc-gold);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
  flex-basis: 100%;
}
.cmc-newsletter-success {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  background: rgba(140, 159, 104, 0.25);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 500;
}
.cmc-newsletter-success-icon { color: var(--cmc-olive-soft); }
.cmc-footer-bottom { padding-top: 1.5rem; text-align: center; }
.cmc-footer-copyright { color: var(--cmc-warm-grey); font-size: 0.85rem; margin: 0; }

/* Legal + contact pages. */
.cmc-legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0;
}
.cmc-legal-page h2 { margin-top: 2rem; }
.cmc-legal-page p, .cmc-legal-page li { color: var(--cmc-text-muted); }
.cmc-contact-page { max-width: 600px; margin: 0 auto; padding: 4rem 0; }

/* Unsubscribe page. */
.cmc-unsubscribe-page {
  max-width: 480px;
  margin: 4rem auto;
  text-align: center;
}

/* Scroll-triggered section reveals. */
.cmc-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.cmc-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .cmc-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Staggered children inside a revealing section. */
.cmc-section .cmc-step-card,
.cmc-section .cmc-feature-card,
.cmc-section .cmc-bubble-card,
.cmc-section .cmc-comparison-row,
.cmc-section .cmc-problem-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.cmc-section.is-visible .cmc-step-card,
.cmc-section.is-visible .cmc-feature-card,
.cmc-section.is-visible .cmc-bubble-card,
.cmc-section.is-visible .cmc-comparison-row,
.cmc-section.is-visible .cmc-problem-item {
  opacity: 1;
  transform: translateY(0);
}
.cmc-section.is-visible .cmc-feature-card:nth-child(1) { transition-delay:   0ms; }
.cmc-section.is-visible .cmc-feature-card:nth-child(2) { transition-delay: 100ms; }
.cmc-section.is-visible .cmc-feature-card:nth-child(3) { transition-delay: 200ms; }
.cmc-section.is-visible .cmc-feature-card:nth-child(4) { transition-delay: 300ms; }
.cmc-section.is-visible .cmc-feature-card:nth-child(5) { transition-delay: 400ms; }
.cmc-section.is-visible .cmc-feature-card:nth-child(6) { transition-delay: 500ms; }

.cmc-section.is-visible .cmc-step-card:nth-child(1) { transition-delay:   0ms; }
.cmc-section.is-visible .cmc-step-card:nth-child(2) { transition-delay: 100ms; }
.cmc-section.is-visible .cmc-step-card:nth-child(3) { transition-delay: 200ms; }

.cmc-section.is-visible .cmc-bubble-card:nth-child(1) { transition-delay:   0ms; }
.cmc-section.is-visible .cmc-bubble-card:nth-child(2) { transition-delay:  60ms; }
.cmc-section.is-visible .cmc-bubble-card:nth-child(3) { transition-delay: 120ms; }
.cmc-section.is-visible .cmc-bubble-card:nth-child(4) { transition-delay: 180ms; }
.cmc-section.is-visible .cmc-bubble-card:nth-child(5) { transition-delay: 240ms; }
.cmc-section.is-visible .cmc-bubble-card:nth-child(6) { transition-delay: 300ms; }

.cmc-section.is-visible .cmc-comparison-row:nth-child(1) { transition-delay:   0ms; }
.cmc-section.is-visible .cmc-comparison-row:nth-child(2) { transition-delay:  60ms; }
.cmc-section.is-visible .cmc-comparison-row:nth-child(3) { transition-delay: 120ms; }
.cmc-section.is-visible .cmc-comparison-row:nth-child(4) { transition-delay: 180ms; }
.cmc-section.is-visible .cmc-comparison-row:nth-child(5) { transition-delay: 240ms; }
.cmc-section.is-visible .cmc-comparison-row:nth-child(6) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .cmc-section .cmc-step-card,
  .cmc-section .cmc-feature-card,
  .cmc-section .cmc-bubble-card,
  .cmc-section .cmc-comparison-row,
  .cmc-section .cmc-problem-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Hero entrance — runs on page load. */
@keyframes cmc-hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cmc-hero-copy .cmc-pill,
.cmc-hero-copy .cmc-hero-headline,
.cmc-hero-copy .cmc-hero-subhead,
.cmc-hero-copy .cmc-hero-ctas,
.cmc-hero-visual {
  animation: cmc-hero-rise 500ms ease-out both;
}
.cmc-hero-copy .cmc-pill           { animation-delay:   0ms; }
.cmc-hero-copy .cmc-hero-headline  { animation-delay:  80ms; }
.cmc-hero-copy .cmc-hero-subhead   { animation-delay: 160ms; }
.cmc-hero-copy .cmc-hero-ctas      { animation-delay: 240ms; }
.cmc-hero-visual                   { animation-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .cmc-hero-copy .cmc-pill,
  .cmc-hero-copy .cmc-hero-headline,
  .cmc-hero-copy .cmc-hero-subhead,
  .cmc-hero-copy .cmc-hero-ctas,
  .cmc-hero-visual {
    animation: none;
  }
}

/* Pricing card scale reveal. */
.cmc-section-pricing .cmc-pricing-card {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.cmc-section-pricing.is-visible .cmc-pricing-card {
  opacity: 1;
  transform: scale(1);
}

/* Pricing feature checks cascade in. */
.cmc-section-pricing .cmc-pricing-features li {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 350ms ease-out, transform 350ms ease-out;
}
.cmc-section-pricing.is-visible .cmc-pricing-features li {
  opacity: 1;
  transform: translateX(0);
}
.cmc-section-pricing.is-visible .cmc-pricing-features li:nth-child(1) { transition-delay: 200ms; }
.cmc-section-pricing.is-visible .cmc-pricing-features li:nth-child(2) { transition-delay: 250ms; }
.cmc-section-pricing.is-visible .cmc-pricing-features li:nth-child(3) { transition-delay: 300ms; }
.cmc-section-pricing.is-visible .cmc-pricing-features li:nth-child(4) { transition-delay: 350ms; }
.cmc-section-pricing.is-visible .cmc-pricing-features li:nth-child(5) { transition-delay: 400ms; }
.cmc-section-pricing.is-visible .cmc-pricing-features li:nth-child(6) { transition-delay: 450ms; }

/* Hover glow on price. */
.cmc-pricing-amount:hover .cmc-pricing-value {
  text-shadow: 0 0 24px rgba(209, 107, 72, 0.35);
  transition: text-shadow 250ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .cmc-section-pricing .cmc-pricing-card,
  .cmc-section-pricing .cmc-pricing-features li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* FAQ chevron — replace Bootstrap's default with a custom rotating chevron. */
.cmc-faq-button::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: auto;
  background: none !important;
  border-right: 2px solid var(--cmc-charcoal);
  border-bottom: 2px solid var(--cmc-charcoal);
  transform: rotate(45deg);
  transition: transform 250ms ease-out;
}
.cmc-faq-button:not(.collapsed)::after {
  transform: rotate(-135deg);
}

/* Hover tint on FAQ question buttons. */
.cmc-faq-button:hover {
  background: var(--cmc-muted-sand) !important;
}

@media (prefers-reduced-motion: reduce) {
  .cmc-faq-button::after {
    transition: none;
  }
}

/* CTA band button ripple — Alpine flips a class on click. */
.cmc-cta-btn {
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.cmc-cta-btn.is-rippled {
  animation: cmc-cta-pulse 400ms ease-out;
}
@keyframes cmc-cta-pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
  60%  { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .cmc-cta-btn.is-rippled { animation: none; }
}

/* Smooth scroll for anchor links. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   Bubble palette card
   ============================================================ */
.cmc-bubble-card {
  display: flex;
  align-items: stretch;
  background: #FFFFFF;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  min-height: 168px;
  box-shadow: 0 1px 2px rgba(31, 31, 31, 0.04);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform 260ms cubic-bezier(.25,.46,.45,.94),
              box-shadow 260ms ease,
              border-color 260ms ease;
}
.cmc-bubble-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(31, 31, 31, 0.10);
  border-color: rgba(31, 31, 31, 0.14);
  color: inherit;
}
.cmc-bubble-card__info {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.cmc-bubble-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
  margin: 0;
  line-height: 1.2;
}
.cmc-bubble-card__pieces {
  font-size: 0.78rem;
  color: #6E6A63;
  margin: 0.15rem 0 0;
}
.cmc-bubble-card__meta {
  font-size: 0.78rem;
  color: #6E6A63;
  margin: 0.6rem 0 0.55rem;
}
.cmc-bubble-card__meta strong { color: var(--cmc-charcoal); }
.cmc-bubble-card__stage {
  flex: 1 1 50%;
  position: relative;
  min-height: 140px;
}

/* Wrapper carries hover translate; inner .cmc-bub carries idle float */
.cmc-bub-wrap {
  position: absolute;
  transition: transform 600ms cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.cmc-bub {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(31, 31, 31, 0.08),
              inset 0 -4px 10px rgba(0, 0, 0, 0.06);
}
.cmc-bub--cream { border: 1px solid rgba(31, 31, 31, 0.08); }

/* Cluster positions */
.cmc-bub-wrap--1 { width: 76px; height: 76px; top: 14px; left: 14px; }
.cmc-bub-wrap--2 { width: 60px; height: 60px; top: 46px; left: 64px; }
.cmc-bub-wrap--3 { width: 52px; height: 52px; top: 80px; left: 28px; }

@keyframes cmc-float-a { 0%, 100% { transform: translate(0, 0); }  50% { transform: translate(0, -6px); } }
@keyframes cmc-float-b { 0%, 100% { transform: translate(0, 0); }  50% { transform: translate(-4px, 4px); } }
@keyframes cmc-float-c { 0%, 100% { transform: translate(0, 0); }  50% { transform: translate(4px, -5px); } }

.cmc-bub-wrap--1 .cmc-bub { animation: cmc-float-a 6s ease-in-out infinite; }
.cmc-bub-wrap--2 .cmc-bub { animation: cmc-float-b 7s ease-in-out infinite; }
.cmc-bub-wrap--3 .cmc-bub { animation: cmc-float-c 8s ease-in-out infinite; }

/* Hover disperse (gentle, ~5-9px outward) */
.cmc-bubble-card:hover .cmc-bub-wrap--1 { transform: translate(-5px, -7px); }
.cmc-bubble-card:hover .cmc-bub-wrap--2 { transform: translate( 9px,  3px); }
.cmc-bubble-card:hover .cmc-bub-wrap--3 { transform: translate(-4px,  7px); }

@media (prefers-reduced-motion: reduce) {
  .cmc-bub-wrap--1 .cmc-bub,
  .cmc-bub-wrap--2 .cmc-bub,
  .cmc-bub-wrap--3 .cmc-bub { animation: none; }
  .cmc-bubble-card:hover .cmc-bub-wrap--1,
  .cmc-bubble-card:hover .cmc-bub-wrap--2,
  .cmc-bubble-card:hover .cmc-bub-wrap--3 { transform: none; }
}

/* ============================================================
   Bubble hero (home page) — mirrors palette_bubble_card layout
   (info on left, bubble cluster on right), scaled up.
   ============================================================ */
.cmc-bubble-hero {
  display: flex;
  align-items: stretch;
  position: relative;
  min-height: 360px;
  background: #FFFFFF;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.06);
}
.cmc-bubble-hero__info {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem 1.75rem 2rem;
  min-width: 0;
}
.cmc-bubble-hero__eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6E6A63;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.cmc-bubble-hero__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.cmc-bubble-hero__mood {
  font-size: 0.88rem;
  color: #6E6A63;
  margin: 0.6rem 0 0;
  max-width: 28ch;
  line-height: 1.45;
}
.cmc-bubble-hero__stage {
  flex: 1 1 50%;
  position: relative;
  min-height: 320px;
}
.cmc-bubble-hero .cmc-bub {
  transition: background-color 600ms ease;
}
.cmc-bubble-hero__wrap--1 { width: 150px; height: 150px; top: 30px; left: 20px; }
.cmc-bubble-hero__wrap--2 { width: 110px; height: 110px; top: 110px; left: 150px; }
.cmc-bubble-hero__wrap--3 { width:  95px; height:  95px; top: 195px; left:  60px; }
.cmc-bubble-hero__wrap--1 .cmc-bub { animation: cmc-float-a 6s ease-in-out infinite; }
.cmc-bubble-hero__wrap--2 .cmc-bub { animation: cmc-float-b 7s ease-in-out infinite; }
.cmc-bubble-hero__wrap--3 .cmc-bub { animation: cmc-float-c 8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .cmc-bubble-hero__wrap--1 .cmc-bub,
  .cmc-bubble-hero__wrap--2 .cmc-bub,
  .cmc-bubble-hero__wrap--3 .cmc-bub { animation: none; }
}

@media (max-width: 768px) {
  .cmc-bubble-hero { min-height: 260px; }
  .cmc-bubble-hero__info { padding: 1.25rem 1.25rem 1.25rem 1.5rem; }
  .cmc-bubble-hero__name { font-size: 1.2rem; }
  .cmc-bubble-hero__stage { min-height: 220px; }
  .cmc-bubble-hero__wrap--1 { width: 110px; height: 110px; top: 18px; left: 14px; }
  .cmc-bubble-hero__wrap--2 { width:  82px; height:  82px; top: 78px; left: 100px; }
  .cmc-bubble-hero__wrap--3 { width:  70px; height:  70px; top: 138px; left: 40px; }
}

/* ============================================================
   Explore page chrome
   ============================================================ */
.cmc-explore-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.cmc-explore-title {
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
  margin: 0.6rem 0 0.3rem;
  letter-spacing: -0.01em;
}
.cmc-explore-sub {
  font-size: 0.95rem;
  color: #6E6A63;
  margin: 0;
  max-width: 540px;
}
.cmc-explore-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 1.8rem;
  margin-top: 1.2rem;
}
.cmc-explore-stat { font-size: 0.78rem; color: #6E6A63; }
.cmc-explore-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--cmc-charcoal);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.18rem;
}
@media (max-width: 600px) {
  .cmc-explore-stats { gap: 0.9rem; }
  .cmc-explore-stat { font-size: 0.7rem; }
  .cmc-explore-stat strong { font-size: 1.2rem; }
}

/* Chip filter rows */
/* Row: fixed-width label + horizontally scrollable chip track */
.cmc-chip-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cmc-chip-row + .cmc-chip-row { margin-top: 0.5rem; }
.cmc-chip-track {
  display: flex;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.5rem 0.25rem 0;
  /* Subtle right-edge fade so the visual cue that more chips exist
     beyond the viewport is present whenever the track is scrollable. */
  -webkit-mask-image: linear-gradient(to right,
    #000 0,
    #000 calc(100% - 32px),
    transparent 100%);
          mask-image: linear-gradient(to right,
    #000 0,
    #000 calc(100% - 32px),
    transparent 100%);
}
.cmc-chip-track::-webkit-scrollbar { display: none; }
.cmc-chip { flex-shrink: 0; }
.cmc-chip-group-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6E6A63;
  font-weight: 600;
  margin-right: 0.4rem;
  width: 4rem;
  flex-shrink: 0;
}
.cmc-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: #FFFFFF;
  border: 1px solid rgba(31, 31, 31, 0.10);
  color: var(--cmc-charcoal);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.cmc-chip:hover { border-color: rgba(31, 31, 31, 0.25); }
.cmc-chip.is-active {
  background: var(--cmc-charcoal);
  color: #FFFFFF;
  border-color: var(--cmc-charcoal);
}
/* x-cloak: hide elements until Alpine hydrates */
[x-cloak] { display: none !important; }

/* Section header with eyebrow dot */
.cmc-section-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 1.8rem 0 0.6rem;
}
.cmc-section-eyebrow {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cmc-terracotta);
  display: inline-block;
}
.cmc-section-eyebrow--ready { background: #4F6B36; }
.cmc-section-eyebrow--almost { background: var(--cmc-terracotta); }
.cmc-section-eyebrow--building { background: #6E6A63; }
.cmc-section-row__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
  margin: 0;
}
.cmc-section-row__count {
  font-size: 0.85rem;
  color: #6E6A63;
  font-weight: 500;
}

/* Card grid */
.cmc-bubble-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1099px) { .cmc-bubble-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .cmc-bubble-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 499px)  { .cmc-bubble-grid { grid-template-columns: 1fr; } }

/* Empty state */
.cmc-bubble-empty {
  background: #FFFFFF;
  border: 1px dashed rgba(31, 31, 31, 0.18);
  border-radius: 18px;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cmc-bubble-empty__stage {
  position: relative;
  height: 110px;
  margin: 0 auto 1.2rem;
  width: 200px;
}
.cmc-bubble-empty__bub {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  box-shadow: 0 4px 10px rgba(31, 31, 31, 0.06);
}
.cmc-bubble-empty__bub--1 { width: 54px; height: 54px; background: var(--cmc-olive); top: 6px; left: 24px; animation: cmc-float-a 6s ease-in-out infinite; }
.cmc-bubble-empty__bub--2 { width: 42px; height: 42px; background: var(--cmc-terracotta); top: 30px; left: 80px; animation: cmc-float-b 7s ease-in-out infinite; }
.cmc-bubble-empty__bub--3 { width: 36px; height: 36px; background: #22384F; top: 60px; left: 50px; animation: cmc-float-c 8s ease-in-out infinite; }
.cmc-bubble-empty__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
  margin: 0 0 0.3rem;
}
.cmc-bubble-empty__body {
  font-size: 0.92rem;
  color: #6E6A63;
  margin: 0 auto 1.2rem;
  max-width: 420px;
}
@media (prefers-reduced-motion: reduce) {
  .cmc-bubble-empty__bub--1,
  .cmc-bubble-empty__bub--2,
  .cmc-bubble-empty__bub--3 { animation: none; }
}

/* ─── Palette detail page ──────────────────────────────────────────── */

.cmc-palette-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, max-content) 220px;
  justify-content: start;
  align-items: start;
  gap: 1.5rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--cmc-border);
  margin-bottom: 0;
}
.cmc-palette-detail-hero__info {
  min-width: 0;
}
.cmc-palette-detail-hero__info > * + * { margin-top: 0.6rem; }
.cmc-palette-detail-hero__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cmc-text-muted);
  margin: 0;
}
.cmc-palette-detail-hero__display-name {
  color: var(--cmc-charcoal);
  font-size: 1rem;
  margin: 0.6rem 0 0;
}
.cmc-palette-detail-hero__mood {
  color: var(--cmc-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0.6rem 0 0;
  max-width: 38ch;
}
.cmc-palette-detail-hero__meta {
  color: var(--cmc-text-muted);
  font-size: 0.78rem;
  margin: 0.85rem 0 0;
}
.cmc-palette-detail-hero__stage {
  position: relative;
  width: 220px;
  height: 220px;
}
/* Sized bubbles for the detail hero — overrides the smaller card-sized
   .cmc-bub-wrap-- rules so the cluster reads as a signature on the right. */
.cmc-palette-detail-hero__stage .cmc-bub-wrap--1 {
  width: 110px;
  height: 110px;
  top: 8px;
  left: 16px;
}
.cmc-palette-detail-hero__stage .cmc-bub-wrap--2 {
  width: 86px;
  height: 86px;
  top: 70px;
  left: 110px;
}
.cmc-palette-detail-hero__stage .cmc-bub-wrap--3 {
  width: 74px;
  height: 74px;
  top: 138px;
  left: 50px;
}

@media (max-width: 768px) {
  .cmc-palette-detail-hero {
    grid-template-columns: minmax(0, max-content) 170px;
    gap: 1rem;
    padding: 0.75rem 0 1rem;
  }
  .cmc-palette-detail-hero__stage {
    width: 170px;
    height: 170px;
  }
  .cmc-palette-detail-hero__stage .cmc-bub-wrap--1 {
    width: 82px;
    height: 82px;
    top: 6px;
    left: 12px;
  }
  .cmc-palette-detail-hero__stage .cmc-bub-wrap--2 {
    width: 64px;
    height: 64px;
    top: 52px;
    left: 82px;
  }
  .cmc-palette-detail-hero__stage .cmc-bub-wrap--3 {
    width: 56px;
    height: 56px;
    top: 102px;
    left: 38px;
  }
}

@media (max-width: 480px) {
  .cmc-palette-detail-hero {
    grid-template-columns: minmax(0, max-content) 130px;
    gap: 0.5rem;
  }
  .cmc-palette-detail-hero__stage {
    width: 130px;
    height: 130px;
  }
  .cmc-palette-detail-hero__stage .cmc-bub-wrap--1 {
    width: 62px;
    height: 62px;
    top: 4px;
    left: 8px;
  }
  .cmc-palette-detail-hero__stage .cmc-bub-wrap--2 {
    width: 48px;
    height: 48px;
    top: 38px;
    left: 62px;
  }
  .cmc-palette-detail-hero__stage .cmc-bub-wrap--3 {
    width: 42px;
    height: 42px;
    top: 76px;
    left: 28px;
  }
}

/* ============================================
   Import page
   ============================================ */

.cmc-section-import {
  padding: 4rem 0;
}

.cmc-import-card {
  max-width: 540px;
  background: #fff;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  box-shadow: var(--cmc-shadow);
  padding: 2rem;
  margin-top: 2rem;
}

.cmc-import-toggle-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cmc-import-toggle {
  position: relative;
  display: inline-flex;
  gap: 0;
  background: var(--cmc-muted-sand);
  border-radius: 999px;
  padding: 0.25rem;
  width: 220px;  /* fixed width so each pill is exactly half */
}

.cmc-import-toggle-slider {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: calc(50% - 0.25rem);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(31, 31, 31, 0.08);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cmc-import-toggle[data-mode="url"] .cmc-import-toggle-slider {
  transform: translateX(100%);
}

.cmc-import-toggle-pill {
  position: relative;
  z-index: 1;
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.4rem 0;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--cmc-soft-black);
  text-align: center;
  transition: color 200ms ease;
}

.cmc-import-toggle-pill--active {
  color: var(--cmc-charcoal);
}

.cmc-import-form--centered {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cmc-import-form input[type="url"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius-sm);
  font-size: 0.95rem;
  background: #fff;
}

.cmc-import-form input[type="url"]:focus {
  outline: none;
  border-color: var(--cmc-terracotta);
  box-shadow: 0 0 0 3px rgba(209, 107, 72, 0.15);
}

.cmc-form-error {
  color: var(--cmc-terracotta);
  font-size: 0.875rem;
  margin: 0;
}

.cmc-supported-sources {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cmc-border);
}

.cmc-supported-label {
  font-size: 0.85rem;
  color: var(--cmc-soft-black);
  opacity: 0.75;
}

.cmc-supported-sources a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: transform 150ms ease, background 150ms ease;
}

.cmc-supported-sources a:hover {
  background: var(--cmc-muted-sand);
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .cmc-import-toggle-pill,
  .cmc-import-toggle-slider,
  .cmc-supported-sources a {
    transition: none;
  }
  .cmc-supported-sources a:hover {
    transform: none;
  }
}

/* Profile page */
.cmc-profile-section { padding: 4rem 0; }
.cmc-profile-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 720px;
  margin: 2rem auto 0;
}

.cmc-identity-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}
.cmc-identity-header__main { display: flex; flex-direction: column; gap: 0.15rem; }
.cmc-identity-header__meta { margin: 0; color: var(--cmc-soft-black); font-size: 0.85rem; opacity: 0.6; }

.cmc-card__title { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 600; }
.cmc-card__body { margin: 0; color: var(--cmc-soft-black); }

.cmc-newsletter-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}

.cmc-account-links { padding: 1.25rem 1.5rem; }
.cmc-link-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
}
.cmc-link-list__item + .cmc-link-list__item { border-top: 1px solid var(--cmc-border); }
.cmc-link-list__item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: var(--cmc-charcoal);
  text-decoration: none;
}
.cmc-link-list__item a:hover { color: var(--cmc-terracotta); }
.cmc-link-list__item span { color: var(--cmc-warm-grey); font-size: 1.2rem; }

.cmc-card--danger {
  background: #fff5f3;
  border: 1px solid #f4c4b8;
}

.cmc-card--pending {
  padding: 1.5rem 1.75rem;
}
.cmc-pending-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.cmc-pending-header__pill {
  display: inline-flex;
  align-items: center;
  background: rgba(244, 162, 97, 0.18);
  color: #8a5a25;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.cmc-pending-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.cmc-card--padded { padding: 1.75rem; }
.cmc-form { display: flex; flex-direction: column; gap: 1.1rem; }
.cmc-form__field { display: flex; flex-direction: column; gap: 0.35rem; }
.cmc-form__label {
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cmc-soft-black);
  opacity: 0.65;
  margin: 0;
}
.cmc-form__input {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--cmc-border);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  background: var(--cmc-off-white);
  width: 100%;
  max-width: 100%;
  transition: border-color 150ms ease, background 150ms ease;
}
.cmc-form__input:focus {
  background: #fff;
  border-color: var(--cmc-terracotta);
  outline: 2px solid var(--cmc-terracotta-soft);
  outline-offset: 1px;
  border-color: var(--cmc-terracotta);
}
.cmc-form__error {
  color: var(--cmc-terracotta);
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}
.cmc-form__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.cmc-danger-zone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}
.btn-cmc-danger {
  background: var(--cmc-terracotta);
  color: var(--cmc-off-white);
  border: none;
  border-radius: var(--cmc-radius);
  padding: 0.55rem 1.1rem;
  font-weight: 500;
}
.btn-cmc-danger:hover { background: #b6573a; color: var(--cmc-off-white); }

.cmc-account-delete {
  max-width: 560px;
  margin: 2rem auto;
  background: var(--cmc-off-white);
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 2rem;
  box-shadow: var(--cmc-shadow);
}
.cmc-account-delete h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
.cmc-account-delete p { color: var(--cmc-soft-black); }
.cmc-account-delete .form-control { max-width: 360px; }
.cmc-account-delete__actions { display: flex; gap: 0.6rem; margin-top: 1.25rem; }

/* Loading page */
.cmc-upload-pending { padding: 4rem 0; }
.cmc-upload-pending__card {
  max-width: 480px;
  margin: 2rem auto 0;
  text-align: center;
  background: var(--cmc-off-white);
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--cmc-shadow);
}
.cmc-upload-pending__title { margin: 1.25rem 0 0.25rem; font-size: 1.15rem; font-weight: 600; }
.cmc-upload-pending__title--error { color: var(--cmc-terracotta); }
.cmc-upload-pending__phrase {
  color: var(--cmc-soft-black);
  margin: 0.5rem 0;
  min-height: 1.5em;
  transition: opacity 0.4s ease;
}
.cmc-upload-pending__counter { margin-top: 0.75rem; }

.cmc-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--cmc-border);
  border-top-color: var(--cmc-terracotta);
  border-radius: 50%;
  margin: 0 auto;
  animation: cmc-spinner-rotate 1.1s linear infinite;
}
.cmc-spinner--reduced { animation: none; }
@keyframes cmc-spinner-rotate {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cmc-spinner { animation: none; }
}

/* Imports history */
.cmc-imports-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cmc-imports-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--cmc-off-white);
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
}
.cmc-imports-row__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--cmc-radius-sm);
}
.cmc-imports-row__body { flex: 1; min-width: 0; }
.cmc-imports-row__time { margin: 0; color: var(--cmc-soft-black); font-size: 0.85rem; opacity: 0.7; }
.cmc-imports-row__error { margin: 0.25rem 0 0; color: var(--cmc-terracotta); font-size: 0.95rem; }
.cmc-imports-empty { text-align: center; padding: 3rem 1rem; color: var(--cmc-soft-black); opacity: 0.7; }
.cmc-imports-retry-all { margin-top: 1.5rem; }

.cmc-imports-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #fff5f3;
  border: 1px solid #f4c4b8;
  border-radius: var(--cmc-radius);
  padding: 0.85rem 1.1rem;
  margin: 1.5rem 0;
  color: var(--cmc-charcoal);
  text-decoration: none;
}
.cmc-imports-banner:hover { background: #ffece6; color: var(--cmc-charcoal); }
.cmc-imports-banner__text { color: var(--cmc-terracotta); font-weight: 500; }
.cmc-imports-banner__chevron { color: var(--cmc-terracotta); font-size: 1.3rem; }

/* === Profile overhaul: compact section + narrow form page === */
.cmc-section--compact { padding: 1.5rem 0 3rem; }

.cmc-form-page > .container > * {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* === Form help text (matches existing cmc-form__label/error pattern) === */
.cmc-form__help {
  font-size: 0.85rem;
  color: var(--cmc-text-muted, #6b6b6b);
  margin-top: 0.25rem;
}

/* === Avatars === */
.cmc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  object-fit: cover;
  overflow: hidden;
  flex-shrink: 0;
}
.cmc-avatar--sm { width: 36px; height: 36px; font-size: 13px; }
.cmc-avatar--md { width: 96px; height: 96px; font-size: 34px; }
.cmc-avatar--lg { width: 160px; height: 160px; font-size: 56px; }
.cmc-avatar--gen { /* gradient set inline via style="" */ }

.cmc-avatar-btn {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
}
.cmc-avatar-btn:focus-visible {
  outline: 2px solid var(--cmc-terracotta);
  outline-offset: 2px;
}

/* === Avatar dropdown menu (Alpine-driven, teleported to body) === */
.cmc-account-menu {
  position: fixed;
  z-index: 1050;
  list-style: none;
  min-width: 220px;
  margin: 0;
  padding: 0.5rem;
  background-color: var(--cmc-glass-bg);
  -webkit-backdrop-filter: var(--cmc-glass-filter);
  backdrop-filter: var(--cmc-glass-filter);
  border: 1px solid rgba(31, 31, 31, 0.06);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cmc-account-menu { background-color: var(--cmc-glass-bg-opaque); }
}
.cmc-account-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--cmc-charcoal);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.cmc-account-menu__item:hover,
.cmc-account-menu__item:focus {
  background: rgba(209, 107, 72, 0.10);
  color: var(--cmc-terracotta);
}
.cmc-account-menu__item--danger { color: #b94a48; }
.cmc-account-menu__item--danger:hover,
.cmc-account-menu__item--danger:focus {
  background: rgba(185, 74, 72, 0.10);
  color: #b94a48;
}
.cmc-account-menu__divider {
  border: 0;
  height: 1px;
  background: rgba(31, 31, 31, 0.08);
  margin: 0.4rem 0.5rem;
  opacity: 1;
}

/* === Profile identity panel: 2-column with avatar === */
.cmc-identity-header { display: flex; gap: 1.5rem; align-items: flex-start; }
.cmc-identity-header__avatar { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.cmc-identity-header__main { flex: 1; min-width: 0; }
/* === Inline edit (display value + pencil ✎ → input + ✓/✕)
   Shared by the identity panel (display name) and email card. === */
.cmc-inline-edit__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 38px;
}
.cmc-inline-edit__value {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cmc-charcoal);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmc-inline-edit__form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.cmc-inline-edit__input {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--cmc-border);
  padding: 0 0 2px;
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--cmc-charcoal);
  outline: none;
}
.cmc-inline-edit__input:focus { border-bottom-color: var(--cmc-terracotta); }
/* Size modifier — matches a page title (h1, 2rem). */
.cmc-inline-edit__value--lg,
.cmc-inline-edit__input--lg { font-size: 2rem; }
/* Modifier pushes the pencil button to the right edge of the row;
   email card uses it, identity panel does not. */
.cmc-inline-edit__edit-btn--push { margin-left: auto; }

.cmc-edit-icon-btn {
  width: 30px; height: 30px; padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--cmc-border);
  color: var(--cmc-soft-black);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 1;
  font-size: 14px;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  flex-shrink: 0;
}
.cmc-edit-icon-btn:hover {
  background: var(--cmc-off-white);
  color: var(--cmc-terracotta);
  border-color: var(--cmc-terracotta);
}
.cmc-edit-icon-btn:focus-visible {
  outline: 2px solid var(--cmc-terracotta);
  outline-offset: 2px;
}
.cmc-edit-icon-btn--save {
  color: var(--cmc-olive);
  border-color: var(--cmc-olive);
}
.cmc-edit-icon-btn--save:hover {
  color: var(--cmc-olive);
  border-color: var(--cmc-olive);
  background: var(--cmc-off-white);
}
/* Multiline row aligns icon buttons to the top of the textarea. */
.cmc-inline-edit__row--multiline { align-items: flex-start; }
/* Desc size — muted body paragraph (palette description and similar). */
.cmc-inline-edit__value--desc {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--cmc-text-muted);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 38ch;
}
.cmc-inline-edit__input--desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--cmc-text-muted);
  max-width: 38ch;
}
.cmc-inline-edit__value--muted {
  font-style: italic;
  opacity: 0.7;
}
.cmc-inline-edit__textarea {
  font-family: 'Poppins', system-ui, sans-serif;
  background: transparent;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius-sm);
  padding: 0.4rem 0.55rem;
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--cmc-charcoal);
  outline: none;
  resize: vertical;
}
.cmc-inline-edit__textarea:focus { border-color: var(--cmc-terracotta); }
.cmc-inline-edit__textarea--desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--cmc-text-muted);
  max-width: 38ch;
}
/* === File upload (branded wrapper around <input type="file">) === */
.cmc-file-upload__input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.cmc-file-upload__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cmc-file-upload__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--cmc-off-white);
  border: 1px solid var(--cmc-border);
  color: var(--cmc-charcoal);
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.cmc-file-upload__btn:hover {
  background: #fff;
  border-color: var(--cmc-terracotta);
  color: var(--cmc-terracotta);
}
.cmc-file-upload__input:focus-visible + .cmc-file-upload__row .cmc-file-upload__btn,
.cmc-file-upload__input:focus + .cmc-file-upload__row .cmc-file-upload__btn {
  outline: 2px solid var(--cmc-terracotta);
  outline-offset: 2px;
}
.cmc-file-upload__filename {
  font-size: 0.9rem;
  color: var(--cmc-soft-black);
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.cmc-file-upload__hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--cmc-soft-black);
  opacity: 0.6;
}

/* === Email page card === */
.cmc-email-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem 1.75rem;
}
.cmc-email-card__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cmc-soft-black);
  opacity: 0.65;
}
.cmc-back-link { align-self: flex-start; margin-top: 0.75rem; }

/* === Password page actions === */
.cmc-password-actions { flex-wrap: wrap; }
.cmc-password-actions__forgot { margin-left: auto; }
.btn-cmc-link {
  background: transparent;
  border: 0;
  color: var(--cmc-terracotta);
  padding: 0.5rem 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}
.btn-cmc-link:hover { color: var(--cmc-terracotta); text-decoration: underline; }

/* === Avatar modal form layout === */
.cmc-avatar-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.cmc-avatar-modal-form__preview {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}
.cmc-avatar-modal-form__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
@media (max-width: 540px) {
  .cmc-identity-header { flex-direction: column; align-items: center; text-align: center; }
  .cmc-identity-header__name-row { justify-content: center; }
  /* In flex-column layout `flex: 1` no longer stretches __main horizontally;
     force full width so children (inline-edit input + meta line) can fit and
     truncate against a real container boundary. */
  .cmc-identity-header__main { width: 100%; }
}

/* === Modal === */
.cmc-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(31, 31, 31, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  z-index: 1050;
}
.cmc-modal {
  background: var(--cmc-off-white);
  border-radius: var(--cmc-radius);
  box-shadow: 0 20px 60px rgba(31, 31, 31, 0.25);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.cmc-modal--sm { max-width: 420px; }
.cmc-modal--md { max-width: 520px; }
.cmc-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 0.5rem;
}
.cmc-modal__title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.25rem; font-weight: 600; margin: 0;
}
.cmc-modal__close {
  background: transparent; border: 0; padding: 0;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  color: var(--cmc-charcoal); opacity: 0.6;
}
.cmc-modal__close:hover { opacity: 1; }
.cmc-modal__body { padding: 0.5rem 1.5rem 1rem; }
.cmc-modal__footer {
  padding: 1rem 1.5rem 1.25rem;
  display: flex; gap: 0.5rem; justify-content: flex-end;
  border-top: 1px solid var(--cmc-border);
}

@media (prefers-reduced-motion: reduce) {
  .cmc-modal-backdrop { transition: none; }
}

.cmc-skipped-banner {
  background: var(--cmc-muted-sand);
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.cmc-section .cmc-skipped-banner {
  margin-top: -2.5rem;
}

.cmc-skipped-banner__title {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--cmc-charcoal);
}

.cmc-skipped-banner__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cmc-skipped-banner__chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--cmc-off-white);
  border: 1px solid var(--cmc-border);
  color: var(--cmc-charcoal);
  text-decoration: none;
  font-size: 0.9rem;
}

.cmc-skipped-banner__chip:hover {
  border-color: var(--cmc-terracotta);
  color: var(--cmc-terracotta);
}

/* === Inspirations by hex page ============================== */
.cmc-hex-groups {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cmc-hex-group__body {
  background: #f6f0e6;
  border: 1px solid var(--cmc-border);
  border-radius: var(--cmc-radius);
  padding: 0.75rem 1.25rem 1.25rem;
}

.cmc-hex-group__head {
  position: sticky;
  top: var(--cmc-nav-offset);
  z-index: 5;
  padding: 0 0 0.5rem;
  pointer-events: none;
}

.cmc-hex-group__head > * {
  pointer-events: auto;
}

@media (max-width: 600px) {
  .cmc-hex-group__head { top: var(--cmc-nav-offset-mobile); }
  .cmc-hex-group__body { padding: 0.5rem 1rem 1rem; }
}

/* === Shared detail-page chrome (used by inspiration + palette detail) === */

.cmc-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin: 0.5rem 0 0.75rem;
}

.cmc-detail-header__title-block { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }

.cmc-detail-header__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}

.cmc-edit-toggle-btn {
  background: transparent;
  border: 1px solid var(--cmc-charcoal);
  color: var(--cmc-charcoal);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.cmc-edit-toggle-btn:hover { background: var(--cmc-charcoal); color: var(--cmc-off-white); }
.cmc-edit-toggle-btn.is-active {
  background: var(--cmc-terracotta);
  border-color: var(--cmc-terracotta);
  color: #fff;
}
.cmc-edit-toggle-btn.is-active:hover { background: #b6573a; border-color: #b6573a; }

@media (prefers-reduced-motion: reduce) {
  .cmc-edit-toggle-btn { transition: none; }
}

/* === Palette detail page === */

.cmc-palette-detail { padding-bottom: 0; }

.cmc-palette-detail-hero__name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.cmc-palette-detail-hero__mood--muted {
  color: var(--cmc-soft-black);
  opacity: 0.55;
  font-style: italic;
}

/* === Inspiration detail page === */

.cmc-inspiration-detail {
  padding-bottom: 0;
}

.cmc-inspiration-detail__menu-wrap { position: relative; }

.cmc-inspiration-detail__menu-btn {
  background: transparent;
  border: none;
  color: var(--cmc-charcoal);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease;
}
.cmc-inspiration-detail__menu-btn:hover { background: var(--cmc-muted-sand); }

/* Position the shared cmc-account-menu inside the overflow wrapper.
   The base class uses position:fixed for the navbar's teleported menu;
   here we keep the menu inside its local stacking context. */
.cmc-inspiration-detail__menu.cmc-account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  margin: 0;
  z-index: 20;
}

.cmc-inspiration-detail__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .cmc-inspiration-detail__body { grid-template-columns: 1fr; gap: 1.25rem; }
}

.cmc-inspiration-detail__photo {
  margin: 0;
  border-radius: var(--cmc-radius);
  overflow: hidden;
  box-shadow: var(--cmc-shadow);
  background: var(--cmc-muted-sand);
}
.cmc-inspiration-detail__photo img { width: 100%; height: auto; display: block; }

.cmc-inspiration-detail__info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.cmc-inspiration-detail__section { display: flex; flex-direction: column; gap: 0.6rem; }

.cmc-inspiration-detail__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777;
  font-weight: 500;
  margin: 0;
}

/* Palette card (read-only) */

.cmc-palette-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--cmc-charcoal);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.cmc-palette-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31,31,31,0.08); color: var(--cmc-charcoal); }

.cmc-palette-card__swatches { display: flex; gap: 0.3rem; flex-shrink: 0; }
.cmc-palette-card__swatches .cmc-swatch { width: 28px; height: 28px; border-radius: 8px; }
.cmc-palette-card__swatches .cmc-swatch--bordered { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }

.cmc-palette-card__text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.cmc-palette-card__name { font-size: 0.95rem; font-weight: 600; margin: 0; }
.cmc-palette-card__meta { font-size: 0.78rem; color: #888; margin: 0; }
.cmc-palette-card__arrow { color: var(--cmc-terracotta); font-size: 1.1rem; }

.cmc-palette-card__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #888;
  background: var(--cmc-muted-sand);
  padding: 0.85rem 1.1rem;
  border-radius: var(--cmc-radius-sm);
}

/* Palette edit card */

.cmc-palette-edit-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem 1.1rem; }
.cmc-palette-edit-card__save { align-self: flex-start; margin-top: 0.25rem; }

/* Pieces list + piece row */

.cmc-pieces-list { display: flex; flex-direction: column; }
.cmc-pieces-list__row + .cmc-pieces-list__row { border-top: 1px solid var(--cmc-muted-sand); }
.cmc-pieces-list__empty { margin: 0.5rem 0; font-size: 0.9rem; color: #888; }
.cmc-pieces-list__add { align-self: flex-start; margin-top: 0.75rem; }

.cmc-piece-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
}

.cmc-piece-row__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: var(--cmc-charcoal);
}
.cmc-piece-row__link:hover { color: var(--cmc-terracotta); }
.cmc-piece-row__link:hover .cmc-piece-row__name { color: var(--cmc-terracotta); }

.cmc-piece-row__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cmc-piece-row__name { font-size: 0.95rem; font-weight: 500; }
.cmc-piece-row__family { font-size: 0.78rem; color: #888; }

.cmc-piece-row--editing { gap: 0.5rem; }
.cmc-piece-row__form { display: flex; gap: 0.5rem; flex: 1; align-items: center; min-width: 0; flex-wrap: wrap; }
.cmc-piece-row__form select,
.cmc-piece-row__form input { font-size: 0.85rem; }
.cmc-piece-row__form input[type="color"] { padding: 0; width: 38px; height: 32px; }

.cmc-piece-row__delete {
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.cmc-piece-row__delete:hover { background: rgba(209, 107, 72, 0.1); color: #b6573a; }

/* Ownership summary strip */

.cmc-ownership-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background: var(--cmc-muted-sand);
  padding: 0.7rem 1rem;
  border-radius: var(--cmc-radius-sm);
  margin-top: 0.6rem;
  font-size: 0.85rem;
}
.cmc-ownership-summary__count strong { font-weight: 600; }
.cmc-ownership-summary__verdict { font-weight: 500; }
.cmc-ownership-summary--ready .cmc-ownership-summary__verdict { color: #4F6B36; }
.cmc-ownership-summary--almost .cmc-ownership-summary__verdict { color: var(--cmc-terracotta); }
.cmc-ownership-summary--building .cmc-ownership-summary__verdict { color: #6E6A63; }

/* Failed-analysis banner */

.cmc-failed-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(209, 107, 72, 0.08);
  border: 1px solid rgba(209, 107, 72, 0.25);
  border-radius: var(--cmc-radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
}
.cmc-failed-banner__title { margin: 0; font-weight: 500; color: var(--cmc-charcoal); }
.cmc-failed-banner__error { margin: 0.2rem 0 0; font-size: 0.8rem; color: #777; }

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .cmc-inspiration-detail__menu-btn,
  .cmc-palette-card { transition: none; }
  .cmc-palette-card:hover { transform: none; }
}
