/* ============================================================
   Assessment design tokens + base components (dark mode default)
   Matches the Emotional Language Wheel aesthetic:
     - Navy radial background, subtle dot texture, ambient teal orbs
     - Manrope typography, two-tone heading option
     - Teal accent (bg on primary CTAs, text on secondary labels)
     - Hairline borders at 10% white on navy surfaces

   HTML head must load Manrope from Google Fonts:
   <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;500;600;700;800&display=swap" rel="stylesheet" />

   Just before </body>, add the ambient orbs (they sit behind everything):
   <div class="orb a"></div>
   <div class="orb b"></div>
   ============================================================ */

:root {
  /* Surfaces */
  --navy:         #262E3B;
  --navy-deep:    #1B222D;
  --navy-lift:    #2E3849;    /* card background, one step up from --navy */
  --navy-elev:    #35415A;    /* the highest ambient point in the gradient */
  --surface-2:    #333E52;

  /* Text */
  --white:        #FFFFFF;
  --muted:        rgba(255, 255, 255, 0.66);
  --muted-2:      rgba(255, 255, 255, 0.42);
  --dim:          rgba(255, 255, 255, 0.28);

  /* Hairlines */
  --line:         rgba(255, 255, 255, 0.10);
  --line-strong:  rgba(255, 255, 255, 0.18);

  /* Accents */
  --teal:         #18C0C0;
  --teal-soft:    rgba(24, 192, 192, 0.18);
  --teal-tint:    rgba(24, 192, 192, 0.10);
  --teal-glow:    rgba(24, 192, 192, 0.35);

  /* Semantic (readable on navy) */
  --green:        #5FCB89;
  --green-tint:   rgba(95, 203, 137, 0.14);
  --amber:        #E8B551;
  --amber-tint:   rgba(232, 181, 81, 0.14);
  --red:          #E38070;
  --red-tint:     rgba(227, 128, 112, 0.14);

  /* Two-persona concept palette (used only when the assessment has a
     paired identity like Small Square/Big Jumbler, You/Partner) */
  --you:          #18C0C0;    /* teal, matches wheel */
  --partner:      #E38070;    /* warm coral, readable on navy */

  /* Typography */
  --font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container:      680px;
  --container-wide: 960px;
  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  18px;
  --radius-xl:  22px;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 20px rgba(0, 0, 0, 0.18);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.28), 0 16px 40px rgba(0, 0, 0, 0.24);
  --shadow-glow: 0 0 0 4px var(--teal-tint), 0 0 40px var(--teal-glow);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --dur-fast: 160ms;
  --dur: 260ms;
  --dur-slow: 420ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--white);
  background: radial-gradient(ellipse at 26% 22%,
                              var(--navy-elev) 0%,
                              var(--navy) 56%,
                              var(--navy-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle dot texture over the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  z-index: 0;
}

/* Ambient blurred orbs — add <div class="orb a"></div><div class="orb b"></div>
   before </body> so they sit behind content */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}
.orb.a {
  width: 560px; height: 560px;
  left: -220px; top: 12%;
  background: radial-gradient(circle, rgba(24, 192, 192, 0.18), rgba(24, 192, 192, 0) 65%);
}
.orb.b {
  width: 640px; height: 640px;
  right: -260px; top: 58%;
  background: radial-gradient(circle, rgba(24, 192, 192, 0.14), rgba(24, 192, 192, 0) 65%);
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; color: inherit; }
::selection { background: var(--teal-soft); color: var(--white); }

a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
a:hover { color: #4CDCDC; border-bottom-color: var(--teal); }

#app {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 24px 120px;
  z-index: 1;
  animation: fadeUp 500ms var(--ease-out) both;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--white);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 1.6em 0 0.4em;
}
h1 {
  font-size: clamp(36px, 5.5vw, 58px);
  letter-spacing: -1.2px;
  line-height: 1.08;
  margin-top: 0.2em;
}
h1 .teal, h1 .accent { color: var(--teal); }
h2 {
  font-size: clamp(26px, 3.8vw, 36px);
  letter-spacing: -0.025em;
  font-weight: 800;
}
h3 {
  font-size: clamp(20px, 2.4vw, 24px);
  letter-spacing: -0.015em;
  margin-top: 2em;
  font-weight: 700;
}
h4 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h5 { font-size: 16px; font-weight: 600; }

p { margin: 0.7em 0; color: var(--muted); font-size: 17px; font-weight: 300; }
em { font-style: italic; color: var(--white); }
strong { color: var(--white); font-weight: 600; }
ul { padding-left: 1.4em; }
ul li { margin: 0.5em 0; color: var(--muted); font-weight: 300; }

.meta { font-size: 13px; color: var(--muted-2); line-height: 1.5; font-weight: 400; }
.lede {
  font-weight: 300;
  font-size: 19px;
  line-height: 1.65;
  color: var(--muted);
  letter-spacing: 0;
  margin: 24px 0 0;
  max-width: 56ch;
}

/* Eyebrow: the wheel's signature small-caps teal label */
.eyebrow, .step-label {
  display: inline-block;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
}

hr.section-break {
  border: none;
  border-top: 1px solid var(--line);
  margin: 72px 0 40px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.005em;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              filter var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.btn.lg { padding: 17px 32px; font-size: 16px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }

.btn.primary {
  background: var(--teal);
  color: var(--navy);
  box-shadow: 0 6px 20px rgba(24, 192, 192, 0.18);
}
.btn.primary:not(:disabled):hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 28px rgba(24, 192, 192, 0.28);
}

.btn.ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--line-strong);
  font-weight: 600;
}
.btn.ghost:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ---------- Inputs ---------- */
input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  padding: 15px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.20);
  color: var(--white);
  margin: 4px 0;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-tint);
  background: rgba(0, 0, 0, 0.28);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); font-weight: 300; }

/* ---------- Cards (chapter, question, lead-capture, etc.) ---------- */
.card, .chapter-card, .question-card, .lead-capture, .context-q, .reflection-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px 40px 32px;
  box-shadow: var(--shadow-1);
  margin: 24px 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chapter-card { padding: 48px 44px 40px; }

/* ---------- Radio pills ---------- */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}
.radio-pill:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}
.radio-pill input { margin: 0; cursor: pointer; accent-color: var(--teal); }
.radio-pill.selected {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--white);
  font-weight: 500;
}

/* ---------- Likert row ---------- */
.likert { display: flex; flex-direction: column; gap: 6px; }
.likert-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 400;
  text-align: left;
  width: 100%;
  color: var(--muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.likert-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}
.likert-num {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.likert-btn.selected {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--white);
  font-weight: 600;
}
.likert-btn.selected .likert-num {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--navy);
}
/* Predict-side variant (partner-prediction) */
.predict-side .likert-btn:hover {
  border-color: rgba(227, 128, 112, 0.35);
  background: rgba(227, 128, 112, 0.10);
  color: var(--white);
}
.predict-side .likert-btn.selected {
  background: var(--red-tint);
  border-color: var(--partner);
  color: var(--white);
}
.predict-side .likert-btn.selected .likert-num {
  border-color: var(--partner);
  background: var(--partner);
  color: var(--navy);
}

/* ---------- Rank builder ---------- */
.rank-builder { display: flex; flex-direction: column; gap: 6px; }
.rank-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 400;
  text-align: left;
  width: 100%;
  color: var(--muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.rank-option:hover:not(.ranked) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}
.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.rank-option.ranked {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--white);
  font-weight: 600;
}
.rank-option.ranked .rank-badge {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--navy);
}
.rank-option.top-pick { box-shadow: 0 0 0 2px var(--teal-glow); }
.rank-hint {
  font-size: 13.5px;
  color: var(--muted-2);
  margin: 4px 0 12px;
  line-height: 1.5;
  font-weight: 300;
}
.rank-clear {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0 0;
  cursor: pointer;
  border-bottom: 1px solid var(--line-strong);
  font-weight: 500;
  align-self: flex-start;
}
.rank-clear:hover { color: var(--white); border-bottom-color: var(--white); }
.predict-side .rank-option:hover {
  border-color: rgba(227, 128, 112, 0.35);
  background: rgba(227, 128, 112, 0.10);
  color: var(--white);
}
.predict-side .rank-option.ranked {
  background: var(--red-tint);
  border-color: var(--partner);
  color: var(--white);
}
.predict-side .rank-option.ranked .rank-badge {
  border-color: var(--partner);
  background: var(--partner);
  color: var(--navy);
}

/* ---------- Progress (minimal, full-bleed sticky) ---------- */
.progress {
  position: sticky;
  top: 0;
  padding: 14px 0 12px;
  z-index: 10;
  margin: -32px 0 28px;
  background: transparent;
}
/* Full-bleed frosted backdrop that extends past #app's container */
.progress::before {
  content: '';
  position: absolute;
  inset: 0 -50vw;
  background: linear-gradient(180deg, rgba(27, 34, 45, 0.92) 0%, rgba(27, 34, 45, 0.75) 70%, rgba(27, 34, 45, 0) 100%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  z-index: -1;
  pointer-events: none;
}
.progress-bar {
  height: 2px;
  background: var(--teal);
  border-radius: 999px;
  transition: width var(--dur-slow) var(--ease-out);
  min-width: 2px;
  box-shadow: 0 0 8px var(--teal-glow);
}
.progress-text {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- Nav ---------- */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------- Question type (large display body) ---------- */
.question {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: var(--white);
}

/* ---------- Dark inverted CTA panel becomes teal-glow panel ---------- */
.dark-panel, .session-box, .dance {
  background: linear-gradient(180deg, rgba(24, 192, 192, 0.14), rgba(24, 192, 192, 0.04));
  border: 1px solid var(--teal);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 40px 32px;
  margin: 16px 0;
  box-shadow: var(--shadow-1), 0 0 60px rgba(24, 192, 192, 0.12);
}
.dark-panel h3, .session-box h3, .dance h3 { color: var(--white); }
.dark-panel p, .session-box p, .dance p { color: var(--muted); }
.dark-panel .btn.primary, .session-box .btn.primary {
  background: var(--teal); color: var(--navy);
}
.dark-panel .btn.ghost, .session-box .btn.ghost {
  color: var(--white); border-color: var(--line-strong);
}

/* ---------- Signoff (last block on the result view) ---------- */
.signoff {
  margin: 56px auto 8px;
  max-width: 560px;
  text-align: center;
  padding: 40px 24px 8px;
}
.signoff p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: -0.005em;
  font-weight: 300;
}
.signoff .signature {
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 400;
}
.signoff .signature .name { color: var(--teal); font-weight: 600; }

/* ---------- Site footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--container-wide);
  margin: 40px auto 0;
  padding: 40px 24px 64px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.site-footer-logo { border: none; }
.site-footer-logo img { height: 34px; width: auto; opacity: 0.75; filter: brightness(0) invert(1) opacity(0.75); }
.site-footer-text {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
  max-width: 480px;
  font-weight: 300;
}
.site-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
}
.site-footer-links a {
  color: var(--muted-2);
  border-bottom: none;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-footer-links a:hover { color: var(--teal); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  #app { padding: 40px 20px 96px; }
  .chapter-card { padding: 32px 28px 28px; }
  .question-card, .card, .reflection-card { padding: 28px 24px 24px; }
  .lead-capture, .context-q, .session-box, .dark-panel, .dance { padding: 28px 24px; }
  .orb { display: none; }
}

/* ---------- Accessibility ---------- */
.btn:focus-visible,
.likert-btn:focus-visible,
.rank-option:focus-visible,
.radio-pill:focus-within,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print (force light for readability) ---------- */
@media print {
  body { background: #fff !important; color: #000; font-size: 12pt; }
  body::before { display: none; }
  .orb, .site-footer, .nav-row, .session-box, .dark-panel, .dance,
  .progress { display: none !important; }
  #app { max-width: 100%; padding: 0; }
  .card, .question-card, .chapter-card, .reflection-card, .lead-capture {
    background: #fff !important;
    color: #000;
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  h1, h2, h3, h4, p, li, .lede, .signoff p { color: #000 !important; }
  h1 .teal, h1 .accent { color: #005f5f !important; }
  hr.section-break { page-break-before: always; border: none; margin: 0; }
  h2, h3 { page-break-after: avoid; }
  a { color: #000; text-decoration: none; border: none; }
}
