/* artifacts/charity-craig-site/public/recovery-quiz.css
   Brand-native redesign — tokens from brand/colors_and_type.css
   Fonts: Montserrat (body/labels), Georgia (headings),
   Grayscale Signature (script accent, local)
   Uses only the Charity Craig visual language
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Grayscale Signature';
  src: url('fonts/GrayscaleSignature.ttf') format('truetype');
  font-display: swap;
}

/* ─── Design-system tokens (verbatim from brand/colors_and_type.css) ─── */
:root {
  /* Palette */
  --cc-dusty-shoes:      #e8e9eb;
  --cc-a-lifetime:       #fff3f1;
  --cc-perfect-love:     #fdc2c2;
  --cc-radical:          #d6e7f0;
  --cc-cathedral:        #5f95c1;
  --cc-so-much-more:     #3d495b;
  --cc-golden-hour:      #fdd87c;
  --cc-golden-hour-deep: #fbcd5c;

  /* Semantic */
  --cc-bg:               #ffffff;
  --cc-bg-soft:          var(--cc-a-lifetime);
  --cc-bg-cool:          var(--cc-dusty-shoes);
  --cc-bg-deep:          var(--cc-so-much-more);
  --cc-fg:               var(--cc-so-much-more);
  --cc-fg-muted:         #6b7585;
  --cc-fg-subtle:        #9aa3b1;
  --cc-fg-on-deep:       #ffffff;
  --cc-fg-on-deep-muted: #c7ced8;
  --cc-accent:           var(--cc-cathedral);
  --cc-border:           #e3e5ea;
  --cc-border-strong:    #c9ced6;

  /* Type */
  --cc-font-logo:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --cc-font-display: Georgia, serif;
  --cc-font-alt:     Georgia, serif;
  --cc-font-body:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --cc-font-script:  'Grayscale Signature', cursive;

  /* Scale */
  --cc-text-xxs:  11px;
  --cc-text-xs:   13px;
  --cc-text-sm:   15px;
  --cc-text-base: 17px;
  --cc-text-md:   19px;
  --cc-text-lg:   22px;
  --cc-text-xl:   28px;
  --cc-text-2xl:  36px;
  --cc-text-3xl:  48px;
  --cc-text-4xl:  64px;

  --cc-track-logo:    0.32em;
  --cc-track-heading: 0.16em;
  --cc-track-body:    0.06em;

  --cc-lh-tight: 1.12;
  --cc-lh-snug:  1.28;
  --cc-lh-body:  1.65;
  --cc-lh-loose: 1.85;

  --cc-w-light:   300;
  --cc-w-regular: 400;
  --cc-w-medium:  500;
  --cc-w-semibold: 600;
  --cc-w-bold:    700;

  /* Spacing (8-pt) */
  --cc-space-1:   4px;
  --cc-space-2:   8px;
  --cc-space-3:  12px;
  --cc-space-4:  16px;
  --cc-space-5:  24px;
  --cc-space-6:  32px;
  --cc-space-7:  48px;
  --cc-space-8:  64px;
  --cc-space-9:  96px;

  /* Radii */
  --cc-radius-none:  0;
  --cc-radius-xs:    2px;
  --cc-radius-sm:    4px;
  --cc-radius-md:    8px;
  --cc-radius-lg:   16px;
  --cc-radius-photo: 20px;
  --cc-radius-pill: 999px;

  /* Shadows */
  --cc-shadow-xs:    0 1px 2px   rgba(61,73,91,.04);
  --cc-shadow-sm:    0 2px 8px   rgba(61,73,91,.06);
  --cc-shadow-md:    0 8px 24px  rgba(61,73,91,.08);
  --cc-shadow-lg:    0 20px 48px rgba(61,73,91,.10);
  --cc-shadow-photo: 0 24px 60px rgba(61,73,91,.14);

  /* Motion */
  --cc-ease:     cubic-bezier(0.32,0.72,0.24,1);
  --cc-ease-out: cubic-bezier(0.16,1,0.3,1);
  --cc-dur-fast: 160ms;
  --cc-dur-base: 280ms;
  --cc-dur-slow: 520ms;

  /* Layout */
  --cc-container: 1200px;
  --cc-gutter:     24px;

  /* Quiz-specific layout */
  --q-col-width: 680px;
  --q-gutter:    var(--cc-space-5);
}

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

body {
  margin: 0;
  background: var(--cc-bg);
  color: var(--cc-fg);
  font-family: var(--cc-font-body);
  font-size: var(--cc-text-base);
  line-height: var(--cc-lh-body);
  letter-spacing: var(--cc-track-body);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p { text-wrap: pretty; margin: 0; }

/* ─── Focus visible ────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cc-cathedral);
  outline-offset: 3px;
}

button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cc-cathedral);
  outline-offset: 3px;
}

/* ─── Screen utility ────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── App shell ────────────────────────────────────────────────────────── */
.ci-app {
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.ci-app.is-fixed {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.ci-app.is-scrollable {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow: visible;
}

/* ─── Screen surface variants ──────────────────────────────────────────── */

/* Intro screen: white background with subtle cool-grey geometry */
.ci-dark-screen {
  background: var(--cc-bg);
  color: var(--cc-fg);
}

/* The dot-grid texture lifted from recovery-stages visual language */
.ci-dark-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: radial-gradient(var(--cc-border-strong) .5px, transparent .5px);
  background-size: 20px 20px;
}

/* Question / gate screens: warm blush (--cc-a-lifetime) */
.ci-question-screen,
.ci-review-screen,
.ci-confirm-screen {
  background: var(--cc-bg-soft);
  color: var(--cc-fg);
}

/* ─── Topbar ───────────────────────────────────────────────────────────── */
.ci-topbar {
  height: 84px;
  padding: 0 var(--cc-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  flex: none;
  background: var(--cc-bg);
  border-bottom: 1px solid var(--cc-border);
}

.ci-topbar.is-sticky {
  position: sticky;
  top: 0;
}

/* Topbar on intro (white screen — matches .ci-dark-screen which is white) */
.ci-dark-screen .ci-topbar.is-sticky {
  background: var(--cc-bg);
}

/* Topbar on question screen (blush) */
.ci-question-screen .ci-topbar.is-sticky,
.ci-review-screen .ci-topbar.is-sticky,
.ci-confirm-screen .ci-topbar.is-sticky {
  background: var(--cc-bg-soft);
}

.ci-brand {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}

.ci-brand img {
  width: clamp(148px, 16vw, 200px);
  height: auto;
  display: block;
}

.ci-private {
  display: flex;
  gap: var(--cc-space-2);
  align-items: center;
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
}

/* Dot before "Private & confidential" — mirrors recovery-stages .private-badge::before */
.ci-private svg {
  opacity: 0.5;
}

/* ─── Eyebrow / kicker label ────────────────────────────────────────────── */
.ci-eyebrow,
.ci-start-kicker,
.ci-question-kicker,
.ci-overline {
  font-family: var(--cc-font-logo);
  font-weight: var(--cc-w-semibold);
  font-size: var(--cc-text-xs);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-muted);
  display: block;
}

/* ─── Duration pill ─────────────────────────────────────────────────────── */
.ci-duration {
  display: inline-flex;
  align-items: center;
  gap: var(--cc-space-2);
  background: var(--cc-a-lifetime);
  border: 1px solid var(--cc-border-strong);
  border-radius: var(--cc-radius-xs);
  color: var(--cc-fg-muted);
  padding: 7px 14px;
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  width: max-content;
  max-width: 100%;
}

/* The coloured dot inside the duration pill */
.ci-duration span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cc-cathedral);
  flex: none;
}

/* ─── Primary CTA button ─────────────────────────────────────────────────
   Gold (#fdd87c) fill, navy foreground — matches recovery-stages .btn-primary
   ──────────────────────────────────────────────────────────────────────── */
.ci-lime-button {
  display: inline-flex;
  gap: var(--cc-space-5);
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--cc-radius-xs);
  background: var(--cc-golden-hour);
  color: var(--cc-so-much-more);
  font-family: var(--cc-font-logo);
  font-weight: var(--cc-w-bold);
  font-size: var(--cc-text-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 18px 40px;
  transition:
    background var(--cc-dur-base) var(--cc-ease-out),
    transform   var(--cc-dur-base) var(--cc-ease-out);
  cursor: pointer;
}

.ci-lime-button:hover:not(:disabled) {
  background: var(--cc-golden-hour-deep);
  transform: translateY(-2px);
}

.ci-lime-button:active:not(:disabled) {
  transform: scale(.98);
}

.ci-lime-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Back / ghost button ───────────────────────────────────────────────── */
.ci-back-button,
.ci-return {
  display: inline-flex;
  align-items: center;
  gap: var(--cc-space-2);
  border: 0;
  background: transparent;
  color: var(--cc-fg-muted);
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 9px 0;
  transition: color var(--cc-dur-fast);
}

.ci-back-button:hover,
.ci-return:hover {
  color: var(--cc-cathedral);
}

/* ─── Footer watermark ──────────────────────────────────────────────────── */
.ci-dark-footer {
  position: absolute;
  bottom: var(--cc-space-5);
  left: 50%;
  width: calc(100% - (var(--cc-gutter) * 2));
  text-align: center;
  transform: translateX(-50%);
  color: var(--cc-fg-subtle);
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xxs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  z-index: 1;
}

.ci-dark-footer span {
  color: var(--cc-cathedral);
  padding: 0 var(--cc-space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INTRO SCREEN — fully centered content with a compact portrait
   ═══════════════════════════════════════════════════════════════════════════ */
.ci-start-split {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 96px) var(--cc-gutter) clamp(80px, 12vh, 120px);
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-6);
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: ci-rise var(--cc-dur-slow) var(--cc-ease-out) both;
}

/* Compact portrait centered above the intro copy */
.ci-start-image-col {
  position: relative;
  flex: none;
  width: 112px;
  height: 112px;
  z-index: 2;
}

.ci-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--cc-shadow-md);
  border: 2px solid var(--cc-bg);
  background: var(--cc-bg-soft);
}

/* Hairline border over the photo — brand "airy" aesthetic */
.ci-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  pointer-events: none;
}

.ci-image-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Compact name/title tile attached to the portrait's lower-right corner */
.ci-founder-badge {
  position: absolute;
  right: -104px;
  bottom: -14px;
  min-width: 132px;
  padding: 8px 10px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  box-shadow: var(--cc-shadow-md);
  text-align: left;
  z-index: 3;
}

.ci-founder-name {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: 11px;
  letter-spacing: var(--cc-track-heading);
  color: var(--cc-fg);
  text-transform: uppercase;
  line-height: var(--cc-lh-tight);
  margin-bottom: 4px;
  white-space: nowrap;
}

.ci-founder-title {
  font-family: var(--cc-font-logo);
  font-size: 8px;
  font-weight: var(--cc-w-semibold);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
  white-space: nowrap;
}

/* Content column */
.ci-start-content-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 760px);
}

.ci-start-content-col .ci-duration {
  margin: 0 auto var(--cc-space-5);
}

.ci-start-content-col .ci-start-kicker {
  margin-bottom: var(--cc-space-4);
}

/* Main headline — Georgia uppercase, matches recovery-stages .hero-headline */
.ci-start-content-col h1 {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: var(--cc-lh-tight);
  letter-spacing: var(--cc-track-heading);
  text-transform: uppercase;
  color: var(--cc-so-much-more);
  margin: 0 0 var(--cc-space-6);
  max-width: 560px;
  text-align: center;
  white-space: nowrap;
}

/* Signature accent — matches the Charity Craig heading treatment */
.ci-start-content-col h1 em,
.ci-confirm h1 em {
  display: inline-block;
  font-family: var(--cc-font-script);
  font-style: normal;
  font-weight: var(--cc-w-regular);
  text-transform: none;
  letter-spacing: 0;
  color: var(--cc-golden-hour);
  font-size: 1.2em;
  line-height: 1;
  transform: rotate(-13deg);
  transform-origin: center;
}

.ci-start-content-col h1 em {
  position: relative;
  left: clamp(86px, 8vw, 118px);
}

.ci-start-copy {
  font-family: var(--cc-font-body);
  font-weight: var(--cc-w-light);
  font-size: var(--cc-text-md);
  line-height: var(--cc-lh-loose);
  color: var(--cc-fg-muted);
  max-width: 620px;
  text-align: center;
}

.ci-start-copy p { margin-bottom: 1.15em; }
.ci-start-copy p:last-child { margin-bottom: 0; }

.ci-start-actions {
  margin-top: var(--cc-space-7);
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-4);
  align-items: center;
}

.ci-start-note {
  display: flex;
  align-items: center;
  gap: var(--cc-space-2);
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xxs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.ci-progress-area {
  width: min(var(--q-col-width), calc(100% - (2 * var(--q-gutter))));
  margin: clamp(4px, .8vh, 8px) auto 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.ci-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--cc-space-4);
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xxs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
  margin-bottom: clamp(5px, 1vh, 10px);
}

.ci-progress-label > span { white-space: nowrap; }
.ci-progress-percent { margin-left: auto; text-align: right; }

.ci-progress-track {
  height: 2px;
  background: var(--cc-border);
  border-radius: var(--cc-radius-none);
  overflow: hidden;
}

.ci-progress-track div {
  height: 100%;
  background: var(--cc-cathedral);
  transition: width .55s cubic-bezier(.2,.8,.2,1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUESTION SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.ci-question {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(14px, 3.5vh, 40px) var(--q-gutter) clamp(8px, 2vh, 20px);
  transition:
    opacity  var(--cc-dur-fast) ease,
    transform var(--cc-dur-fast) ease;
}

.ci-question.is-moving {
  opacity: 0;
  transform: translateY(14px);
}

.ci-question-inner {
  width: min(var(--q-col-width), 100%);
  margin: 0 auto;
  animation: ci-rise .45s var(--cc-ease-out) both;
}

/* Question number — eyebrow numeral in gold (draws the eye without being garish) */
.ci-question-number {
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xs);
  font-weight: var(--cc-w-bold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-cathedral);
  margin-bottom: clamp(4px, .8vh, var(--cc-space-3));
}

.ci-question-kicker {
  margin-bottom: clamp(4px, 1vh, var(--cc-space-4));
}

/* Question heading — Georgia uppercase, architectural */
.ci-question h1 {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: clamp(25px, min(3vw, 4.2vh), 40px);
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cc-so-much-more);
  margin: 0;
  max-width: 680px;
}

.ci-question h1.ci-question-heading-compact {
  max-width: 680px;
  font-size: clamp(25px, min(3vw, 4.2vh), 38px);
  line-height: 1.1;
  letter-spacing: .06em;
}

.ci-question h1.ci-question-heading-compact + .ci-choice-list {
  margin-top: clamp(10px, 1.8vh, var(--cc-space-5));
}

/* ─── Choice list ───────────────────────────────────────────────────────── */
.ci-choice-list {
  display: flex;
  flex-direction: column;
  gap: clamp(5px, .8vh, var(--cc-space-2));
  margin-top: clamp(10px, 2.2vh, var(--cc-space-6));
  max-width: 620px;
}

.ci-choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--cc-space-4);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xs);
  background: var(--cc-bg);
  text-align: left;
  color: var(--cc-fg-muted);
  padding: clamp(9px, 1.5vh, var(--cc-space-4)) var(--cc-space-5);
  min-height: clamp(44px, 6.2vh, 56px);
  font-family: var(--cc-font-body);
  font-size: var(--cc-text-sm);
  font-weight: var(--cc-w-regular);
  line-height: var(--cc-lh-snug);
  transition:
    transform var(--cc-dur-base) var(--cc-ease-out),
    border-color var(--cc-dur-base) var(--cc-ease-out),
    background   var(--cc-dur-base) var(--cc-ease-out),
    color        var(--cc-dur-base) var(--cc-ease-out),
    box-shadow   var(--cc-dur-base) var(--cc-ease-out);
}

.ci-choice:hover {
  transform: translateX(4px);
  border-color: var(--cc-border-strong);
  background: var(--cc-bg);
  color: var(--cc-fg);
  box-shadow: var(--cc-shadow-sm);
}

.ci-choice.is-selected {
  background: var(--cc-radical);
  border-color: var(--cc-cathedral);
  color: var(--cc-so-much-more);
  box-shadow: var(--cc-shadow-xs);
}

/* Lettered index bubble */
.ci-choice-index {
  height: 24px;
  width: 24px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--cc-font-logo);
  font-size: 10px;
  font-weight: var(--cc-w-bold);
  letter-spacing: 0;
  color: var(--cc-fg-subtle);
  transition:
    border-color var(--cc-dur-base) var(--cc-ease-out),
    background   var(--cc-dur-base) var(--cc-ease-out),
    color        var(--cc-dur-base) var(--cc-ease-out);
}

.ci-choice.is-selected .ci-choice-index {
  border-color: var(--cc-cathedral);
  background: var(--cc-cathedral);
  color: #fff;
}

/* Check icon on selected choice */
.ci-choice svg {
  margin-left: auto;
  flex: none;
  color: var(--cc-cathedral);
}

/* ─── Question actions row ──────────────────────────────────────────────── */
.ci-question-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--cc-border);
  margin-top: clamp(10px, 2vh, var(--cc-space-7));
  padding-top: clamp(8px, 1.4vh, var(--cc-space-5));
}

/* Enter hint */
.ci-enter-hint {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xxs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
  margin-left: var(--cc-space-4);
}

.ci-enter-hint span {
  border: 1px solid var(--cc-border-strong);
  border-radius: var(--cc-radius-xs);
  padding: 1px 5px;
  color: var(--cc-fg-subtle);
  font-family: var(--cc-font-body);
  font-size: 12px;
}

/* The footer owns a compact row at the bottom of the viewport. */
.ci-question-footer {
  position: static;
  flex: none;
  transform: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xxs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
  width: calc(100% - (var(--q-gutter) * 2));
  margin: 0 auto;
  padding: clamp(4px, .8vh, 8px) var(--q-gutter) clamp(8px, 1.5vh, var(--cc-space-5));
  line-height: 1.45;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GATE (results lead-gen) SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.ci-review {
  flex: 1;
  min-height: 0;
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vh, 52px) var(--cc-space-5) 80px;
  animation: ci-rise var(--cc-dur-slow) var(--cc-ease-out) both;
  display: flex;
  flex-direction: column;
}

/* Overline with short rule */
.ci-overline {
  font-family: var(--cc-font-logo);
  font-weight: var(--cc-w-semibold);
  font-size: var(--cc-text-xs);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-muted);
  display: flex;
  align-items: center;
  gap: var(--cc-space-3);
}

.ci-overline span {
  width: 24px;
  height: 1px;
  background: var(--cc-cathedral);
  flex: none;
}

/* Gate headline */
.ci-review h1 {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: var(--cc-lh-tight);
  letter-spacing: var(--cc-track-heading);
  text-transform: uppercase;
  color: var(--cc-so-much-more);
  margin: var(--cc-space-5) 0 var(--cc-space-3);
}

.ci-review-copy {
  color: var(--cc-fg-muted);
  line-height: var(--cc-lh-body);
  font-size: var(--cc-text-sm);
  max-width: 560px;
  font-weight: var(--cc-w-light);
}

.ci-review-copy p { margin-bottom: 1.15em; }
.ci-review-copy p:last-child { margin-bottom: 0; }

/* Card container for the form */
.ci-summary {
  flex: 1;
  margin-top: var(--cc-space-5);
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xs);
}

/* ─── Form inputs ───────────────────────────────────────────────────────── */
.ci-input-wrap {
  margin-top: var(--cc-space-6);
  position: relative;
}

.ci-input-wrap input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--cc-border-strong);
  background: transparent;
  color: var(--cc-fg);
  padding: 13px 0 14px;
  outline: none;
  font-size: var(--cc-text-lg);
  font-weight: var(--cc-w-light);
  transition: border-color var(--cc-dur-base);
}

.ci-input-wrap input:focus {
  border-color: var(--cc-cathedral);
}

.ci-input-wrap input::placeholder {
  color: var(--cc-fg-subtle);
  font-weight: var(--cc-w-regular);
}

.ci-input-wrap.has-error input {
  border-color: var(--cc-perfect-love);
}

/* Error message */
.ci-error {
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: .06em;
  color: #a94f52;
  margin-bottom: var(--cc-space-2);
}

/* Privacy note under form */
.ci-local-note {
  font-family: var(--cc-font-logo);
  font-size: var(--cc-text-xxs);
  font-weight: var(--cc-w-semibold);
  letter-spacing: var(--cc-track-logo);
  text-transform: uppercase;
  color: var(--cc-fg-subtle);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALCULATING / LOADING SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.ci-confirm {
  flex: 1;
  min-height: 0;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: var(--cc-space-7) var(--cc-space-5) var(--cc-space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: ci-rise .65s var(--cc-ease-out) both;
}

.ci-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cc-radical);
  color: var(--cc-cathedral);
  display: grid;
  place-items: center;
  margin: 0 auto var(--cc-space-6);
}

.ci-confirm h1 {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: clamp(38px, 4.5vw, 54px);
  line-height: var(--cc-lh-tight);
  letter-spacing: var(--cc-track-heading);
  text-transform: uppercase;
  color: var(--cc-so-much-more);
  margin: 0 0 var(--cc-space-4);
}

.ci-confirm > p {
  color: var(--cc-fg-muted);
  line-height: var(--cc-lh-body);
  font-size: var(--cc-text-sm);
  font-weight: var(--cc-w-light);
  max-width: 460px;
  margin: 0 auto;
}

/* ─── Spinner animation ─────────────────────────────────────────────────── */
@keyframes spinner {
  to { transform: rotate(360deg); }
}

.spinner-icon {
  animation: spinner 1.2s linear infinite;
}

/* ─── Page entrance animation ───────────────────────────────────────────── */
@keyframes ci-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Gate form layout helpers ──────────────────────────────────────────── */
.ci-gate-review {
  max-width: 760px;
  padding-bottom: 80px;
}

.ci-gate-form-card {
  padding: clamp(24px, 5vw, 40px);
  display: block;
  max-width: 560px;
  margin-top: var(--cc-space-6);
}

.ci-input-first {
  margin-top: 0;
}

.ci-gate-privacy {
  margin-top: var(--cc-space-6);
}

.ci-gate-submit {
  margin-top: var(--cc-space-6);
}

.ci-submit-btn {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS SCREEN (kept for completeness, in case results are rendered here)
   ═══════════════════════════════════════════════════════════════════════════ */
.ci-results-split {
  flex: 1;
  min-height: 0;
  max-width: var(--cc-container);
  margin: 0 auto;
  padding: clamp(40px, 6vh, 80px) var(--cc-gutter) 110px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(40px, 6vw, 80px);
  animation: ci-rise var(--cc-dur-slow) var(--cc-ease-out) both;
}

.ci-results-sidebar { position: relative; }

.ci-results-expert {
  position: sticky;
  top: 100px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xs);
  overflow: hidden;
  box-shadow: var(--cc-shadow-sm);
}

.ci-expert-photo { width: 100%; background: var(--cc-bg-soft); }
.ci-expert-photo img { display: block; width: 100%; height: auto; }

.ci-expert-note { padding: var(--cc-space-7) var(--cc-space-5); }

.ci-expert-note .ci-overline {
  margin-bottom: var(--cc-space-4);
  color: var(--cc-cathedral);
}

.ci-expert-note p {
  font-size: var(--cc-text-sm);
  line-height: var(--cc-lh-body);
  color: var(--cc-fg-muted);
  font-weight: var(--cc-w-light);
  font-style: italic;
  margin-bottom: var(--cc-space-4);
}

.ci-expert-signature {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
}

.ci-results-content {
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-6);
}

.ci-results-header { margin-bottom: var(--cc-space-3); }

.ci-results-header h1 {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: clamp(36px, 4vw, 52px);
  line-height: var(--cc-lh-tight);
  letter-spacing: var(--cc-track-heading);
  text-transform: uppercase;
  color: var(--cc-so-much-more);
  margin: var(--cc-space-4) 0;
}

.ci-result-card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--cc-radius-xs);
  border: 1px solid var(--cc-border);
  background: var(--cc-bg);
  box-shadow: var(--cc-shadow-xs);
}

.ci-result-card.is-highlight {
  background: var(--cc-radical);
  border-color: var(--cc-cathedral);
  box-shadow: var(--cc-shadow-sm);
}

.ci-result-card.is-highlight .ci-overline,
.ci-result-card.is-highlight h2,
.ci-result-card.is-highlight .ci-review-copy {
  color: var(--cc-so-much-more);
}

.ci-result-card h2 {
  font-family: var(--cc-font-alt);
  font-weight: var(--cc-w-regular);
  font-size: clamp(24px, 3vw, 32px);
  line-height: var(--cc-lh-snug);
  letter-spacing: var(--cc-track-heading);
  text-transform: uppercase;
  margin: var(--cc-space-4) 0 var(--cc-space-5);
  color: var(--cc-so-much-more);
}

.ci-results-closing {
  margin-top: var(--cc-space-5);
  padding: var(--cc-space-8);
  text-align: center;
  background: var(--cc-so-much-more);
  border: 1px solid var(--cc-so-much-more);
  border-radius: var(--cc-radius-xs);
}

.ci-results-closing-title {
  margin: 0 0 var(--cc-space-5);
  color: var(--cc-fg-on-deep);
  font-family: var(--cc-font-alt);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: var(--cc-w-regular);
  letter-spacing: var(--cc-track-heading);
  line-height: var(--cc-lh-snug);
  text-transform: uppercase;
}

.ci-results-closing .ci-review-copy {
  color: var(--cc-fg-on-deep-muted);
}

.ci-closing-link {
  display: inline-flex;
  align-items: center;
  gap: var(--cc-space-4);
  margin-top: var(--cc-space-4);
  padding: 18px 40px;
  background: var(--cc-golden-hour);
  color: var(--cc-so-much-more);
  border-radius: var(--cc-radius-xs);
  font-family: var(--cc-font-logo);
  font-weight: var(--cc-w-bold);
  font-size: var(--cc-text-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background var(--cc-dur-base) var(--cc-ease-out),
    transform   var(--cc-dur-base) var(--cc-ease-out);
}

.ci-closing-link:hover {
  background: var(--cc-golden-hour-deep);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — tablet: stack intro columns
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .ci-start-split {
    padding-top: clamp(40px, 6vh, 64px);
  }

  .ci-start-image-col {
    width: 100px;
    height: 100px;
  }

  .ci-start-content-col {
    align-items: center;
  }

  .ci-start-content-col .ci-duration {
    margin: 0 auto var(--cc-space-5);
  }

  .ci-start-content-col h1 {
    text-align: center;
  }

  .ci-start-copy {
    text-align: center;
  }

  .ci-start-actions {
    align-items: center;
  }

  .ci-start-note {
    justify-content: center;
  }

  /* Results: stack sidebar below content on tablet */
  .ci-results-split {
    grid-template-columns: 1fr;
    gap: var(--cc-space-6);
    padding-top: clamp(24px, 4vh, 40px);
  }

  .ci-results-expert {
    position: relative;
    top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    border-bottom: 1px solid var(--cc-border);
    border-radius: 0;
    padding: var(--cc-space-5) 0;
    margin-bottom: var(--cc-space-4);
  }

  .ci-expert-photo {
    width: 88px;
    height: 88px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--cc-border);
    background: var(--cc-bg-soft);
  }

  .ci-expert-note {
    padding: 0 0 0 var(--cc-space-5);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — mobile 390px
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  :root {
    --q-gutter: var(--cc-space-4);
  }

  .ci-topbar {
    height: 68px;
    padding: 0 var(--cc-space-4);
  }

  .ci-brand img { width: 148px; }

  .ci-private {
    font-size: 10px;
    letter-spacing: .12em;
    /* Shorten label to "Private" on narrow screens */
  }

  /* Intro: keep every element centered on small screens */
  .ci-start-split {
    padding-top: var(--cc-space-6);
    padding-bottom: clamp(48px, 8vh, 80px);
    gap: var(--cc-space-5);
  }

  .ci-start-image-col {
    width: 84px;
    height: 84px;
  }

  /* Founder badge: reposition below portrait on small screens
     to avoid overflowing outside the viewport */
  .ci-founder-badge {
    position: static;
    right: auto;
    bottom: auto;
    min-width: auto;
    width: max-content;
    padding: 7px 10px;
    margin: var(--cc-space-2) auto 0;
    box-shadow: var(--cc-shadow-sm);
  }
  .ci-start-image-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
  }
  .ci-image-wrapper {
    width: 84px;
    height: 84px;
  }

  .ci-start-content-col h1 {
    font-size: clamp(29px, 8vw, 44px);
  }

  .ci-start-content-col h1 em {
    left: clamp(42px, 12vw, 54px);
  }

  .ci-start-copy {
    font-size: var(--cc-text-base);
  }

  .ci-lime-button {
    padding: 16px 28px;
    font-size: 11px;
    width: 100%;
    max-width: 340px;
  }

  /* Question screens stay within the mobile viewport; height-based clamps
     preserve the hierarchy while tightening the longest questions. */
  .ci-question {
    min-height: 0;
    padding: clamp(10px, 2vh, var(--cc-space-5)) var(--q-gutter) clamp(6px, 1.2vh, var(--cc-space-4));
    align-items: flex-start;
  }

  .ci-question-inner { margin: 0 auto; }

  .ci-question h1 {
    font-size: clamp(23px, min(7vw, 4.2vh), 34px);
    line-height: 1.15;
  }

  .ci-question h1.ci-question-heading-compact {
    font-size: clamp(20px, min(6vw, 3.5vh), 27px);
    line-height: 1.08;
    letter-spacing: .04em;
  }

  .ci-choice {
    min-height: 0;
    padding: clamp(7px, 1.25vh, 12px) 14px;
    gap: 10px;
    font-size: var(--cc-text-xs);
  }

  .ci-choice-index {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }

  .ci-question-actions {
    margin-top: clamp(7px, 1.3vh, var(--cc-space-4));
    padding-top: clamp(6px, 1vh, var(--cc-space-3));
  }

  /* Copyright footer remains visible without forcing a second viewport. */
  .ci-question-footer {
    min-height: 0;
    height: auto;
    justify-content: center;
    font-size: 9px;
    letter-spacing: .12em;
    padding: 3px var(--q-gutter) clamp(6px, 1vh, var(--cc-space-4));
    margin-top: 0;
    line-height: 1.3;
  }

  .ci-input-wrap input {
    font-size: var(--cc-text-md);
    padding: 10px 0 11px;
  }

  .ci-review {
    padding: var(--cc-space-5) var(--cc-space-4) var(--cc-space-5);
  }

  .ci-review h1 {
    font-size: clamp(34px, 8vw, 44px);
  }

  .ci-confirm {
    padding: var(--cc-space-6) var(--cc-space-4) var(--cc-space-7);
  }

  .ci-confirm h1 {
    font-size: clamp(34px, 8vw, 44px);
  }

  .ci-results-expert {
    flex-direction: column;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  .ci-expert-photo {
    margin-bottom: var(--cc-space-4);
    width: 96px;
    height: 96px;
  }

  .ci-expert-note {
    padding: 0;
  }

  .ci-expert-note .ci-overline {
    justify-content: center;
  }

  .ci-dark-footer {
    display: none;
  }
}

/* Short screens need a denser composition than narrow screens alone imply.
   This tier keeps the longest four-answer question fully visible at 667px. */
@media (max-height: 720px) {
  .ci-topbar {
    height: 58px;
  }

  .ci-brand img {
    width: 128px;
  }

  .ci-progress-area {
    margin-top: 3px;
  }

  .ci-progress-label {
    margin-bottom: 3px;
    font-size: 9px;
  }

  .ci-question {
    padding-top: 7px;
    padding-bottom: 4px;
  }

  .ci-question-kicker,
  .ci-question-number {
    font-size: 10px;
    margin-bottom: 3px;
  }

  .ci-question h1 {
    font-size: clamp(20px, min(5.8vw, 3.7vh), 28px);
    line-height: 1.08;
    letter-spacing: .1em;
  }

  .ci-question h1.ci-question-heading-compact {
    font-size: clamp(18px, min(5vw, 3.1vh), 23px);
    line-height: 1.04;
  }

  .ci-choice-list,
  .ci-question h1.ci-question-heading-compact + .ci-choice-list {
    margin-top: 7px;
    gap: 4px;
  }

  .ci-choice {
    min-height: 0;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 12px;
    line-height: 1.2;
  }

  .ci-question-actions {
    margin-top: 6px;
    padding-top: 4px;
  }

  .ci-back-button,
  .ci-enter-hint {
    font-size: 9px;
  }

  .ci-question-footer {
    font-size: 8px;
    line-height: 1.2;
    padding-top: 2px;
    padding-bottom: 4px;
  }
}

/* Narrow phones: preserve both pieces of the top bar without horizontal
   overflow. The privacy label remains available, but is allowed to wrap. */
@media (max-width: 380px) {
  .ci-topbar {
    padding-left: var(--cc-space-3);
    padding-right: var(--cc-space-3);
  }

  .ci-brand img { width: 128px; }

  .ci-private {
    max-width: 126px;
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: .1em;
    text-align: right;
  }

  .ci-progress-label {
    gap: var(--cc-space-2);
    font-size: 10px;
  }

  .ci-question-actions {
    align-items: flex-start;
    gap: var(--cc-space-3);
  }

  .ci-enter-hint {
    text-align: right;
    line-height: 1.35;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADDITIONAL MOBILE POLISH — gate form, results, touch targets
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Gate / results header: tighten */
  .ci-review h1 {
    font-size: clamp(28px, 7.5vw, 38px);
    margin-top: var(--cc-space-4);
    margin-bottom: var(--cc-space-2);
  }

  .ci-gate-form-card {
    padding: var(--cc-space-5);
  }

  .ci-gate-submit {
    margin-top: var(--cc-space-5);
  }

  /* Results closing CTA: full width on mobile */
  .ci-closing-link {
    display: flex;
    width: 100%;
    max-width: 340px;
    margin: var(--cc-space-5) auto 0;
    padding: 16px 24px;
    justify-content: center;
  }

  /* Results card padding */
  .ci-result-card {
    padding: var(--cc-space-5);
  }

  .ci-results-closing {
    padding: var(--cc-space-6) var(--cc-space-5);
  }

  /* Choice buttons: ensure minimum 44px touch target height */
  .ci-choice {
    min-height: 44px;
  }

  /* Back button: minimum touch target */
  .ci-back-button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Input: larger touch-friendly padding */
  .ci-input-wrap input {
    min-height: 48px;
    font-size: var(--cc-text-base);
    padding: 12px 0 13px;
  }

  /* Start button: accessible size */
  .ci-lime-button {
    min-height: 48px;
  }
}

/* Prevent horizontal overflow on all quiz pages */
body { overflow-x: hidden; }

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .ci-question.is-moving {
    opacity: 1;
    transform: none;
  }
}
