/* ==================================================
   AIX CEO TRANSFORMATION ASSESSMENT
   The only stylesheet. Loaded by index.html, quiz.html, results.html.

   Brand source of truth: BRANDING_REFERENCE.md
   Content source of truth: "CEOTransformation Quiz Details.md" (Parts 6, 7, 10, 19)

   TABLE OF CONTENTS
     1  DESIGN TOKENS
     2  FONTS
     3  RESET & BASE
     4  MOTION PREFERENCES
     5  TYPOGRAPHY
     6  LINKS
     7  LAYOUT - CONTAINER & SECTION
     8  UTILITIES & A11Y HELPERS
     9  HEADER
    10  FOOTER
    11  BUTTONS
    12  FORMS
    13  HERO
    14  CARD GRID
    15  CHECKLIST
    16  FINAL CTA
    17  QUIZ - SHELL & SCREENS
    18  QUIZ - PROGRESS
    19  QUIZ - ANSWER OPTIONS
    20  QUIZ - NAVIGATION
    21  QUIZ - LEAD CAPTURE
    22  RESULTS - STAGE HEADER
    23  RESULTS - SCORE & TIER RULER
    23b RESULTS - CARD CTAs
    24  RESULTS - DIMENSION BARS
    25  RESULTS - PRIORITIES
    26  RESULTS - CTA BAND
    27  ANIMATIONS
    28  EMBEDDED IN THE GHL IFRAME
    29  PRINT
   ================================================== */


/* ========== 1. DESIGN TOKENS ========== */
:root {
  color-scheme: dark;

  /* Brand palette - exact hexes from BRANDING_REFERENCE.md */
  --aix-black:        #050505;
  --aix-white:        #FFFFFF;
  --aix-primary-gold: #FEBF10;
  --aix-premium-gold: #D4AF37;
  --aix-platinum:     #B8B8B8;
  --aix-dark-gray:    #151515;

  /* Derived surfaces. Contrast on --aix-black:
     #1F1F1F elevated surface | #2A2A2A decorative hairline (1.42:1 - decorative ONLY,
     never the sole boundary of a control) | #8A8A8A 5.90:1 passes AA, fails AAA, so
     micro-labels only | --aix-gold-hairline composites to #776320 = 3.48:1, which clears
     the 3:1 non-text contrast minimum (WCAG 1.4.11) for real control boundaries. */
  --aix-elevated:      #1F1F1F;
  --aix-hairline:      #2A2A2A;
  --aix-muted:         #8A8A8A;
  --aix-gold-hairline: rgba(212, 175, 55, 0.55);
  --aix-gold-glow:     rgba(254, 191, 16, 0.25);
  --aix-gold-wash:     rgba(254, 191, 16, 0.08);

  --aix-error:    #DC2626;
  --aix-error-bg: rgba(220, 38, 38, 0.1);

  --font-sans: "Inter", "Helvetica Neue", "Neue Haas Grotesk", Montserrat,
               system-ui, Arial, sans-serif;

  --max-width:        1240px;
  --max-width-narrow: 760px;
  --radius:           4px;

  --spacing-xs:  8px;
  --spacing-sm:  12px;
  --spacing-md:  16px;
  --spacing-lg:  24px;
  --spacing-xl:  32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --spacing-4xl: 96px;

  --transition-fast:     150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-standard: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:     600ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* ========== 2. FONTS ========== */
/* The brand requires Inter. No woff2 files ship with this prototype and adding a
   Google Fonts <link> would break the zero-external-requests constraint, so these
   blocks resolve Inter only on machines where it is already installed; everyone
   else gets the documented fallback stack.

   TO UPGRADE (see README > Fonts): drop inter-latin-{400,600,700}-normal.woff2 into
   assets/fonts/ and uncomment the url() line in each block. Nothing else changes. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Inter"), local("Inter Regular");
  /* , url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); */
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local("Inter SemiBold"), local("Inter-SemiBold");
  /* , url("assets/fonts/inter-latin-600-normal.woff2") format("woff2"); */
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("Inter Bold"), local("Inter-Bold");
  /* , url("assets/fonts/inter-latin-700-normal.woff2") format("woff2"); */
}


/* ========== 3. RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* The `hidden` attribute is how every screen, nav button and optional CTA in
   this prototype is toggled, and the UA rule that implements it is a bare
   [hidden] selector - so ANY class setting `display` beats it. `.btn` alone
   would be enough to make a hidden CTA render anyway. Restate it once here,
   with the specificity to win, rather than per component. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-synthesis: none;
  background-color: var(--aix-black);
  color: var(--aix-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}


/* ========== 4. MOTION PREFERENCES ========== */
/* Consolidated here so there is exactly one place to reason about reduced motion.
   script.js reads the same media query via prefersReducedMotion() to zero the
   auto-advance delay. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .spinner {
    animation: none;
    border: 2px solid var(--aix-primary-gold);
  }

  .quiz-screen,
  .results-check::after,
  .dimension__fill {
    animation: none;
  }
}


/* ========== 5. TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 4.5vw, 48px);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(20px, 3.5vw, 32px);
}

h4 {
  font-size: clamp(18px, 2.5vw, 24px);
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}


/* ========== 6. LINKS ========== */
a {
  color: var(--aix-primary-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--aix-premium-gold);
}

a:focus-visible {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}


/* ========== 7. LAYOUT - CONTAINER & SECTION ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

section {
  padding: var(--spacing-3xl) 0;
}

@media (max-width: 768px) {
  section {
    padding: var(--spacing-2xl) 0;
  }
}

.section-heading {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  margin-bottom: var(--spacing-md);
}


/* ========== 8. UTILITIES & A11Y HELPERS ========== */
.text-center { text-align: center; }
.text-gold   { color: var(--aix-primary-gold); }
.mt-lg       { margin-top: var(--spacing-lg); }
.mb-lg       { margin-bottom: var(--spacing-lg); }
.hidden      { display: none !important; }

/* Available to screen readers, invisible on screen. clip-path (not display:none or
   visibility:hidden) so the element keeps its place in the accessibility tree. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* color is restated on :focus because the global `a { color: gold }` would otherwise
   put gold text on a gold background - 1.27:1. */
.skip-link {
  position: absolute;
  left: var(--spacing-md);
  top: -200px;
  z-index: 200;
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--aix-primary-gold);
  color: var(--aix-black);
  font-weight: 700;
  border-radius: var(--radius);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--spacing-md);
  color: var(--aix-black);
}


/* ========== 9. HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--aix-black);
  border-bottom: 1px solid var(--aix-dark-gray);
  padding: var(--spacing-lg) 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
}

/* Holds only the logo image now - the artwork carries the wordmark, so there is
   no text label beside it to space or style. */
.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.logo-container:hover {
  opacity: 0.8;
  color: var(--aix-white);
}

.logo-container:focus-visible {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}

/* aaix-wordmark.png is a 520x209 tight-cropped wordmark - no transparent
   padding, unlike the old square Logo_AIX_transparent.png it replaced, so the
   box IS the mark and these are driven by height with width left auto. Sizes
   match the sibling AAiX webinar property (.brand__mark 34px, .footer__mark
   46px) so the wordmark is the same physical size across both properties.

   The drop-shadow is load-bearing, not decoration. The chrome artwork carries
   near-black facets - the leading "A" measures a median luminance of 46 out of
   255 - and this header is flat #0d0d0d, so without a rim that glyph dissolves
   into the background and the mark reads as "AiX". The webinar property gets
   away with no filter because its header floats over hero artwork behind a
   gradient scrim, which gives the dark facets something to sit against. A 1px
   white rim at 55% is the least that separates them here; larger radii read as
   a glow and cheapen the chrome. A wordmark artworked for dark backgrounds
   would remove the need for this - see README. */
.logo-mark {
  display: block;
  height: 34px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55));
}

.footer-logo-mark {
  display: block;
  height: 46px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55));
}

/* The header pairs the mark with the gold label pill, and at 430px the pill's
   longest copy ("CEO Transformation Assessment") needs the room. */
@media (max-width: 480px) {
  .logo-mark {
    height: 28px;
  }
}

.header-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  /* Outlined pill, per the reference. --aix-gold-hairline is used rather than
     full gold because this is a label, not a control, and solid gold at this
     size reads as a button people then try to click. */
  border: 1px solid var(--aix-gold-hairline);
  border-radius: 999px;
  padding: 8px var(--spacing-md);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .header-label {
    font-size: 10px;
    letter-spacing: 0.5px;
    text-align: right;
  }
}


/* ========== 10. FOOTER ========== */
footer {
  background-color: var(--aix-dark-gray);
  border-top: 1px solid var(--aix-hairline);
  padding: var(--spacing-3xl) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-md);
}

@media (max-width: 768px) {
  .footer-brand {
    align-items: center;
    text-align: center;
  }
}

.footer-logo-container {
  display: flex;
  align-items: center;
}

.footer-statement {
  font-size: 14px;
  color: var(--aix-platinum);
  max-width: 300px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: flex-end;
}

@media (max-width: 768px) {
  .footer-links {
    align-items: center;
  }
}

.footer-link {
  font-size: 14px;
  color: var(--aix-platinum);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--aix-primary-gold);
}

.footer-divider {
  height: 1px;
  background-color: var(--aix-hairline);
  margin: var(--spacing-xl) 0;
  border: 0;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: var(--aix-platinum);
}


/* ========== 11. BUTTONS ========== */
.btn {
  display: inline-block;
  min-height: 48px;                     /* WCAG 2.5.8 target size */
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-standard),
              color var(--transition-standard),
              transform var(--transition-standard),
              box-shadow var(--transition-standard);
  border: none;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--aix-primary-gold);
  color: var(--aix-black);              /* NEVER white - #FFF on #FEBF10 is 1.66:1 */
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--aix-premium-gold);
  color: var(--aix-black);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--aix-gold-glow);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--aix-white);
  outline-offset: 2px;
}

.btn-secondary {
  background-color: transparent;
  color: var(--aix-primary-gold);
  border: 2px solid var(--aix-primary-gold);
}

/* The text must flip to black as the gold fills in, or it becomes gold-on-gold. */
.btn-secondary:hover:not(:disabled) {
  background-color: var(--aix-primary-gold);
  color: var(--aix-black);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}

/* Explicit colours rather than opacity: fading foreground and background together
   destroys the text/background ratio. #8A8A8A on #2A2A2A is 4.16:1. */
.btn:disabled,
.btn[aria-disabled="true"] {
  background-color: var(--aix-hairline);
  color: var(--aix-muted);
  border-color: var(--aix-hairline);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: 16px;
}

.btn--block {
  display: block;
  width: 100%;
}

/* "Book My CEO Transformation Strategy Call" wraps to three lines at 375px in 14px
   all-caps. Sentence case at 16px bold stays professional and stays on two lines. */
.btn--sentence {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  font-size: 16px;
}


/* ========== 12. FORMS ========== */
.form-card {
  background-color: var(--aix-dark-gray);
  border: 1px solid var(--aix-premium-gold);
  padding: var(--spacing-2xl);
  border-radius: var(--radius);
}

@media (max-width: 480px) {
  .form-card {
    padding: var(--spacing-lg);
  }
}

.form-card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--aix-white);
}

.form-card-subtitle {
  font-size: 14px;
  color: var(--aix-platinum);
  margin-bottom: var(--spacing-xl);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--aix-white);
  font-size: 14px;
}

.form-label__optional {
  font-weight: 400;
  color: var(--aix-platinum);
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--aix-black);
  border: 1px solid var(--aix-gold-hairline);   /* 3.48:1 - the only boundary, so it must clear 3:1 */
  border-radius: var(--radius);
  color: var(--aix-white);
  font-family: inherit;
  font-size: 16px;                              /* 16px prevents iOS zoom-on-focus */
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
  color: var(--aix-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--aix-primary-gold);
  box-shadow: 0 0 0 3px var(--aix-gold-wash);
}

.form-error {
  color: var(--aix-error);
  font-size: 13px;
  margin-top: var(--spacing-xs);
  display: none;
  font-weight: 600;
}

.form-error.show {
  display: block;
}

.form-group.has-error .form-input {
  border-color: var(--aix-error);
  background-color: var(--aix-error-bg);
}

.form-hint {
  font-size: 12px;
  color: var(--aix-platinum);
  margin-top: var(--spacing-xs);
}

/* Consent checkbox. The 20px box plus the label's padding gives a >48px row target. */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  font-size: 13px;
  color: var(--aix-platinum);
  line-height: 1.6;
}

.form-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--aix-primary-gold);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}

.form-group.has-error .form-checkbox {
  color: var(--aix-error);
}

.form-consent {
  font-size: 12px;
  color: var(--aix-platinum);
  margin-top: var(--spacing-lg);
  line-height: 1.6;
}

.form-success {
  color: var(--aix-primary-gold);
  font-weight: 600;
  display: none;
  margin-top: var(--spacing-lg);
}

.form-success.show {
  display: block;
}

.form-loading {
  display: none;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  font-size: 14px;
  color: var(--aix-platinum);
}

.form-loading.show {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--aix-primary-gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}


/* ========== 13. HERO ========== */
.hero {
  padding-top: var(--spacing-4xl);
  padding-bottom: var(--spacing-3xl);
  background: linear-gradient(135deg, var(--aix-black) 0%, var(--aix-dark-gray) 100%);
  border-bottom: 1px solid var(--aix-dark-gray);
  text-align: center;
}

.hero-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  margin-bottom: var(--spacing-lg);
}

.hero-headline {
  margin-bottom: var(--spacing-lg);
  color: var(--aix-white);
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-subheadline {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--aix-platinum);
  margin-bottom: var(--spacing-xl);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-meta {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--aix-premium-gold);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--aix-gold-hairline);
}

.hero-cta {
  display: inline-block;
  margin-top: var(--spacing-sm);
}

.hero-reassurance {
  font-size: 13px;
  color: var(--aix-platinum);
  margin-top: var(--spacing-lg);
  margin-bottom: 0;
}

.hero-intro {
  max-width: 62ch;
  margin: var(--spacing-3xl) auto 0;
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--aix-hairline);
  text-align: left;
  color: var(--aix-platinum);
  font-size: 17px;
}

.hero-intro strong {
  color: var(--aix-white);
}


/* ========== 14. CARD GRID ========== */
/* Used by the landing page's four leverage dimensions and the results priorities. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  margin-top: var(--spacing-2xl);
  list-style: none;
}

.card-grid--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .card-grid,
  .card-grid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .card-grid,
  .card-grid--cols-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--aix-dark-gray);
  border: 1px solid var(--aix-premium-gold);
  padding: var(--spacing-xl);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color var(--transition-standard), transform var(--transition-standard);
}

.card:hover {
  border-color: var(--aix-primary-gold);
  transform: translateY(-4px);
}

.card__accent {
  width: 40px;
  height: 3px;
  background-color: var(--aix-primary-gold);
  margin-bottom: var(--spacing-lg);
}

.card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--aix-white);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card__text {
  color: var(--aix-platinum);
  flex-grow: 1;
  line-height: 1.7;
  margin-bottom: 0;
}


/* ========== 15. CHECKLIST ========== */
.checklist {
  list-style: none;
  max-width: 62ch;
  margin: var(--spacing-2xl) auto 0;
}

.checklist__item {
  position: relative;
  padding: var(--spacing-md) 0 var(--spacing-md) var(--spacing-xl);
  border-bottom: 1px solid var(--aix-hairline);
  color: var(--aix-platinum);
  font-size: 17px;
  line-height: 1.6;
}

.checklist__item:last-child {
  border-bottom: 0;
}

/* Decorative marker - the list semantics already convey structure, so aria-hidden
   is unnecessary on a ::before. */
.checklist__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.55em;
  width: 12px;
  height: 1px;
  background-color: var(--aix-primary-gold);
}


/* ========== 16. FINAL CTA ========== */
.final-cta {
  background: linear-gradient(135deg, var(--aix-black) 0%, var(--aix-dark-gray) 100%);
  border-top: 1px solid var(--aix-dark-gray);
  border-bottom: 1px solid var(--aix-dark-gray);
  padding: var(--spacing-3xl) 0;
  text-align: center;
}

.final-cta-headline {
  margin-bottom: var(--spacing-lg);
  color: var(--aix-white);
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
}

.final-cta-copy {
  font-size: 18px;
  color: var(--aix-platinum);
  margin-bottom: var(--spacing-xl);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}


/* ========== 17. QUIZ - SHELL & SCREENS ========== */
.quiz {
  padding: var(--spacing-2xl) 0 var(--spacing-4xl);
  min-height: 70vh;
}

/* Screens are toggled with the `hidden` attribute, which needs !important to beat
   the flex display below. */
.quiz-screen {
  animation: screenIn var(--transition-standard) ease-out;
}

.quiz-screen__eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  margin-bottom: var(--spacing-lg);
}

/* The <legend> carries the question text. Resetting the UA legend styles is required
   or it renders inline at the fieldset border. */
.quiz-question {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.quiz-question__legend {
  display: block;
  width: 100%;
  padding: 0;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--aix-white);
  margin-bottom: var(--spacing-xl);
}

/* The legend receives programmatic focus on screen change; a visible ring on a
   heading-like element reads as a rendering bug, so suppress it. Focus is still
   announced because the legend is the group's accessible name. */
.quiz-question__legend:focus,
.quiz-welcome__headline:focus,
.quiz-lead__headline:focus {
  outline: none;
}

.quiz-welcome__headline {
  margin-bottom: var(--spacing-lg);
}

.quiz-welcome__copy {
  font-size: 18px;
  color: var(--aix-platinum);
  line-height: 1.8;
  margin-bottom: var(--spacing-xl);
  max-width: 60ch;
}

.quiz-welcome__note {
  font-size: 14px;
  color: var(--aix-platinum);
  margin-top: var(--spacing-lg);
  margin-bottom: 0;
}

.quiz-error {
  display: none;
  margin-top: var(--spacing-lg);
  padding: var(--spacing-sm) var(--spacing-md);
  border-left: 3px solid var(--aix-error);
  background-color: var(--aix-error-bg);
  color: var(--aix-error);
  font-size: 14px;
  font-weight: 600;
}

.quiz-error.show {
  display: block;
}


/* ========== 18. QUIZ - PROGRESS ========== */
.quiz-progress {
  margin-bottom: var(--spacing-2xl);
}

.quiz-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.quiz-progress__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
}

.quiz-progress__pct {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--aix-muted);
}

/* Track is decorative (aria-hidden); the accessible value lives on the wrapping
   role="progressbar" and in the visible label text. */
.quiz-progress__track {
  height: 2px;
  background-color: var(--aix-hairline);
  border-radius: 1px;
  overflow: hidden;
}

.quiz-progress__fill {
  height: 100%;
  width: var(--pct, 0%);
  background-color: var(--aix-primary-gold);
  transition: width var(--transition-standard);
}


/* ========== 19. QUIZ - ANSWER OPTIONS ========== */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  list-style: none;
}

.quiz-option {
  display: block;
}

/* Visually hidden but focusable and still in the tab order. display:none or
   visibility:hidden would remove it from both. */
.quiz-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.quiz-option__label {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  min-height: 56px;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--aix-dark-gray);
  border: 1px solid var(--aix-gold-hairline);   /* 3.48:1 - the sole control boundary */
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast);
}

/* The keycap doubles as the number-key hint and as a non-colour selection cue. */
.quiz-option__key {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--aix-hairline);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--aix-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.quiz-option__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--aix-white);
}

/* HOVER */
.quiz-option__label:hover {
  background-color: var(--aix-elevated);
  border-color: var(--aix-premium-gold);
}

/* FOCUS - on the label, driven by the visually hidden input */
.quiz-option__input:focus-visible + .quiz-option__label {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}

/* SELECTED - three simultaneous cues so colour is never the only signal:
   a 3px gold left rule (shape), bold text (weight), and a filled keycap. */
.quiz-option__input:checked + .quiz-option__label {
  background-color: var(--aix-elevated);
  border-color: var(--aix-premium-gold);
  border-left-color: var(--aix-primary-gold);
}

.quiz-option__input:checked + .quiz-option__label .quiz-option__text {
  font-weight: 600;
}

.quiz-option__input:checked + .quiz-option__label .quiz-option__key {
  background-color: var(--aix-primary-gold);
  border-color: var(--aix-primary-gold);
  color: var(--aix-black);
}

@media (max-width: 480px) {
  .quiz-option__label {
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
  }

  /* The number keys are unreachable on a touch keyboard, so the hint is noise. */
  .quiz-option__key {
    display: none;
  }
}


/* ========== 20. QUIZ - NAVIGATION ========== */
/* One control pair for all screens, outside the screens themselves. */
.quiz-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--aix-hairline);
}

.quiz-nav__spacer {
  flex-grow: 1;
}

.quiz-nav__back {
  background: none;
  border: 0;
  padding: var(--spacing-sm) 0;
  min-height: 48px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--aix-platinum);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.quiz-nav__back:hover {
  color: var(--aix-primary-gold);
}

.quiz-nav__back:focus-visible {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}

.quiz-nav__hint {
  font-size: 12px;
  color: var(--aix-muted);
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .quiz-nav__hint {
    display: none;
  }
}


/* ========== 21. QUIZ - LEAD CAPTURE ========== */
.quiz-lead__headline {
  margin-bottom: var(--spacing-md);
}

.quiz-lead__copy {
  color: var(--aix-platinum);
  margin-bottom: var(--spacing-xl);
  font-size: 17px;
}

.quiz-lead__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--spacing-lg);
}

@media (max-width: 600px) {
  .quiz-lead__grid {
    grid-template-columns: 1fr;
  }
}

.quiz-lead__grid .form-group--full {
  grid-column: 1 / -1;
}


/* ========== 22. RESULTS - STAGE HEADER ========== */
.results {
  padding: var(--spacing-2xl) 0 var(--spacing-3xl);
}

.results-preview-ribbon {
  background-color: var(--aix-primary-gold);
  color: var(--aix-black);
  text-align: center;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.results-stage {
  text-align: center;
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--aix-hairline);
}

.results-stage__eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  margin-bottom: var(--spacing-md);
}

.results-stage__name {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--aix-white);
  margin-bottom: var(--spacing-md);
}

/* The stage summary. Every line of the framework copy for this stage lives
   here, in the card beside the score, rather than being split between here and
   a section further down the page. */
.results-stage__summary > p {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--aix-platinum);
  max-width: 52ch;
  line-height: 1.7;
  margin: 0 0 var(--spacing-sm) 0;
}

.results-stage__summary > p:last-child {
  margin-bottom: 0;
}

/* The first line carries the headline, so it leads. */
.results-stage__summary > p:first-child {
  color: var(--aix-white);
  font-weight: 600;
}


/* ========== 23. RESULTS - SCORE & TIER RULER ========== */
.results-score {
  text-align: center;
  padding: var(--spacing-lg) 0;
}

.results-score__value {
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--aix-primary-gold);
}

.results-score__denominator {
  font-size: 0.35em;
  font-weight: 600;
  color: var(--aix-muted);
  letter-spacing: 0;
}

.results-score__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-platinum);
  margin-top: var(--spacing-sm);
}

/* Five-tier ruler showing where the score falls. */
.results-ruler {
  margin-top: var(--spacing-xl);
}

.results-ruler__track {
  display: grid;
  grid-template-columns: 25fr 25fr 20fr 15fr 16fr;   /* the real band widths */
  gap: 2px;
  height: 4px;
  margin-bottom: var(--spacing-xs);
}

.results-ruler__band {
  background-color: var(--aix-hairline);
  border-radius: 1px;
}

.results-ruler__band.is-current {
  background-color: var(--aix-primary-gold);
}

.results-ruler__labels {
  display: grid;
  grid-template-columns: 25fr 25fr 20fr 15fr 16fr;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--aix-muted);
}

.results-ruler__label {
  text-align: center;
}

/* Not colour alone: the current band's label goes gold AND bold. */
.results-ruler__label.is-current {
  color: var(--aix-primary-gold);
  font-weight: 700;
}

@media (max-width: 600px) {
  .results-ruler__labels {
    font-size: 9px;
    letter-spacing: 0;
  }
}


/* ========== 23b. RESULTS - CARD CTAs ==========
   The pair inside the result card: icon, label, trailing chevron. Two across on
   desktop, stacked below 640px. The closing band at the foot of the page uses the
   plain .btn styles instead; both are filled from the same data-cta group. */
.results-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0 0 0;
}

/* A lone visible CTA should span the row rather than sit in half of it, leaving a
   gap - which is every stage except Operator, since the VA offer is Operator-only.
   :has() is the only way to style a parent's child based on a LATER sibling's
   state; a `~` selector cannot reach backwards to the primary. Where :has() is
   unsupported the primary simply stays half-width, which is untidy but not broken. */
.results-actions:has(> [data-cta="secondary"][hidden]) > [data-cta="primary"] {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .results-actions {
    grid-template-columns: 1fr;
  }
}

.results-action {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  min-height: 60px;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}

.results-action__label {
  flex: 1 1 auto;
}

/* Icons stay a fixed size and never squash when the label wraps. */
.results-action__icon,
.results-action__chev {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.results-action__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.results-action__chev svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* PRIMARY - gold fill, black text. Never white on gold: that is 1.66:1. */
.results-action--primary {
  background-color: var(--aix-primary-gold);
  color: var(--aix-black);
  border: 1px solid var(--aix-primary-gold);
}

.results-action--primary:hover {
  background-color: var(--aix-premium-gold);
  border-color: var(--aix-premium-gold);
  color: var(--aix-black);
  transform: translateY(-1px);
}

.results-action--primary:focus-visible {
  outline: 2px solid var(--aix-white);
  outline-offset: 2px;
}

/* SECONDARY - outlined. The border is the only thing identifying it as a control,
   so it uses the hairline that clears the 3:1 non-text minimum, not #2A2A2A. */
.results-action--secondary {
  background-color: transparent;
  color: var(--aix-white);
  border: 1px solid var(--aix-gold-hairline);
}

.results-action--secondary:hover {
  border-color: var(--aix-primary-gold);
  background-color: var(--aix-elevated);
  color: var(--aix-white);
  transform: translateY(-1px);
}

.results-action--secondary:focus-visible {
  outline: 2px solid var(--aix-primary-gold);
  outline-offset: 2px;
}

.results-action--secondary .results-action__icon,
.results-action--secondary .results-action__chev {
  color: var(--aix-primary-gold);
}


/* ========== 24. RESULTS - DIMENSION BARS ========== */
.results-dimensions {
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--aix-hairline);
}

.dimension-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.dimension {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--spacing-xs) var(--spacing-md);
  align-items: baseline;
}

.dimension__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--aix-white);
}

.dimension__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--aix-white);
  font-variant-numeric: tabular-nums;
}

/* The weakest dimension is flagged by a text badge, not by colour alone. */
.dimension__flag {
  display: inline-block;
  margin-left: var(--spacing-sm);
  padding: 2px var(--spacing-xs);
  border: 1px solid var(--aix-primary-gold);
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  vertical-align: 2px;
}

.dimension__bar {
  grid-column: 1 / -1;
  height: 6px;
  background-color: var(--aix-hairline);
  border-radius: 3px;
  overflow: hidden;
}

/* Premium gold is the default fill; the biggest-gap bar uses primary gold, which is
   the brand's "strong accent" role. Both clear 3:1 against the #2A2A2A track. */
.dimension__fill {
  display: block;
  height: 100%;
  width: calc(var(--pct, 0) * 1%);
  background-color: var(--aix-premium-gold);
  border-radius: 3px;
  transition: width var(--transition-slow) ease-out;
}

.dimension.is-priority .dimension__fill {
  background-color: var(--aix-primary-gold);
}

.dimension__meta {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--aix-muted);
}

/* The diagnosis sentence - the commercial payload of the page. */
.results-diagnosis {
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-lg) var(--spacing-xl);
  background-color: var(--aix-dark-gray);
  border-left: 3px solid var(--aix-primary-gold);
  border-radius: var(--radius);
  font-size: clamp(17px, 2.2vw, 19px);
  line-height: 1.7;
  color: var(--aix-white);
  margin-bottom: 0;
}

.results-diagnosis strong {
  color: var(--aix-primary-gold);
}


/* ========== 25. RESULTS - PRIORITIES ========== */
.results-body {
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--aix-hairline);
}

.results-body__copy p {
  font-size: 17px;
  color: var(--aix-platinum);
  line-height: 1.8;
}

.results-body__copy p:last-child {
  margin-bottom: 0;
}

.results-priorities {
  margin-top: var(--spacing-2xl);
}

.results-priorities__heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-primary-gold);
  margin-bottom: var(--spacing-lg);
}

.results-priorities__list {
  list-style: none;
  counter-reset: priority;
}

.results-priorities__item {
  counter-increment: priority;
  position: relative;
  padding: var(--spacing-md) 0 var(--spacing-md) var(--spacing-xl);
  border-bottom: 1px solid var(--aix-hairline);
  color: var(--aix-white);
  font-size: 17px;
}

.results-priorities__item:last-child {
  border-bottom: 0;
}

.results-priorities__item::before {
  content: counter(priority);
  position: absolute;
  left: 0;
  top: var(--spacing-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--aix-premium-gold);
  font-variant-numeric: tabular-nums;
}


/* ========== 26. RESULTS - CTA BAND ========== */
.results-cta {
  background: linear-gradient(135deg, var(--aix-black) 0%, var(--aix-dark-gray) 100%);
  border-top: 1px solid var(--aix-dark-gray);
  border-bottom: 1px solid var(--aix-dark-gray);
  padding: var(--spacing-3xl) 0;
  text-align: center;
}

.results-cta__headline {
  margin-bottom: var(--spacing-lg);
  max-width: 26ch;
  margin-left: auto;
  margin-right: auto;
}

.results-cta__copy {
  font-size: 18px;
  color: var(--aix-platinum);
  max-width: 58ch;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.8;
}

.results-cta__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.results-cta__buttons .btn {
  max-width: 420px;
  width: 100%;
}

/* Success checkmark, shown above the stage header once results render. */
.results-check {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--spacing-xl);
  border: 2px solid var(--aix-primary-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-check::after {
  content: "";
  display: block;
  width: 16px;
  height: 28px;
  border: 2px solid var(--aix-primary-gold);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-2px, -2px);
  animation: checkAnimation 0.6s ease-out;
}

/* ---------- RESULTS HERO: two columns ----------
   Left column carries stage, score, ruler and the stage video; right column
   carries the booking calendar. The grid rows stretch, so the calendar card
   matches the height of the whole left column instead of floating mid-air.

   Breakpoint is 900px rather than the usual 768px: the calendar widget's own
   internal layout (date grid plus time-slot buttons) starts wrapping badly
   below roughly 420px of column width, which is what 900px/2 leaves. */
/* Booking rail is a fixed 380px rather than a fraction: the widget's own layout
   is what has to stay usable, and it does not care how wide the page is. The
   video column takes whatever is left. */
/* align-items: stretch (the default, restated for intent) so the booking rail
   takes the height of the video column rather than its own. That is what caps
   the calendar: picking a date makes the widget taller, form_embed.js grows the
   iframe to match, and without a cap the whole page would stretch. Capping to
   the neighbouring column keeps both sides level and needs no magic number. */
.results-hero {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: var(--spacing-lg);
  align-items: stretch;
}

/* Placed explicitly so the DOM can lead with the video column while the booking
   rail still renders on the left. That keeps the one-column stack below 1000px
   as video -> result -> booking instead of opening with the calendar. */
.results-hero__main {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.results-hero__booking {
  grid-column: 1;
  grid-row: 1;
}

/* ---------- RESULT SUMMARY CARD ---------- */
.results-summary {
  background: var(--aix-dark-gray);
  border: 1px solid var(--aix-hairline);
  border-radius: 16px;
  padding: var(--spacing-xl);
}

.results-summary__head {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.results-summary__score {
  /* Hairline rule between the stage block and the score, per the reference. */
  border-left: 1px solid var(--aix-hairline);
  padding-left: var(--spacing-xl);
  margin-left: auto;
  text-align: center;
  flex-shrink: 0;
}

.results-summary__value {
  margin: 0;
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--aix-primary-gold);
  white-space: nowrap;
}

.results-summary__denominator {
  font-size: 0.42em;
  font-weight: 400;
  color: var(--aix-muted);
}

.results-summary__label {
  margin: var(--spacing-xs) 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aix-muted);
}

/* Not a flex/stretch container: the booking card takes its height from the
   iframe that form_embed.js sizes, so it must be free to be shorter than the
   left column rather than stretched to match it. */
.results-hero__aside {
  display: block;
}

/* The stage name clamp in section 22 is viewport-based and centred, sized for a
   full-width single column. Inside the summary card it sits left-aligned beside
   the score, so it needs its own scale and no centring. */
.results-summary .results-stage {
  padding-bottom: 0;
  border-bottom: 0;
  text-align: left;
  min-width: 0;
}

.results-summary .results-stage__name {
  font-size: clamp(30px, 3.4vw, 46px);
  margin-bottom: var(--spacing-xs);
}

.results-summary .results-stage__subheadline {
  font-size: 16px;
  margin: 0;
  max-width: 40ch;
}

.results-summary .results-stage__eyebrow {
  margin-bottom: var(--spacing-xs);
}

/* ---------- JOURNEY STEPS ----------
   Five stages in a row, joined by a hairline that runs behind the marks. The
   connector is drawn on the list rather than per step so it does not overhang
   the first and last marks. */
.results-journey {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--aix-hairline);
  width: 100%;
  position: relative;
}

.results-journey::before {
  content: "";
  position: absolute;
  top: 53px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--aix-hairline);
}

.results-journey__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  position: relative;
}

.results-journey__mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--aix-hairline);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aix-muted);
  /* Opaque so the connector hairline passes behind, not through. */
  background: var(--aix-black);
}

.results-journey__mark svg {
  width: 21px;
  height: 21px;
}

.results-journey__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--aix-muted);
  line-height: 1.3;
}

/* Not colour alone: the current step also gets a ring and bolder label. */
.results-journey__step.is-current .results-journey__mark {
  border-color: var(--aix-primary-gold);
  color: var(--aix-primary-gold);
  box-shadow: 0 0 0 3px var(--aix-gold-wash);
}

.results-journey__step.is-current .results-journey__label {
  color: var(--aix-primary-gold);
  font-weight: 700;
}

/* Stage video, in a card matching the summary and booking cards. */
.results-media {
  background: var(--aix-dark-gray);
  border: 1px solid var(--aix-hairline);
  border-radius: 16px;
  padding: 5px;
}

.results-media__player {
  background: var(--aix-black);
  border-radius: 10px;
  overflow: hidden;
}

.results-media__player video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Booking calendar wrapper. Now it DOES draw the card, unlike earlier: the
   widget's own page paints a light edge around its dark card plus a thicker band
   under it, and since that lives inside a cross-origin iframe it cannot be
   styled - only clipped. So this wrapper owns the border and radius, hides the
   overflow, and the iframe below is bled outwards to push that light edge
   outside the clip.

   height: 100% takes the height of the video column (see align-items on
   .results-hero). Picking a date makes the widget taller and form_embed.js grows
   the iframe to match; capping it here means the page stops stretching and this
   card scrolls instead.

   overflow-x hidden + overflow-y auto, not `overflow: hidden` plus a separate
   rule: the horizontal axis is doing the clipping, the vertical axis is doing
   the scrolling. */
/* SCOPE NOTE. Scrolling is applied to this wrapper, so the WHOLE widget scrolls.
   Confining the scroll to the time-slot list alone - keeping the widget's header,
   selected date and timezone pinned - would need a rule on an element inside the
   iframe (.time-slots-container or similar). No such element exists in this
   document; it belongs to GoHighLevel's page, and the same-origin policy blocks
   reaching across. That part has to be done as custom CSS on the GoHighLevel
   calendar, or by replacing the embed with our own booking UI.

   overscroll-behavior: contain stops the scroll chaining onward to the page once
   this card reaches either end. */
.results-booking {
  width: 100%;
  /* max-height, NOT height. height: 100% made the card taller than the iframe
     whenever the widget's content was short, which left the iframe's own light
     bottom edge stranded mid-card with dark wrapper below it - exactly where a
     mask pinned to the card's bottom could not reach. Hugging the iframe puts
     that edge at the card's bottom, where the sticky mask below covers it, while
     the cap still applies once the slots expand. */
  height: auto;
  max-height: 100%;
  background: var(--aix-dark-gray);
  border: 1px solid var(--aix-hairline);
  border-radius: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Gold thumb on a transparent track. --aix-gold-hairline (55% alpha) rather
     than a solid gold: when the content only slightly overflows, the thumb is
     nearly track-height and a solid fill reads as a stray gold rule down the
     card rather than a scrollbar. It brightens on hover. */
  scrollbar-width: thin;
  scrollbar-color: var(--aix-gold-hairline) transparent;
}

/* Masks the widget's own light bottom edge. Sticky rather than absolute, and
   inside the scroll container rather than on its parent, so it tracks the bottom
   of whatever is currently visible: it sits at the card's bottom edge when the
   content is short, and stays pinned to the bottom of the scrollport once the
   slots expand and the card scrolls.

   The negative margin keeps it from adding height, and pointer-events: none lets
   clicks through to the calendar. */
.results-booking::after {
  content: "";
  display: block;
  position: sticky;
  bottom: 0;
  height: 18px;
  margin-top: -18px;
  background: var(--aix-dark-gray);
  pointer-events: none;
}

.results-booking::-webkit-scrollbar {
  width: 8px;
}

.results-booking::-webkit-scrollbar-track {
  background: transparent;
}

.results-booking::-webkit-scrollbar-thumb {
  background: var(--aix-gold-hairline);
  border-radius: 4px;
  /* Inset the thumb off the card's edge without a border-colour hack. */
  background-clip: padding-box;
  border: 2px solid transparent;
}

.results-booking::-webkit-scrollbar-thumb:hover {
  background: var(--aix-premium-gold);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* No height and no filter here, both deliberately.

   Height is owned by form_embed.js, which sets it inline to the widget's real
   content height. Declaring height/min-height here fights that and brings back
   the background band below the content.

   Filter: darkening this cross-origin iframe from CSS is only possible with
   filter: invert(1), which applies to the iframe's entire rendered output as one
   layer - the AAiX logo inside inverts too and cannot be exempted. Tried and
   reverted. The theme is set in the GoHighLevel calendar's Customizations tab
   (widget style Neo, primary #FEBF10, background #151515) instead. */
/* Bled outwards so the widget's own light page edge lands outside the wrapper's
   clip instead of framing the card. Kept deliberately small and uniform: a bleed
   is a clip, and a large one would eat the widget's last row of real content.
   The thicker band below the card is handled by the mask on
   .results-hero__booking::after instead, which covers rather than cuts. */
.calendar-widget {
  display: block;
  width: calc(100% + 8px);
  margin: -3px -4px;
  border: 0;
}

/* Defensive, and load-bearing. form_embed.js hides every iframe it manages the
   moment it loads (opacity 0, visibility hidden, position absolute, left
   -9999px) and reveals it again only when the widget posts back that it has
   resized - a reveal keyed on the iframe's id via an internal registry. If that
   message never arrives, the calendar stays invisible and nobody can book.

   Measured hidden in headless Chrome, where the widget never finishes loading.
   Whether it also stays hidden in a real browser is unconfirmed, so rather than
   depend on their reveal firing, the visible state is asserted here. Inline
   styles lose to !important, so this wins over whatever the script sets.

   Cost of being wrong: if GoHighLevel ever uses that hidden state for a genuine
   transition, it will flash instead of fading. Worth it against a calendar that
   silently disappears. */
.calendar-widget {
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  left: auto !important;
  pointer-events: auto !important;
}

/* 1000px, not the usual 768px: below this the 4fr rail is too narrow for the
   five journey labels and the 7fr column too narrow for the widget's date grid
   to sit beside its time slots. */
/* 1000px, not the usual 768px: the booking rail needs its full 380px and the
   video column stops being the larger of the two well before 768px. */
@media (max-width: 1000px) {
  .results-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-lg);
  }

  /* Drop the explicit placement so the source order stacks naturally as
     video -> result -> booking. */
  .results-hero__main,
  .results-hero__booking {
    grid-column: auto;
    grid-row: auto;
  }

  /* No neighbouring column to match, so nothing to cap against. Let the card
     take its natural height and let the page scroll instead of trapping the
     calendar in its own scroll area on a small screen. */
  .results-booking {
    height: auto;
    overflow-y: visible;
  }
}

/* The score cannot sit beside the stage name in a narrow card - the hairline
   rule and the 68px number leave the name no room. Stack them instead. */
@media (max-width: 700px) {
  .results-summary {
    padding: var(--spacing-lg);
  }

  .results-summary__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-lg);
  }

  .results-summary__score {
    border-left: 0;
    border-top: 1px solid var(--aix-hairline);
    padding-left: 0;
    padding-top: var(--spacing-lg);
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
}

/* Empty state - shown when results.html is opened with no stored assessment. */
.results-empty {
  text-align: center;
  padding: var(--spacing-4xl) 0;
}

.results-empty__copy {
  color: var(--aix-platinum);
  font-size: 18px;
  max-width: 52ch;
  margin: 0 auto var(--spacing-xl);
}


/* ========== 27. ANIMATIONS ========== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes checkAnimation {
  0%   { width: 0;    height: 0;    opacity: 0; }
  100% { width: 16px; height: 28px; opacity: 1; }
}

.fade-in {
  animation: fadeIn var(--transition-standard) ease-out;
}


/* ========== 28. EMBEDDED IN THE GHL IFRAME ==========
   .is-embedded is set by a blocking inline script in the <head> of quiz.html
   and results.html when window.self !== window.top, so these rules apply
   before first paint. Standalone they never match.

   The frame is viewport-pinned and scrolls itself (see ghl-custom-code.html),
   which means the app behaves exactly as it does standalone - the header, the
   min-height and window.scrollTo all still work against a real viewport. So
   the only thing to do here is hide the frame's scrollbar chrome, since the
   GHL page around it has none and a nested scrollbar looks like a mistake.
   Scrolling itself still works: wheel, trackpad, touch and keys. */
.is-embedded {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* legacy Edge */
}

.is-embedded::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* ========== 29. PRINT ========== */
/* The results page is worth printing to bring to the strategy call. */
@media print {
  :root {
    --aix-black: #FFFFFF;
    --aix-white: #000000;
    --aix-platinum: #333333;
    --aix-muted: #555555;
    --aix-dark-gray: #FFFFFF;
    --aix-elevated: #FFFFFF;
    --aix-hairline: #CCCCCC;
  }

  body {
    background: #FFFFFF;
    color: #000000;
  }

  header,
  footer,
  .results-cta__buttons,
  .results-preview-ribbon,
  .quiz-nav {
    display: none !important;
  }

  .dimension__fill {
    background-color: #000000 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .dimension__bar,
  .results-ruler__band {
    border: 1px solid #000000;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .results-score__value,
  .results-diagnosis strong {
    color: #000000;
  }

  .results-diagnosis {
    border-left: 3px solid #000000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 11px;
    color: #555555;
  }
}
