/* The Six Forces Assessment — single stylesheet
   Custom properties on :root injected per-request from config.brand.
   Dark editorial. Mobile-first. Inter throughout. No framework. */

:root {
  /* Brand-tinted secondary text — replaces every bare gray (ported from Survive). */
  --color-soft: #b8c3cf;            /* small-print, footer, microcopy, secondary text */
  --color-soft-dim: #8a96a4;        /* tertiary, disabled-button text, placeholders */
  --color-line-soft: rgba(167,139,250,0.10);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Stop the rubber-band bounce on macOS trackpads & iOS, but only on the y-axis,
     and only on the document. Touching `overflow-x` on <html> breaks scroll
     in some Safari versions — don't. */
  overscroll-behavior-y: none;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans), Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 18px;          /* Mobile baseline — bumped up per feedback */
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

body {
  position: relative;
  overflow-x: clip;         /* prevents horizontal slop without breaking scroll */
  min-height: 100vh;
  min-height: 100dvh;       /* tighter mobile viewport when address bar shows */
}

/* Ambient gradient background — fixed, behind everything, atmospheric depth.
   Three soft radials arrange a faint cyan/purple glow that anchors the eye. */
.bg-glow {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 600px at 50% -5%, rgba(0,186,225,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 700px 500px at 90% 100%, rgba(167,139,250,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 0% 80%, rgba(0,186,225,0.03) 0%, transparent 70%);
}

::selection { background: rgba(0, 186, 225, 0.32); color: #fff; }

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

/* Skip link --------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px; left: 0;
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 500;
  border-bottom-right-radius: 4px;
  z-index: 1000;
}
.skip-link:focus { top: 0; outline: 2px solid #fff; outline-offset: -6px; }

/* Layout ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main.container {
  padding-top: 2.5rem;
  padding-bottom: 5rem;
  min-height: calc(100vh - 9rem);
  min-height: calc(100dvh - 9rem);
}

.site-header {
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--color-line);
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 200ms ease;
}
.brand:hover { opacity: 0.85; }
.brand-logo {
  height: 36px;
  width: auto;
  max-width: 220px;
  display: block;
}
@media (min-width: 720px) {
  .brand-logo { height: 42px; max-width: 260px; }
}

.site-footer {
  padding: 2.5rem 0 2rem;
  text-align: center;
  color: var(--color-muted-soft);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* Progress bar ------------------------------------------------------- */
.progress {
  width: 100%;
  max-width: 680px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-line);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
  box-shadow: 0 0 12px rgba(0, 186, 225, 0.5);
}

/* Type --------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--color-text);
}
h1 { font-size: clamp(2.1rem, 6.6vw, 3.4rem); font-weight: 300; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.05rem); font-weight: 400; }
h3 { font-size: 1.3rem; font-weight: 500; }

p { margin: 0 0 1.2em; color: var(--color-text); }

/* Hierarchy via color/weight, not via italic font swap. */
.text-muted { color: var(--color-muted); }
.text-soft  { color: var(--color-muted-soft); }

.small-print {
  font-family: var(--font-sans);
  color: var(--color-muted);
  font-size: 0.92rem;
  text-align: center;
  letter-spacing: 0.005em;
  font-weight: 300;
}

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

/* Hero --------------------------------------------------------------- */
.hero { padding-top: 1rem; }
.hero-headline {
  font-size: clamp(2.4rem, 7.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin-bottom: 2rem;
  /* Gradient-text: white at start, cyan in middle, purple at the end.
     Striking on first arrival; falls back to white text if the image is
     un-clipped (Safari < 14, very rare). */
  background: linear-gradient(115deg, #ffffff 0%, #ffffff 25%, var(--color-primary) 65%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-subhead {
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  color: var(--color-soft);
  font-weight: 300;
  margin-bottom: 0.65rem;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.hero-subhead + .hero-subhead { margin-bottom: 2.5rem; color: var(--color-text); }

.benefits {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 3rem;
  border-top: 1px solid var(--color-line);
}
.benefits li {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--color-text);
  font-weight: 300;
}

.cta-row { text-align: center; margin: 2.5rem 0 1rem; }

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 1rem 1.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease, opacity 150ms ease;
  letter-spacing: 0.01em;
  position: relative;
  isolation: isolate;
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 186, 225, 0.22), 0 1px 0 rgba(255,255,255,0.06) inset;
  transition: background 220ms ease, box-shadow 220ms ease, transform 120ms ease;
}
.btn-primary:hover {
  /* Slide into the logo blue on hover — cyan stays at the start, logo blue lands at the end. */
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-logo-blue) 100%);
  box-shadow: 0 6px 32px rgba(8, 112, 176, 0.42), 0 1px 0 rgba(255,255,255,0.08) inset;
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled],
.btn-primary:disabled {
  background: var(--color-elevated);
  color: var(--color-muted-soft);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}
.btn-primary[disabled]:hover,
.btn-primary:disabled:hover {
  background: var(--color-elevated);
  color: var(--color-muted-soft);
  box-shadow: none;
  transform: none;
}
.btn-lg { padding: 1.18rem 2.4rem; font-size: 1.02rem; }
.btn-link {
  background: transparent;
  color: var(--color-muted);
  padding: 1rem 0;
  text-decoration: none;
  font-weight: 400;
}
.btn-link:hover { color: var(--color-text); }

/* Quiz form ---------------------------------------------------------- */
.quiz { padding-top: 0.5rem; }
.instructions, .bridge {
  margin-bottom: 2.5rem;
}
.instructions p, .bridge p, .bridge--single { color: var(--color-muted); font-weight: 300; }
.bridge--single { font-size: 1.05rem; }

.intro p {
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--color-text);
  font-weight: 300;
}

.quiz-form { margin-top: 1rem; }

.statement {
  border: 0;
  padding: 0;
  margin: 0 0 2.5rem;
}
.statement legend {
  font-size: 1.18rem;
  line-height: 1.45;
  margin-bottom: 1.1rem;
  padding: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.005em;
}
.statement--scale legend, .statement--reflection legend {
  font-size: 1.08rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.cards--scale { grid-template-columns: 1fr; gap: 0.55rem; }
.cards--vertical { grid-template-columns: 1fr; }

/* Cards: lux dark with cyan-tinted underglow. Not gray, not loud — a third state.
   Continue button still wins the visual contest because it carries the gradient. */
.card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.05rem 0.75rem;
  background:
    linear-gradient(180deg, rgba(0, 186, 225, 0.04) 0%, rgba(167, 139, 250, 0.025) 100%),
    var(--color-elevated);
  border: 1px solid rgba(0, 186, 225, 0.18);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 200ms ease, transform 80ms ease;
  user-select: none;
  min-height: 62px;
  font-weight: 400;
  letter-spacing: 0.005em;
}
.card:hover {
  border-color: rgba(0, 186, 225, 0.45);
  background:
    linear-gradient(180deg, rgba(0, 186, 225, 0.08) 0%, rgba(167, 139, 250, 0.05) 100%),
    var(--color-elevated);
}
.card input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.card.selected,
.card:has(input:checked) {
  border-color: var(--color-primary);
  background:
    linear-gradient(180deg, rgba(0, 186, 225, 0.14) 0%, rgba(167, 139, 250, 0.08) 100%),
    var(--color-elevated);
  box-shadow: 0 0 0 1px var(--color-primary), 0 0 28px rgba(0, 186, 225, 0.22);
  color: #ffffff;
}
.card:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 186, 225, 0.32);
}

.card--scale {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  gap: 1rem;
  padding: 1rem 1.15rem;
}
.card-num {
  display: inline-flex;
  width: 2rem; height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-soft);
  border: 1px solid rgba(0, 186, 225, 0.2);
  font-weight: 500;
  flex-shrink: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}
.card.selected .card-num,
.card:has(input:checked) .card-num {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(0, 186, 225, 0.45);
}
.card-label { line-height: 1.4; }

/* Email gate --------------------------------------------------------- */
.email-gate { max-width: 540px; margin: 0 auto; }
.email-gate h1 { text-align: left; }
.email-gate > p {
  color: var(--color-text);
  font-weight: 300;
}
.email-gate > p:first-of-type {
  color: var(--color-muted);
  font-size: 1.05rem;
}
.email-form { margin-top: 2rem; }
.form-row { margin-bottom: 1rem; }
.email-form input[type=text],
.email-form input[type=email] {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(0, 186, 225, 0.25);
  border-radius: 10px;
  background: #ffffff;
  color: #0a0a0f;                   /* full black on white — clear contrast */
  transition: border-color 180ms ease, box-shadow 200ms ease;
  font-weight: 500;
  caret-color: var(--color-primary);
}
.email-form input::placeholder {
  color: #6b7280;
  font-weight: 400;
}
.email-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 186, 225, 0.25);
}
/* Kill Chrome's blue-tinted autofill bg and reapply our own */
.email-form input:-webkit-autofill,
.email-form input:-webkit-autofill:hover,
.email-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #0a0a0f;
  caret-color: var(--color-primary);
}
.privacy-microcopy {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
  margin: 1.5rem 0;
  font-weight: 300;
}

.form-error {
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  background: rgba(183, 62, 62, 0.10);
  border-left: 3px solid #d97070;
  border-radius: 6px;
  color: #f3a3a3;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}
.form-actions--single { justify-content: center; }
.form-actions .btn-primary { margin-left: auto; }

/* Reflection breathing room */
.reflection-preamble { margin: 1.25rem 0 2rem; }
.reflection-preamble p { color: var(--color-muted); font-weight: 300; }

/* Results ------------------------------------------------------------ */
.results { padding-top: 1rem; }
.results-opening { margin-bottom: 3.5rem; }
.results-opening p:first-child {
  font-size: clamp(1.55rem, 3.8vw, 2rem);
  line-height: 1.32;
  margin-bottom: 1.2rem;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: -0.018em;
}
.results-opening p:not(:first-child) {
  color: var(--color-muted);
  font-size: 1.02rem;
  font-weight: 300;
}

.section-header {
  margin-top: 4rem;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-primary);          /* was --color-muted; cyan unifies all section headers */
  font-weight: 500;
  font-family: var(--font-sans);
}
.section-header::before, .section-header::after {
  content: "·";
  display: inline-block;
  margin: 0 0.6em;
  color: var(--color-primary);
  opacity: 0.7;
}

/* Tie-surfacing frames (Option B). The .driving-frame sits between the section
   header and the first personality block when 2 or 3 needs share the top score.
   The .driving-transition sits between personality #1 and the secondary tied
   group when 1st is alone but 2nd is tied with 3rd. */
.driving-frame,
.driving-transition {
  font-size: 1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--color-soft);
  line-height: 1.55;
  border-left: 2px solid var(--color-primary);
  padding: 0.4rem 0 0.4rem 1rem;
  margin: 1rem 0 2rem;
  max-width: 580px;
}
.driving-frame em,
.driving-transition em { font-style: normal; }
.driving-transition { margin-top: 2rem; }

/* Zone legend (Fix 2): explains how driving × fulfilment combine to a zone.
   Sits between the personality intros and the per-need zone cards. */
.zone-intro {
  margin: 3rem 0 2rem;
}
.zone-intro > p {
  font-size: 1.02rem;
  color: var(--color-text);
  font-weight: 300;
  margin: 0 0 1rem;
}
.zone-legend {
  margin: 0 0 0;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  border-radius: 12px;
}
.zone-legend-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.zone-legend-row:last-child { margin-bottom: 0; }
.zone-legend-row dt {
  margin: 0;
  /* Reuse .zone-tag styling but slightly smaller */
}
.zone-legend-row dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-soft);
  line-height: 1.5;
}
@media (max-width: 520px) {
  .zone-legend-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .zone-legend-row dt { justify-self: start; }
}

/* Pre-frame for the rare 3-tied-at-top case — sits between the section header
   and the first personality block. Italic, soft, centered. */
.driving-forces-preamble {
  text-align: center;
  max-width: 540px;
  margin: -0.5rem auto 2.5rem;
  color: var(--color-soft);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
}
.driving-forces-preamble p { margin-bottom: 0.6em; }
.driving-forces-preamble p:last-child { margin-bottom: 0; }

.personality {
  margin-bottom: 2.5rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--color-line);
}
.personality:first-of-type { border-top: 0; padding-top: 0; }
.personality h3 {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.012em;
}
.personality p {
  color: var(--color-text);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.7;
}

.zones { margin-top: 2rem; }
.zone {
  margin-bottom: 1.5rem;
  padding: 1.75rem;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 12px;
}
.zone-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.zone-header h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--color-text);
}
.zone-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 99px;
  border: 1px solid currentColor;
  font-weight: 500;
}
.zone-tag--gap     { color: #fbb6ce; background: rgba(251, 182, 206, 0.08); border-color: rgba(251, 182, 206, 0.4); }
.zone-tag--surplus { color: #faf089; background: rgba(250, 240, 137, 0.06); border-color: rgba(250, 240, 137, 0.3); }
.zone-tag--dormant { color: var(--color-muted); background: rgba(156, 163, 175, 0.06); border-color: rgba(156, 163, 175, 0.3); }
.zone-tag--aligned { color: #00BAE1; background: rgba(0, 186, 225, 0.08); border-color: rgba(0, 186, 225, 0.4); }
.zone p {
  margin-bottom: 0;
  color: var(--color-text);
  font-weight: 300;
  line-height: 1.65;
}

.zone--gap {
  border-color: rgba(251, 182, 206, 0.22);
  background: linear-gradient(180deg, rgba(251, 182, 206, 0.025) 0%, var(--color-panel) 100%);
}

.hot-zone {
  margin-top: 4rem;
  padding: 2.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(0, 186, 225, 0.06) 0%, rgba(167, 139, 250, 0.06) 100%);
  border: 1px solid rgba(0, 186, 225, 0.18);
  border-radius: 12px;
  position: relative;
}
.hot-zone .section-header { margin-top: 0; color: var(--color-primary); }
.hot-zone p {
  color: var(--color-text);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
}

.closing {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-line);
}
.closing p {
  color: var(--color-text);
  font-weight: 300;
  font-size: 1.04rem;
  line-height: 1.6;
}

.coaching-cta {
  margin-top: 4rem;
  padding: 3rem 2rem;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.coaching-cta::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 220px; height: 220px;
  background: radial-gradient(circle at top right, rgba(0, 186, 225, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.coaching-cta > * { position: relative; z-index: 1; }
.coaching-cta .section-header {
  margin-top: 0;
  text-align: left;
  color: var(--color-primary);
}
.coaching-cta .section-header::before, .coaching-cta .section-header::after { display: none; }
.coaching-cta p {
  color: var(--color-text);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
}
.coaching-bullets {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
}
.coaching-bullets li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.75rem;
  color: var(--color-text);
  font-weight: 300;
}
.coaching-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 1rem;
  height: 1px;
  background: var(--gradient-primary);
}

/* Error -------------------------------------------------------------- */
.error { text-align: center; padding-top: 4rem; }

/* Admin -------------------------------------------------------------- */
body[data-page=admin] main.container { max-width: 1280px; }
body[data-page=admin] { font-size: 15px; }

.admin-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap;
}
.admin-head h1 { margin: 0; font-size: 1.7rem; font-weight: 400; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.stat {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.015em;
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.filters {
  display: flex; flex-wrap: wrap; gap: 0.55rem;
  margin-bottom: 1rem; align-items: center;
}
.filters select, .filters input {
  font-family: var(--font-sans);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  background: var(--color-panel);
  color: var(--color-text);
  font-size: 0.85rem;
}
.filters select:focus, .filters input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.85rem; }

.result-count {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.submissions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  overflow: hidden;
}
.submissions-table th, .submissions-table td {
  padding: 0.75rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--color-line);
  vertical-align: middle;
}
.submissions-table th {
  background: var(--color-bg-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  font-weight: 500;
}
.submissions-table th a { color: inherit; text-decoration: none; }
.submissions-table th a:hover { color: var(--color-text); }
.submissions-table tbody a { color: var(--color-primary); text-decoration: none; }
.submissions-table tbody a:hover { text-decoration: underline; }
.submissions-table .row-summary { cursor: pointer; }
.submissions-table .row-summary:hover { background: var(--color-elevated); }
.submissions-table .row-detail td { background: var(--color-bg-soft); }
.submissions-table .empty { text-align: center; padding: 2rem; color: var(--color-muted); }

.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.7rem;
  margin-right: 0.25rem;
  border: 1px solid;
  letter-spacing: 0.04em;
}
.pill--top { color: var(--color-text); background: rgba(255,255,255,0.04); border-color: var(--color-line-strong); }
.pill--gap { color: #fbb6ce; background: rgba(251, 182, 206, 0.06); border-color: rgba(251, 182, 206, 0.4); }

.status { font-size: 0.78rem; }
.status--success { color: #00BAE1; }
.status--failed  { color: #fbb6ce; }
.status--pending { color: var(--color-muted); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0.5rem;
}
.detail-grid h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin: 0.5rem 0 0.5rem;
  font-weight: 500;
}
.raw-answers { padding-left: 1.2rem; margin: 0; font-size: 0.82rem; color: var(--color-text); font-weight: 300; }
.raw-answers li { margin: 0.15rem 0; }
.bar { display: grid; grid-template-columns: 9rem 1fr 3rem; align-items: center; gap: 0.5rem; margin: 0.25rem 0; font-size: 0.8rem; }
.bar-label { color: var(--color-muted); font-weight: 300; }
.bar-track { background: var(--color-bg-soft); height: 6px; border-radius: 3px; overflow: hidden; }
.bar-fill { background: var(--gradient-primary); height: 100%; }
.bar-num { font-variant-numeric: tabular-nums; text-align: right; color: var(--color-muted); }
.zones-list { padding-left: 1.2rem; margin: 0; font-size: 0.82rem; color: var(--color-text); font-weight: 300; }
.webhook-block code {
  background: var(--color-bg-soft);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--color-text);
}
.refire-status { font-size: 0.85rem; color: var(--color-muted); margin-left: 0.5rem; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin-top: 1.5rem; font-size: 0.9rem; color: var(--color-muted);
}

/* Login page -------------------------------------------------------- */
.login-page { max-width: 480px; margin: 0 auto; padding-top: 2rem; }
.login-page h1 { text-align: center; font-weight: 300; margin-bottom: 1.25rem; }
.login-page > p {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.login-page .form-row { margin-bottom: 1rem; }
.login-page input[type=text], .login-page input[type=password] {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 186, 225, 0.25);
  border-radius: 10px;
  background: #ffffff;
  color: #0a0a0f;
  font-weight: 500;
  caret-color: var(--color-primary);
}
.login-page input::placeholder { color: #6b7280; font-weight: 400; }
.login-page input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 186, 225, 0.25);
}
.login-page input:-webkit-autofill,
.login-page input:-webkit-autofill:hover,
.login-page input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #0a0a0f;
  caret-color: var(--color-primary);
}

/* Larger screens ---------------------------------------------------- */
@media (min-width: 720px) {
  body { font-size: 18px; }
  main.container { padding-top: 3.5rem; }
}

/* ----------------------------------------------------------------------------
   Survive-port additions: gradient title text, ambient glows on result blocks,
   on-load stagger + IntersectionObserver scroll-reveal, mobile admin polish.
   ---------------------------------------------------------------------------- */

/* Gradient-text titles for intro / email-gate / 404 / login.
   Softer than the hero — more white in the early stops, cyan→purple at the end. */
.intro h1,
.email-gate h1,
.error h1,
.login-page h1 {
  background: linear-gradient(115deg, #ffffff 0%, var(--color-primary) 80%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Same gradient treatment for the per-need title on the results page
   (Six's equivalent of Survive's .identity-header is .zone-header h3). */
.zone-header h3 {
  background: linear-gradient(115deg, #ffffff 0%, #ffffff 30%, var(--color-primary) 75%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Per-need result block — ambient cyan glow in the corner. Six's .zone is
   already a card with panel bg + border; we keep the card affordance and
   just add the corner radial. The Survive doc's bg-soft swap would feel
   too "embedded" against Six's longer-form per-need copy. */
.zone {
  position: relative;
  overflow: hidden;
}
.zone::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(0,186,225,0.05) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.zone > * { position: relative; z-index: 1; }

/* Coaching CTA — replace the single corner glow with a richer two-pseudo-element
   treatment (cyan top-right, purple bottom-left). Six's existing ::after rule
   above is overridden here. */
.coaching-cta {
  border: 1px solid rgba(0,186,225,0.18);
  border-radius: 14px;
  padding: 2.5rem 1.8rem;
  overflow: hidden;
  position: relative;
}
.coaching-cta::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(0,186,225,0.14) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.coaching-cta::after {
  content: '';
  position: absolute; bottom: -120px; left: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(167,139,250,0.10) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  /* override: previous ::after used `top: 0; right: 0` with a different gradient.
     New positioning supersedes that. */
  top: auto; right: auto;
}

/* Soft-color cleanup: replace bare grays with brand-tinted secondary tokens. */
.small-print,
.privacy-microcopy,
.below-button,
.btn-link { color: var(--color-soft); }
.refire-status,
.empty,
.pagination,
.result-count,
.bar-num,
.status--pending,
.site-footer { color: var(--color-soft); }

/* Detail-grid headings on admin row-expanded panels — small-caps cyan. */
.detail-grid h4 {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}
.raw-answers strong { color: var(--color-primary); font-weight: 500; }
.bar-label { color: var(--color-text); }

/* ---- Animations ----------------------------------------------------------- */

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

/* IntersectionObserver-driven; quiz.js adds .pre-fade then .in-view. */
.pre-fade { opacity: 0; transform: translateY(12px); will-change: opacity, transform; }
.in-view { animation: fadeInUp 700ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }

/* On-load stagger for above-the-fold lists. */
.benefits li { animation: fadeInUp 600ms ease-out both; }
.benefits li:nth-child(1) { animation-delay: 220ms; }
.benefits li:nth-child(2) { animation-delay: 320ms; }
.benefits li:nth-child(3) { animation-delay: 420ms; }
.benefits li:nth-child(4) { animation-delay: 520ms; }

.hero-headline { animation: fadeInUp 800ms cubic-bezier(0.22, 0.61, 0.36, 1) 50ms both; }
.hero-subhead { animation: fadeInUp 600ms ease-out both; }
.hero-subhead:nth-of-type(1) { animation-delay: 200ms; }
.hero-subhead:nth-of-type(2) { animation-delay: 280ms; }
.hero-subhead:nth-of-type(3) { animation-delay: 360ms; }
.hero .cta-row, .hero .small-print { animation: fadeInUp 600ms ease-out 600ms both; }

.intro h1 { animation: fadeInUp 700ms cubic-bezier(0.22, 0.61, 0.36, 1) 50ms both; }
.intro p { animation: fadeInUp 500ms ease-out both; }
.intro p:nth-of-type(1) { animation-delay: 180ms; }
.intro p:nth-of-type(2) { animation-delay: 240ms; }
.intro p:nth-of-type(3) { animation-delay: 300ms; }
.intro p:nth-of-type(4) { animation-delay: 360ms; }
.intro p:nth-of-type(5) { animation-delay: 420ms; }
.intro .cta-row { animation: fadeInUp 600ms ease-out 700ms both; }

/* ---- Admin polish --------------------------------------------------------- */

/* Wider canvas for both admin pages. */
body[data-page="admin"] main.container,
body[data-page="admin-login"] main.container { max-width: 1240px; }

/* Stats grid: collapse to 1-col on small screens to avoid the orphan-card pattern. */
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
}

/* Stat cards — ambient glow + on-load stagger. */
.stat {
  position: relative;
  overflow: hidden;
  animation: fadeInUp 500ms ease-out both;
}
.stat::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0,186,225,0.05), transparent 60%);
  pointer-events: none;
}
.stat:nth-child(1) { animation-delay: 30ms; }
.stat:nth-child(2) { animation-delay: 80ms; }
.stat:nth-child(3) { animation-delay: 130ms; }
.stat:nth-child(4) { animation-delay: 180ms; }
.stat:nth-child(5) { animation-delay: 230ms; }
.stat:nth-child(6) { animation-delay: 280ms; }
.stat:nth-child(7) { animation-delay: 330ms; }

.stat-num {
  font-size: 1.6rem; font-weight: 500;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
}
.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-soft);
  text-transform: uppercase;
  position: relative;
}

/* Mobile-safe table: page stays at viewport width, only the table scrolls. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border-radius: 8px;
}
.submissions-table { min-width: 720px; }

/* Headers: small-caps cyan instead of gray, matching .section-header. */
.submissions-table th {
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  color: var(--color-primary);
}
.row-summary { transition: background 180ms ease; }
.row-summary:hover { background: rgba(0, 186, 225, 0.04); }

/* Dark, compact filter bar — replaces the previous loose filter row. */
.filters {
  padding: 0.85rem 0.9rem;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 12px;
}
.filters input,
.filters select {
  width: auto;
  background: var(--color-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-line-strong);
  border-radius: 8px;
  font-weight: 400;
}
.filters input::placeholder { color: var(--color-soft-dim); font-weight: 400; }
.filters input:focus,
.filters select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 186, 225, 0.25);
}
.filters input:-webkit-autofill,
.filters input:-webkit-autofill:hover,
.filters input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--color-elevated) inset;
  -webkit-text-fill-color: var(--color-text);
  caret-color: var(--color-text);
}
.filters select option {
  background: var(--color-panel);
  color: var(--color-text);
}
@media (max-width: 520px) {
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; }
  .filters .btn-sm, .filters .btn-link { align-self: flex-start; }
}

/* Reduced-motion: kill all the new animations, leave layout intact. */
@media (prefers-reduced-motion: reduce) {
  .pre-fade { opacity: 1; transform: none; }
  .benefits li,
  .hero-headline, .hero-subhead, .hero .cta-row, .hero .small-print,
  .intro h1, .intro p, .intro .cta-row,
  .stat {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- PDF reflection block (between coaching CTA and share block) ---- */
.pdf-block {
  margin-top: 2.5rem;
  background: var(--color-bg-soft);
  border: 1px solid rgba(0, 186, 225, 0.18);
  border-radius: 14px;
  padding: 1.8rem 1.6rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.pdf-block::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(0, 186, 225, 0.10) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.pdf-block > * { position: relative; z-index: 1; }
.pdf-block .section-header { margin-top: 0; }

.pdf-lede {
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--color-text);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}
.pdf-cta-row { margin: 0 0 1.25rem; }

.btn-pdf {
  display: inline-block;
  padding: 0.95rem 1.85rem;
  font-size: 0.98rem;
  font-weight: 500;
  font-family: var(--font-sans);
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(0, 186, 225, 0.22), 0 1px 0 rgba(255,255,255,0.06) inset;
  transition: background 220ms ease, box-shadow 220ms ease, transform 120ms ease;
}
.btn-pdf:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-logo-blue) 100%);
  box-shadow: 0 6px 32px rgba(8, 112, 176, 0.42), 0 1px 0 rgba(255,255,255,0.08) inset;
  transform: translateY(-1px);
}
.btn-pdf:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.pdf-microcopy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-soft);
  font-style: italic;
  line-height: 1.55;
}

/* ---- Share block (results page, below the coaching CTA) --------------- */
.share-block {
  margin-top: 3rem;
  background: var(--color-bg-soft);
  border: 1px solid rgba(0, 186, 225, 0.12);
  border-radius: 14px;
  padding: 2.2rem 1.6rem 1.6rem;
  position: relative;
  overflow: hidden;
}
.share-block::before {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.share-block > * { position: relative; z-index: 1; }
.share-block .section-header {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.share-lede {
  font-size: 1.04rem;
  color: var(--color-soft);
  font-weight: 300;
  margin: 0 0 1.75rem;
}

.share-card {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 1.3rem 1.2rem;
  margin-bottom: 0.85rem;
}
.share-card:last-child { margin-bottom: 0; }

.share-card-title {
  font-size: 1.02rem;
  font-weight: 500;
  margin: 0 0 0.3rem;
  color: var(--color-text);
  /* no gradient text here — keep the share block calm and secondary */
  background: none;
  -webkit-text-fill-color: var(--color-text);
}
.share-card-sub {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--color-soft);
  margin: 0 0 0.95rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  background: var(--color-elevated);
  color: var(--color-text);
  border: 1px solid rgba(0, 186, 225, 0.2);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.btn-share:hover {
  border-color: rgba(0, 186, 225, 0.5);
  background: rgba(0, 186, 225, 0.06);
}
.btn-share:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.share-feedback {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 500;
}

.share-quote {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--color-text);
  border-left: 2px solid var(--color-primary);
  margin: 0.4rem 0 0.5rem;
  padding: 0.25rem 0 0.25rem 1rem;
}
.share-quote-attr {
  font-size: 0.85rem;
  color: var(--color-soft-dim);
  margin: 0 0 1rem;
  font-weight: 400;
}

@media (max-width: 520px) {
  .share-actions { flex-direction: column; align-items: stretch; }
  .btn-share { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .share-block, .share-card, .btn-share { transition: none !important; }
}

/* Shake feedback when the user tries to submit an unanswered question. */
@keyframes quizShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.statement.shake {
  animation: quizShake 500ms ease-out;
}
.statement.shake legend { color: var(--color-primary); }

/* Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
