/*
 * CodeXcool design system
 * Theme-independent tokens and reusable UI primitives.
 * Page-builder content should opt into the cxc-* component classes below.
 */

:root,
[data-cxc-theme="light"] {
  color-scheme: light;

  --cxc-white: #ffffff;
  --cxc-ink-950: #0b1424;
  --cxc-ink-900: #111d31;
  --cxc-ink-800: #1a2940;
  --cxc-ink-700: #263851;
  --cxc-ink-600: #40536b;
  --cxc-ink-500: #5b6c82;
  --cxc-ink-400: #75849a;
  --cxc-ink-300: #a5b1c1;
  --cxc-ink-200: #cbd4e0;
  --cxc-ink-100: #e4eaf1;
  --cxc-ink-50: #f4f7fb;

  --cxc-blue-950: #102b70;
  --cxc-blue-900: #173b96;
  --cxc-blue-800: #1d4ab7;
  --cxc-blue-700: #2457d4;
  --cxc-blue-600: #2d63e8;
  --cxc-blue-500: #4678f4;
  --cxc-blue-400: #7097ff;
  --cxc-blue-300: #9eb9ff;
  --cxc-blue-200: #c7d8ff;
  --cxc-blue-100: #e1eaff;
  --cxc-blue-50: #f0f5ff;

  --cxc-canvas: #f6f8fc;
  --cxc-surface: #ffffff;
  --cxc-surface-raised: #ffffff;
  --cxc-surface-soft: #eff3f9;
  --cxc-surface-tint: #edf3ff;
  --cxc-surface-inverse: #0c1627;
  --cxc-text: #142238;
  --cxc-text-secondary: #53657d;
  --cxc-text-muted: #5f6e83;
  --cxc-text-inverse: #f5f8ff;
  --cxc-border: #dce4ef;
  --cxc-border-strong: #c4cfde;
  --cxc-brand: #245bdc;
  --cxc-brand-hover: #1949bd;
  --cxc-brand-active: #153b9e;
  --cxc-brand-soft: #edf3ff;
  --cxc-on-brand: #ffffff;
  --cxc-focus: #3378ff;
  --cxc-success: #137a58;
  --cxc-success-soft: #e7f7f0;
  --cxc-warning: #895400;
  --cxc-warning-soft: #fff4d8;
  --cxc-danger: #b42318;
  --cxc-danger-soft: #fff0ee;
  --cxc-info: #245bdc;
  --cxc-info-soft: #edf3ff;
  --cxc-shadow-sm: 0 1px 2px rgb(11 20 36 / 5%), 0 1px 1px rgb(11 20 36 / 3%);
  --cxc-shadow-md: 0 12px 32px rgb(15 33 60 / 9%), 0 2px 8px rgb(15 33 60 / 4%);
  --cxc-shadow-lg: 0 28px 72px rgb(15 33 60 / 14%);
  --cxc-glow: 0 0 0 1px rgb(70 120 244 / 8%), 0 16px 48px rgb(36 91 220 / 11%);

  --cxc-font-sans: Inter, "Aptos", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --cxc-font-display: "Manrope", Inter, "Aptos Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --cxc-text-xs: 0.75rem;
  --cxc-text-sm: 0.875rem;
  --cxc-text-base: 1rem;
  --cxc-text-lg: 1.125rem;
  --cxc-text-xl: 1.25rem;
  --cxc-text-2xl: clamp(1.375rem, 1.15rem + 0.7vw, 1.75rem);
  --cxc-text-3xl: clamp(1.75rem, 1.3rem + 1.45vw, 2.5rem);
  --cxc-text-4xl: clamp(2.125rem, 1.55rem + 2vw, 3.25rem);
  --cxc-text-5xl: clamp(2.625rem, 1.7rem + 3.2vw, 4.5rem);
  --cxc-text-display: clamp(3rem, 1.8rem + 5vw, 6.25rem);
  --cxc-leading-tight: 1.04;
  --cxc-leading-heading: 1.14;
  --cxc-leading-body: 1.65;
  --cxc-leading-compact: 1.4;
  --cxc-tracking-tight: -0.045em;
  --cxc-tracking-heading: -0.035em;
  --cxc-tracking-normal: 0;
  --cxc-tracking-label: 0.12em;

  --cxc-space-0: 0;
  --cxc-space-1: 0.25rem;
  --cxc-space-2: 0.5rem;
  --cxc-space-3: 0.75rem;
  --cxc-space-4: 1rem;
  --cxc-space-5: 1.25rem;
  --cxc-space-6: 1.5rem;
  --cxc-space-8: 2rem;
  --cxc-space-10: 2.5rem;
  --cxc-space-12: 3rem;
  --cxc-space-16: 4rem;
  --cxc-space-20: 5rem;
  --cxc-space-24: 6rem;
  --cxc-space-32: 8rem;

  --cxc-container-narrow: 44rem;
  --cxc-container-copy: 54rem;
  --cxc-container: 76rem;
  --cxc-container-wide: 86rem;
  --cxc-gutter: clamp(1.25rem, 4.2vw, 3rem);
  --cxc-section-space: clamp(4.5rem, 8vw, 8rem);
  --cxc-grid-gap: clamp(1rem, 2vw, 1.5rem);

  --cxc-radius-sm: 0.5rem;
  --cxc-radius-md: 0.875rem;
  --cxc-radius-lg: 1.25rem;
  --cxc-radius-xl: 1.75rem;
  --cxc-radius-pill: 999px;
  --cxc-control-height: 3rem;
  --cxc-transition-fast: 140ms ease;
  --cxc-transition: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-cxc-theme="dark"] {
  color-scheme: dark;

  --cxc-canvas: #080e19;
  --cxc-surface: #0d1625;
  --cxc-surface-raised: #121e30;
  --cxc-surface-soft: #172338;
  --cxc-surface-tint: #14233c;
  --cxc-surface-inverse: #f2f6ff;
  --cxc-text: #f2f6ff;
  --cxc-text-secondary: #b5c2d5;
  --cxc-text-muted: #91a1b8;
  --cxc-text-inverse: #101a2a;
  --cxc-border: #26364d;
  --cxc-border-strong: #3b4e68;
  --cxc-brand: #a7c1ff;
  --cxc-brand-hover: #c0d2ff;
  --cxc-brand-active: #d2deff;
  --cxc-brand-soft: #172a49;
  --cxc-on-brand: #0c1930;
  --cxc-focus: #9fc0ff;
  --cxc-success: #62dbad;
  --cxc-success-soft: #12342d;
  --cxc-warning: #ffd17a;
  --cxc-warning-soft: #392d18;
  --cxc-danger: #ff938a;
  --cxc-danger-soft: #3a2025;
  --cxc-info: #a7c1ff;
  --cxc-info-soft: #172a49;
  --cxc-shadow-sm: 0 1px 2px rgb(0 0 0 / 22%);
  --cxc-shadow-md: 0 16px 40px rgb(0 0 0 / 24%);
  --cxc-shadow-lg: 0 32px 80px rgb(0 0 0 / 32%);
  --cxc-glow: 0 0 0 1px rgb(167 193 255 / 9%), 0 18px 54px rgb(36 91 220 / 17%);
}

/* Core primitives */
.cxc-showcase,
.cxc-ui {
  color: var(--cxc-text);
  background: var(--cxc-canvas);
  font-family: var(--cxc-font-sans);
  font-size: var(--cxc-text-base);
  line-height: var(--cxc-leading-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.cxc-showcase *,
.cxc-showcase *::before,
.cxc-showcase *::after,
.cxc-ui *,
.cxc-ui *::before,
.cxc-ui *::after {
  box-sizing: border-box;
}

.cxc-showcase {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 78% 0%, color-mix(in srgb, var(--cxc-brand) 9%, transparent), transparent 34rem),
    var(--cxc-canvas);
}

.cxc-container {
  width: min(var(--cxc-container), calc(100% - 2 * var(--cxc-gutter)));
  margin-inline: auto;
}

.cxc-container--wide {
  width: min(var(--cxc-container-wide), calc(100% - 2 * var(--cxc-gutter)));
  margin-inline: auto;
}

.cxc-container--copy {
  width: min(var(--cxc-container-copy), calc(100% - 2 * var(--cxc-gutter)));
  margin-inline: auto;
}

.cxc-container--narrow {
  width: min(var(--cxc-container-narrow), calc(100% - 2 * var(--cxc-gutter)));
  margin-inline: auto;
}

.cxc-section {
  padding-block: var(--cxc-section-space);
}

.cxc-section--compact {
  padding-block: clamp(3rem, 5vw, 5rem);
}

.cxc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--cxc-grid-gap);
}

.cxc-grid--2 > *,
.cxc-grid--3 > *,
.cxc-grid--4 > * {
  grid-column: span 4;
}

.cxc-grid--2 > * { grid-column: span 6; }
.cxc-grid--3 > * { grid-column: span 4; }
.cxc-grid--4 > * { grid-column: span 3; }

.cxc-grid__span-4 { grid-column: span 4; }
.cxc-grid__span-5 { grid-column: span 5; }
.cxc-grid__span-6 { grid-column: span 6; }
.cxc-grid__span-7 { grid-column: span 7; }
.cxc-grid__span-8 { grid-column: span 8; }
.cxc-grid__span-12 { grid-column: span 12; }

.cxc-stack > * + * { margin-block-start: var(--cxc-stack-space, var(--cxc-space-4)); }
.cxc-stack--sm { --cxc-stack-space: var(--cxc-space-2); }
.cxc-stack--lg { --cxc-stack-space: var(--cxc-space-6); }

.cxc-display,
.cxc-h1,
.cxc-h2,
.cxc-h3,
.cxc-h4,
.cxc-h5 {
  margin: 0;
  color: var(--cxc-text);
  font-family: var(--cxc-font-display);
  font-weight: 650;
  text-wrap: balance;
}

.cxc-display {
  max-width: 14ch;
  font-size: var(--cxc-text-display);
  line-height: var(--cxc-leading-tight);
  letter-spacing: var(--cxc-tracking-tight);
}

.cxc-h1 { font-size: var(--cxc-text-5xl); line-height: var(--cxc-leading-tight); letter-spacing: var(--cxc-tracking-tight); }
.cxc-h2 { font-size: var(--cxc-text-4xl); line-height: var(--cxc-leading-heading); letter-spacing: var(--cxc-tracking-heading); }
.cxc-h3 { font-size: var(--cxc-text-3xl); line-height: var(--cxc-leading-heading); letter-spacing: var(--cxc-tracking-heading); }
.cxc-h4 { font-size: var(--cxc-text-2xl); line-height: var(--cxc-leading-heading); letter-spacing: -0.02em; }
.cxc-h5 { font-size: var(--cxc-text-xl); line-height: var(--cxc-leading-compact); letter-spacing: -0.015em; }

.cxc-body-lg { color: var(--cxc-text-secondary); font-size: var(--cxc-text-lg); line-height: 1.7; }
.cxc-body { color: var(--cxc-text-secondary); font-size: var(--cxc-text-base); line-height: var(--cxc-leading-body); }
.cxc-small { color: var(--cxc-text-muted); font-size: var(--cxc-text-sm); line-height: var(--cxc-leading-compact); }
.cxc-caption { color: var(--cxc-text-muted); font-size: var(--cxc-text-xs); line-height: var(--cxc-leading-compact); }

.cxc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--cxc-brand);
  font-size: var(--cxc-text-xs);
  font-weight: 750;
  letter-spacing: var(--cxc-tracking-label);
  line-height: 1.4;
  text-transform: uppercase;
}

.cxc-eyebrow::before {
  width: 1.35rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.cxc-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.65fr);
  align-items: end;
  gap: var(--cxc-space-8);
  margin-block-end: clamp(2rem, 4vw, 3.5rem);
}

.cxc-section-heading__copy { max-width: 44rem; }
.cxc-section-heading__aside { max-width: 28rem; margin: 0 0 0 auto; }

/* Buttons and links */
.cxc-button {
  display: inline-flex;
  min-height: var(--cxc-control-height);
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--cxc-button-border, transparent);
  border-radius: var(--cxc-button-radius, var(--cxc-radius-pill));
  background: var(--cxc-button-background, var(--cxc-brand));
  color: var(--cxc-button-color, var(--cxc-on-brand));
  font: 650 var(--cxc-text-sm) / 1.15 var(--cxc-font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--cxc-transition-fast), border-color var(--cxc-transition-fast), color var(--cxc-transition-fast), box-shadow var(--cxc-transition-fast), transform var(--cxc-transition-fast);
}

.cxc-button:hover { transform: translateY(-1px); background: var(--cxc-button-hover, var(--cxc-brand-hover)); color: var(--cxc-button-hover-color, var(--cxc-on-brand)); }
.cxc-button:active { transform: translateY(0); background: var(--cxc-brand-active); }
.cxc-button:focus-visible,
.cxc-icon-button:focus-visible,
.cxc-nav__link:focus-visible,
.cxc-link:focus-visible,
.cxc-theme-toggle:focus-visible,
.cxc-menu-toggle:focus-visible,
.cxc-form-control:focus-visible,
.cxc-checkbox:focus-visible,
.cxc-faq summary:focus-visible {
  outline: 3px solid var(--cxc-focus);
  outline-offset: 3px;
}

.cxc-button--secondary { border-color: var(--cxc-border-strong); background: var(--cxc-surface); color: var(--cxc-text); }
.cxc-button--secondary:hover { border-color: var(--cxc-brand); background: var(--cxc-brand-soft); color: var(--cxc-text); }
.cxc-button--quiet { background: transparent; color: var(--cxc-text); }
.cxc-button--quiet:hover { background: var(--cxc-surface-soft); color: var(--cxc-text); }
.cxc-button--small { min-height: 2.5rem; padding: 0.55rem 0.9rem; font-size: var(--cxc-text-xs); }
.cxc-button--large { min-height: 3.5rem; padding-inline: 1.5rem; font-size: var(--cxc-text-base); }
.cxc-button[disabled], .cxc-button[aria-disabled="true"] { opacity: 0.52; pointer-events: none; }

.cxc-icon-button,
.cxc-theme-toggle,
.cxc-menu-toggle {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--cxc-border);
  border-radius: 50%;
  background: var(--cxc-surface);
  color: var(--cxc-text);
  cursor: pointer;
  transition: background-color var(--cxc-transition-fast), border-color var(--cxc-transition-fast), color var(--cxc-transition-fast);
}

.cxc-icon-button:hover,
.cxc-theme-toggle:hover,
.cxc-menu-toggle:hover { border-color: var(--cxc-brand); background: var(--cxc-brand-soft); }

.cxc-theme-toggle .cxc-theme-icon--sun { display: none; }
[data-cxc-theme="dark"] .cxc-theme-toggle .cxc-theme-icon--moon { display: none; }
[data-cxc-theme="dark"] .cxc-theme-toggle .cxc-theme-icon--sun { display: block; }

.cxc-link {
  color: var(--cxc-brand);
  font-weight: 650;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
  transition: color var(--cxc-transition-fast), text-decoration-color var(--cxc-transition-fast);
}

.cxc-link:hover { color: var(--cxc-brand-hover); text-decoration-color: currentColor; }
.cxc-arrow-link { display: inline-flex; align-items: center; gap: 0.45rem; }
.cxc-arrow-link span { transition: transform var(--cxc-transition-fast); }
.cxc-arrow-link:hover span { transform: translateX(3px); }

/* Navigation */
.cxc-site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--cxc-border) 78%, transparent);
  background: color-mix(in srgb, var(--cxc-canvas) 88%, transparent);
  backdrop-filter: blur(18px);
}

.cxc-site-header__inner {
  display: flex;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--cxc-space-6);
}

.cxc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--cxc-text);
  font-family: var(--cxc-font-display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
}

.cxc-brand__mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--cxc-brand) 34%, var(--cxc-border));
  border-radius: 0.75rem;
  background: linear-gradient(145deg, var(--cxc-brand-soft), var(--cxc-surface));
  color: var(--cxc-brand);
  font-size: 1.15rem;
  line-height: 1;
}

.cxc-nav { display: flex; align-items: center; gap: var(--cxc-space-6); }
.cxc-nav__list { display: flex; align-items: center; gap: clamp(0.8rem, 1.8vw, 1.75rem); margin: 0; padding: 0; list-style: none; }
.cxc-nav__link { position: relative; padding-block: 0.7rem; color: var(--cxc-text-secondary); font-size: var(--cxc-text-sm); font-weight: 550; text-decoration: none; }
.cxc-nav__link:hover, .cxc-nav__link[aria-current="page"] { color: var(--cxc-text); }
.cxc-nav__link[aria-current="page"]::after { position: absolute; right: 0; bottom: 0.32rem; left: 0; height: 2px; border-radius: 2px; background: var(--cxc-brand); content: ""; }
.cxc-nav__actions { display: flex; align-items: center; gap: 0.65rem; }
.cxc-menu-toggle { display: none; }

/* Forms */
.cxc-form { display: grid; gap: var(--cxc-space-5); }
.cxc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cxc-space-5); }
.cxc-field { display: grid; gap: 0.5rem; }
.cxc-field--full { grid-column: 1 / -1; }
.cxc-label { color: var(--cxc-text); font-size: var(--cxc-text-sm); font-weight: 650; }
.cxc-required { color: var(--cxc-danger); }

.cxc-form-control {
  width: 100%;
  min-height: var(--cxc-control-height);
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--cxc-border-strong);
  border-radius: var(--cxc-radius-sm);
  background: var(--cxc-surface);
  color: var(--cxc-text);
  font: 450 var(--cxc-text-base) / 1.4 var(--cxc-font-sans);
  transition: border-color var(--cxc-transition-fast), box-shadow var(--cxc-transition-fast), background-color var(--cxc-transition-fast);
}

.cxc-form-control::placeholder { color: var(--cxc-text-muted); opacity: 0.85; }
.cxc-form-control:focus { border-color: var(--cxc-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cxc-brand) 18%, transparent); outline: 0; }
.cxc-form-control[aria-invalid="true"] { border-color: var(--cxc-danger); }
.cxc-form-control--textarea { min-height: 8.5rem; resize: vertical; }
.cxc-form-control--select { appearance: none; padding-right: 2.8rem; background-image: linear-gradient(45deg, transparent 50%, var(--cxc-text-muted) 50%), linear-gradient(135deg, var(--cxc-text-muted) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 1.3rem, calc(100% - 0.8rem) 1.3rem; background-size: 0.3rem 0.3rem, 0.3rem 0.3rem; background-repeat: no-repeat; }
.cxc-field__hint { color: var(--cxc-text-muted); font-size: var(--cxc-text-xs); line-height: 1.5; }
.cxc-field__error { color: var(--cxc-danger); font-size: var(--cxc-text-sm); font-weight: 550; }
.cxc-check-row { display: flex; align-items: flex-start; gap: 0.7rem; color: var(--cxc-text-secondary); font-size: var(--cxc-text-sm); }
.cxc-checkbox { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; margin: 0.15rem 0 0; accent-color: var(--cxc-brand); }

/* Cards, badges and reusable content modules */
.cxc-card {
  min-width: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--cxc-border);
  border-radius: var(--cxc-radius-lg);
  background: var(--cxc-surface);
  box-shadow: var(--cxc-shadow-sm);
  transition: border-color var(--cxc-transition), box-shadow var(--cxc-transition), transform var(--cxc-transition);
}

.cxc-card:hover { border-color: color-mix(in srgb, var(--cxc-brand) 40%, var(--cxc-border)); box-shadow: var(--cxc-shadow-md); transform: translateY(-3px); }
.cxc-card--flat { box-shadow: none; }
.cxc-card--tinted { border-color: transparent; background: var(--cxc-surface-tint); }
.cxc-card--dark { border-color: #26364d; background: var(--cxc-surface-inverse); color: var(--cxc-text-inverse); }
.cxc-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--cxc-space-4); }
.cxc-card__icon { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border: 1px solid color-mix(in srgb, var(--cxc-brand) 24%, var(--cxc-border)); border-radius: 0.9rem; background: var(--cxc-brand-soft); color: var(--cxc-brand); }
.cxc-card__number { color: var(--cxc-text-muted); font: 600 var(--cxc-text-xs) / 1 var(--cxc-font-sans); letter-spacing: 0.08em; }
.cxc-card__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--cxc-space-4); margin-block-start: var(--cxc-space-6); }
.cxc-service-card { display: flex; min-height: 17rem; flex-direction: column; }
.cxc-service-card .cxc-card__footer { margin-block-start: auto; padding-block-start: var(--cxc-space-6); }
.cxc-project-card { overflow: hidden; padding: 0; }
.cxc-project-card__visual { display: grid; min-height: 13rem; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--cxc-brand-soft), var(--cxc-surface-soft)); }
.cxc-project-card__visual--dark { background: radial-gradient(circle at 72% 28%, #405b92, #14223a 52%, #0b1424); }
.cxc-project-card__body { padding: clamp(1.2rem, 2.4vw, 1.75rem); }
.cxc-metric { display: flex; flex-direction: column; gap: 0.3rem; }
.cxc-metric__value { color: var(--cxc-text); font: 650 var(--cxc-text-3xl) / 1 var(--cxc-font-display); letter-spacing: var(--cxc-tracking-heading); }
.cxc-metric__label { color: var(--cxc-text-muted); font-size: var(--cxc-text-sm); }

.cxc-badge {
  display: inline-flex;
  min-height: 1.8rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--cxc-brand) 14%, var(--cxc-border));
  border-radius: var(--cxc-radius-pill);
  background: var(--cxc-brand-soft);
  color: var(--cxc-brand);
  font-size: var(--cxc-text-xs);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.cxc-badge--neutral { border-color: var(--cxc-border); background: var(--cxc-surface-soft); color: var(--cxc-text-secondary); }
.cxc-badge--success { border-color: transparent; background: var(--cxc-success-soft); color: var(--cxc-success); }
.cxc-badge--warning { border-color: transparent; background: var(--cxc-warning-soft); color: var(--cxc-warning); }
.cxc-badge--danger { border-color: transparent; background: var(--cxc-danger-soft); color: var(--cxc-danger); }
.cxc-badge__dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: currentColor; }

.cxc-pills { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.cxc-pill { display: inline-flex; align-items: center; padding: 0.45rem 0.8rem; border: 1px solid var(--cxc-border); border-radius: var(--cxc-radius-pill); background: var(--cxc-surface); color: var(--cxc-text-secondary); font-size: var(--cxc-text-xs); font-weight: 600; }
.cxc-pill[aria-pressed="true"] { border-color: var(--cxc-brand); background: var(--cxc-brand-soft); color: var(--cxc-brand); }
.cxc-divider { height: 1px; border: 0; background: var(--cxc-border); }

.cxc-quote { margin: 0; padding: clamp(1.5rem, 3vw, 2.5rem); border-left: 3px solid var(--cxc-brand); border-radius: 0 var(--cxc-radius-md) var(--cxc-radius-md) 0; background: var(--cxc-surface-tint); color: var(--cxc-text); font: 550 var(--cxc-text-xl) / 1.55 var(--cxc-font-display); letter-spacing: -0.02em; }
.cxc-faq { border-bottom: 1px solid var(--cxc-border); }
.cxc-faq summary { display: flex; min-height: 4rem; align-items: center; justify-content: space-between; gap: 1rem; color: var(--cxc-text); font-weight: 650; cursor: pointer; list-style: none; }
.cxc-faq summary::-webkit-details-marker { display: none; }
.cxc-faq summary::after { color: var(--cxc-brand); content: "+"; font-size: 1.4rem; font-weight: 400; }
.cxc-faq[open] summary::after { content: "−"; }
.cxc-faq__content { max-width: 64ch; padding: 0 2.5rem 1.2rem 0; color: var(--cxc-text-secondary); }

.cxc-notice { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.1rem; border: 1px solid var(--cxc-border); border-radius: var(--cxc-radius-md); background: var(--cxc-surface); color: var(--cxc-text-secondary); font-size: var(--cxc-text-sm); }
.cxc-notice--success { border-color: color-mix(in srgb, var(--cxc-success) 28%, var(--cxc-border)); background: var(--cxc-success-soft); color: var(--cxc-success); }
.cxc-notice--error { border-color: color-mix(in srgb, var(--cxc-danger) 28%, var(--cxc-border)); background: var(--cxc-danger-soft); color: var(--cxc-danger); }

.cxc-cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid color-mix(in srgb, var(--cxc-brand) 22%, var(--cxc-border));
  border-radius: var(--cxc-radius-xl);
  background: radial-gradient(ellipse at 90% 0%, color-mix(in srgb, var(--cxc-brand) 18%, transparent), transparent 36rem), var(--cxc-surface-tint);
  box-shadow: var(--cxc-glow);
}

.cxc-footer { border-top: 1px solid var(--cxc-border); background: var(--cxc-surface); }
.cxc-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--cxc-space-6); padding-block: var(--cxc-space-8); }

.cxc-swatch { display: grid; gap: 0.75rem; min-width: 0; }
.cxc-swatch__color { min-height: 5.25rem; border: 1px solid color-mix(in srgb, var(--cxc-border) 70%, transparent); border-radius: var(--cxc-radius-md); }
.cxc-swatch__name { color: var(--cxc-text); font-size: var(--cxc-text-xs); font-weight: 700; }
.cxc-swatch__value { color: var(--cxc-text-muted); font: 0.72rem / 1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Showcase-only layout */
.cxc-showcase__hero { padding-block: clamp(4.5rem, 10vw, 8.5rem) clamp(4rem, 7vw, 6.5rem); }
.cxc-showcase__hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(17rem, 0.65fr); align-items: end; gap: clamp(2rem, 7vw, 7rem); }
.cxc-showcase__lead { max-width: 39rem; margin: var(--cxc-space-6) 0 0; color: var(--cxc-text-secondary); font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem); line-height: 1.65; }
.cxc-showcase__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: var(--cxc-space-8); }
.cxc-showcase__meta { display: grid; gap: var(--cxc-space-4); padding: 1.35rem; border: 1px solid var(--cxc-border); border-radius: var(--cxc-radius-lg); background: color-mix(in srgb, var(--cxc-surface) 80%, transparent); box-shadow: var(--cxc-shadow-sm); }
.cxc-showcase__meta-row { display: flex; justify-content: space-between; gap: 1rem; padding-block-end: var(--cxc-space-3); border-bottom: 1px solid var(--cxc-border); color: var(--cxc-text-secondary); font-size: var(--cxc-text-sm); }
.cxc-showcase__meta-row:last-child { padding: 0; border: 0; }
.cxc-showcase__meta-row strong { color: var(--cxc-text); font-weight: 650; text-align: right; }
.cxc-showcase__section { padding-block: clamp(3.5rem, 6vw, 6rem); border-top: 1px solid var(--cxc-border); }
.cxc-showcase__section--soft { background: var(--cxc-surface-soft); }
.cxc-showcase__section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--cxc-space-8); margin-block-end: var(--cxc-space-8); }
.cxc-showcase__section-title p { max-width: 34rem; margin: 0; color: var(--cxc-text-secondary); }
.cxc-showcase__theme-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cxc-space-6); }
.cxc-showcase__dark-sample { padding: 1.5rem; border: 1px solid #26364d; border-radius: var(--cxc-radius-lg); background: #080e19; color: #f2f6ff; }
.cxc-showcase__dark-sample .cxc-h4 { color: #f2f6ff; }
.cxc-showcase__dark-sample p { color: #b5c2d5; }
.cxc-showcase__palette { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.8rem; }
.cxc-showcase__type-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: baseline; gap: var(--cxc-space-5); padding-block: var(--cxc-space-5); border-bottom: 1px solid var(--cxc-border); }
.cxc-showcase__type-label { color: var(--cxc-text-muted); font: 0.72rem / 1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cxc-showcase__type-example { min-width: 0; }
.cxc-showcase__breakpoints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cxc-space-4); }
.cxc-showcase__breakpoint { padding: 1rem; border: 1px solid var(--cxc-border); border-radius: var(--cxc-radius-md); background: var(--cxc-surface); }
.cxc-showcase__breakpoint strong { display: block; color: var(--cxc-text); }
.cxc-showcase__breakpoint span { color: var(--cxc-text-muted); font: var(--cxc-text-xs) / 1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 64rem) {
  .cxc-nav { gap: var(--cxc-space-4); }
  .cxc-nav__list { gap: 0.9rem; }
  .cxc-showcase__hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(15rem, 0.7fr); gap: var(--cxc-space-8); }
  .cxc-showcase__palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  :root { --cxc-gutter: 1.25rem; --cxc-section-space: 4.25rem; }

  .cxc-site-header__inner { min-height: 4.5rem; }
  .js .cxc-menu-toggle { display: inline-grid; }
  .no-js .cxc-menu-toggle { display: none; }
  .cxc-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: var(--cxc-space-4);
    padding: 1rem var(--cxc-gutter) 1.35rem;
    border-bottom: 1px solid var(--cxc-border);
    background: var(--cxc-surface);
    box-shadow: var(--cxc-shadow-md);
  }

  .js .cxc-nav:not(.is-open) { display: none; }
  .no-js .cxc-nav { position: static; box-shadow: none; }
  .cxc-nav.is-open { display: flex; }
  .cxc-nav__list { align-items: stretch; flex-direction: column; gap: 0; }
  .cxc-nav__link { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--cxc-border); }
  .cxc-nav__link[aria-current="page"]::after { right: auto; bottom: 0.55rem; width: 1.5rem; }
  .cxc-nav__actions { display: flex; justify-content: space-between; }
  .cxc-section-heading { grid-template-columns: 1fr; gap: var(--cxc-space-4); }
  .cxc-section-heading__aside { margin: 0; }
  .cxc-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cxc-grid--3 > *, .cxc-grid--4 > * { grid-column: span 4; }
  .cxc-grid__span-4, .cxc-grid__span-5, .cxc-grid__span-7 { grid-column: span 4; }
  .cxc-grid__span-6, .cxc-grid__span-8 { grid-column: span 8; }
  .cxc-showcase__hero-grid { grid-template-columns: 1fr; }
  .cxc-showcase__meta { max-width: 34rem; }
  .cxc-showcase__theme-pair { grid-template-columns: 1fr; }
  .cxc-showcase__breakpoints { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cxc-footer__inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 40rem) {
  .cxc-display { font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .cxc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cxc-grid--2 > *, .cxc-grid--3 > *, .cxc-grid--4 > *,
  .cxc-grid__span-4, .cxc-grid__span-5, .cxc-grid__span-6, .cxc-grid__span-7, .cxc-grid__span-8, .cxc-grid__span-12 { grid-column: 1 / -1; }
  .cxc-form-grid { grid-template-columns: 1fr; }
  .cxc-field--full { grid-column: auto; }
  .cxc-showcase__section-title { align-items: flex-start; flex-direction: column; gap: var(--cxc-space-3); }
  .cxc-showcase__palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cxc-showcase__type-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .cxc-showcase__actions .cxc-button { flex: 1 1 auto; }
  .cxc-card__footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .cxc-showcase *, .cxc-showcase *::before, .cxc-showcase *::after,
  .cxc-ui *, .cxc-ui *::before, .cxc-ui *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
