:root {
  color-scheme: light dark;
  /* The production palette is shared by shell and legacy-owned lead themes. */
  --sx-bg: light-dark(#f5f5f7, #000000);
  --sx-bg-elevated: light-dark(#ffffff, #1d1d1f);
  --sx-bg-soft: light-dark(#ffffff, #1d1d1f);
  --sx-text: light-dark(#1d1d1f, #f5f5f7);
  --sx-text-strong: var(--sx-text);
  --sx-text-muted: light-dark(#6e6e73, #a1a1a6);
  --sx-border: light-dark(#d2d2d7, #38383b);
  --sx-border-strong: light-dark(#86868b, #6e6e73);
  --sx-blue: #45b6fe;
  --sx-cyan: var(--sx-blue);
  --sx-pink: #d95bc5;
  --sx-gradient: linear-gradient(90deg, #45b6fe, #d95bc5);
  /* AA text/focus variants only; the brand fill and outline stay unchanged. */
  --sx-blue-deep: light-dark(#006eac, #45b6fe);
  --sx-text-pink: light-dark(#993588, #d95bc5);
  --sx-header-height: calc(4.75rem + 1px);
  --sx-anchor-offset: calc(var(--sx-header-height) + 1.5rem);
  --sx-positive: light-dark(#08724f, #78e5bd);
  --sx-positive-text: var(--sx-positive);
  --sx-warning: light-dark(#885200, #f8bd67);
  --sx-shadow-sm: 0 8px 24px #0000000d;
  --sx-shadow-lg: 0 20px 50px #0000001a;
  --sx-radius-sm: 0.75rem;
  --sx-radius-md: 1.25rem;
  --sx-radius-lg: 2rem;
  --sx-space-1: 0.5rem;
  --sx-space-2: 0.75rem;
  --sx-space-3: 1rem;
  --sx-space-4: 1.5rem;
  --sx-space-5: 2rem;
  --sx-space-6: 3rem;
  --sx-space-7: 4.5rem;
  --sx-space-8: 7rem;
  --sx-container: 75rem;
  /* One marketing scale per semantic role, shared with the legacy lead pages. */
  --sx-type-page: clamp(2.3rem, 4.5vw, 4rem);
  --sx-type-section: clamp(1.875rem, 3.25vw, 3rem);
  --sx-type-card: 1.25rem;
  --sx-type-lead: clamp(1.125rem, 1.4vw, 1.25rem);
  --sx-type-body: 1rem;
  --sx-type-label: 0.85rem;
  --sx-type-form: clamp(1.75rem, 2.5vw, 2.25rem);
  --sx-type-heading-leading: 1.15;
  --sx-type-heading-tracking: -0.035em;
  --sx-transition: 180ms ease;
  --sx-page-gutter: max(1.5rem, calc((100% - var(--sx-container)) / 2));
  --sx-rail-gutter: max(1.5rem, calc((100% - 66rem) / 2));
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"],
body.dark-mode { color-scheme: dark; }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  /* Keep document navigation and menu scroll restoration native and immediate. */
  scroll-behavior: auto;
  scroll-padding-top: 0;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--sx-bg);
  color: var(--sx-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--sx-type-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--sx-text-strong);
  font-weight: 700;
  letter-spacing: var(--sx-type-heading-tracking);
  line-height: var(--sx-type-heading-leading);
  text-wrap: balance;
}

h1 {
  font-size: var(--sx-type-page);
}

h2 {
  font-size: var(--sx-type-section);
}

h3 {
  font-size: var(--sx-type-card);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p,
li {
  text-wrap: pretty;
}

::selection {
  background: color-mix(in srgb, var(--sx-blue) 30%, transparent);
}

:focus-visible {
  outline: 3px solid var(--sx-blue-deep);
  outline-offset: 4px;
}

/*47R2: Do not paint a retained dialog/menu focus as a touch selection.
  Keyboard/assistive activation clears the marker; editable fields keep focus. */
:root[data-sx-pointer-focus] :is(a[href], button, summary, [role="button"], [role="link"]):not(:where([contenteditable], [contenteditable] *)):focus {
  outline: none;
}

.container {
  width: min(calc(100% - 3rem), var(--sx-container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: var(--sx-text-strong);
  color: var(--sx-bg-elevated);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform var(--sx-transition);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Owner-requested display treatment; its light-mode contrast exception is documented. */
.gradient-text {
  background: var(--sx-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.word-keep { white-space: nowrap; }

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.1rem;
  color: var(--sx-blue-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--sx-blue);
  border-radius: 999px;
  background: transparent;
  color: var(--sx-blue-deep);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: color var(--sx-transition), background var(--sx-transition);
}

.button--page {
  border-width: 1px;
  box-shadow: 0 10px 25px rgb(69 182 254 / 18%);
  transition: color 200ms ease, background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.button--secondary {
  border-width: 1px;
  border-color: var(--sx-pink);
  color: var(--sx-text-pink);
  font-weight: 500;
}

.button--compact {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
}

/* Explicit project CTA variant: halve only the measured lateral padding. */
.button--project { padding-inline: 0.75rem; }
.button--compact.button--project { padding-inline: 0.5rem; }

.button--submit {
  width: fit-content;
  min-height: 2.75rem;
  padding: 13px 22px;
  border: 1px solid var(--sx-blue);
  border-radius: 25px;
  color: var(--sx-text);
  font-weight: 600;
  justify-self: start;
  align-self: start;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 25px rgb(69 182 254 / 18%);
  transition: color 200ms ease, background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.button--menu { border-width: 1px; }

/*47: semantic roles are explicit in the templates, never inferred from copy.
  Fill changes do not change the border, dimensions or pointer geometry. */
.button.button--quote {
  border: 1px solid transparent;
  background: linear-gradient(var(--quote-surface, var(--sx-bg)), var(--quote-surface, var(--sx-bg))) padding-box, var(--sx-gradient) border-box;
  color: var(--sx-text);
}
.button--submit.button--quote { --quote-surface: var(--sx-bg-elevated); }
.button.button--explore {
  border: 1px solid var(--sx-pink);
  background: transparent;
  color: var(--sx-text-pink);
  font-weight: 500;
}
.button.button--quote:focus-visible,
.button.button--explore:focus-visible {
  outline: 3px solid var(--sx-blue-deep);
  outline-offset: 3px;
}
.button.button--quote:not(:disabled):active { background: var(--sx-gradient) border-box; color: #1d1d1f; }
.button.button--explore:not(:disabled):active { background: #bb3fa7; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .button.button--quote:not(:disabled):hover { background: var(--sx-gradient) border-box; color: #1d1d1f; }
  .button.button--explore:not(:disabled):hover { background: #bb3fa7; color: #fff; }
  .button:is(.button--quote, .button--explore):not(:disabled):hover { box-shadow: 0 14px 30px rgb(69 182 254 / 25%); }
}
@media (forced-colors: active) {
  .button.button--quote,
  .button.button--explore,
  .button:is(.button--quote, .button--explore):is(:hover, :active, :focus-visible) { border-color: ButtonText; background: ButtonFace; color: ButtonText; }
}

/* One native fragment offset; functional form/rail IDs are not renamed. */
[id] { scroll-margin-top: var(--sx-anchor-offset); }

@media (max-width: 55rem) {
  :root { --sx-header-height: calc(4.25rem + 1px); }
}

@media (max-width: 30rem) {
  .container {
    width: min(calc(100% - 2.5rem), var(--sx-container));
  }
}

@media (prefers-reduced-motion: reduce) {
  .button--page:hover, .button--submit:hover { transform: none; }
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
