/* =====================================================
   HEKA SKIN CHECK -- DESIGN SYSTEM
   ===================================================== */

:root {
  /* Warm-sand palette -- Hims-leaning, warm linen + roasted clay */
  --cream: #FBF7F1;
  --oat:   #F6EFE4;          /* page background */
  --sand:  #EFE5D4;
  --clay:  #E2D3BB;
  --bg: var(--oat);
  --bg-elevated: #FFFBF4;
  --bg-card: #FFFBF4;

  /* Ink scale -- warm near-black */
  --ink: #1B1714;
  --ink-soft: #2A2521;
  --ink-muted: #6B645B;
  --ink-faint: #A39A8C;
  --ink-cream: #FBF7F1;
  --ink-cream-soft: #E2D3BB;
  --ink-cream-muted: #B5A990;

  /* Primary accent -- roasted clay */
  --accent: #8C5A3A;
  --accent-hover: #6E4327;
  --accent-deep: #1B1714;
  --accent-soft: #B58966;
  --accent-tint: #EFE0CD;

  /* Secondary "active now" accent -- terracotta */
  --terracotta: #B5532A;
  --terracotta-deep: #8C3F1C;
  --terracotta-soft: #D08A66;
  --terracotta-tint: #F2DECF;

  /* Borders */
  --border: #E8DDC9;
  --border-strong: #D8C9AE;
  --border-dark: #1B1714;

  /* State */
  --warn: #B0381C;

  --max-w: 640px;
  --max-w-wide: 920px;
  --max-w-results: 720px;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow: 0 1px 3px rgba(15, 15, 15, 0.05), 0 8px 32px rgba(15, 15, 15, 0.05);
  --shadow-lg: 0 4px 16px rgba(15, 15, 15, 0.07), 0 24px 64px rgba(15, 15, 15, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.5;
}

/* Clean cream body, very faint warmth wash -- Apple-Hims minimalism */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(1200px 800px at 50% -20%, rgba(255, 255, 255, 0.55), transparent 65%);
  background-attachment: fixed;
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

main, .topbar, .funnel-header { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* =====================================================
   TOPBAR
   ===================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: border-color 200ms var(--ease);
}

body[data-screen="results"] .topbar {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

body[data-screen="results"] .brand-logo {
  filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  line-height: 0;
  transition: opacity 180ms var(--ease);
}

.brand:hover { opacity: 0.7; }

.brand-logo {
  height: 76px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .brand-logo { height: 56px; }
  .topbar { padding: 14px 20px; }
}

.topbar-meta {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-screen="results"] .topbar-meta { color: var(--ink-cream-muted); }

/* =====================================================
   FUNNEL HEADER -- breadcrumbs + sub-progress
   ===================================================== */

.funnel-header {
  position: sticky;
  top: 120px;
  z-index: 19;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px 12px;
}

.breadcrumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color 180ms var(--ease);
  white-space: nowrap;
}

.breadcrumb-item.is-current {
  color: var(--terracotta);
  font-weight: 600;
}

.breadcrumb-item.is-done {
  color: var(--accent);
}

.breadcrumb-tick {
  width: 12px;
  height: 12px;
  display: inline-block;
  position: relative;
}

.breadcrumb-tick svg {
  width: 12px;
  height: 12px;
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breadcrumb-tick path {
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  animation: tickDraw 320ms var(--ease-out) forwards;
}

@keyframes tickDraw {
  to { stroke-dashoffset: 0; }
}

.breadcrumb-sep {
  color: var(--ink-faint);
  opacity: 0.6;
}

.funnel-sub {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.funnel-sub-label {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.funnel-sub-dots {
  display: flex;
  gap: 6px;
}

.funnel-sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}

.funnel-sub-dot.is-current {
  background: var(--terracotta);
  transform: scale(1.4);
}

.funnel-sub-dot.is-done {
  background: var(--accent);
}

.funnel-sub-eta {
  font-size: 12px;
  color: var(--terracotta);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .funnel-header { padding: 12px 18px 10px; top: 84px; }
  .breadcrumbs { font-size: 11px; gap: 4px 10px; }
  .breadcrumb-item:not(.is-current):not(.is-done) {
    display: none; /* show only current and completed on small screens */
  }
  .breadcrumb-item.is-current::after {
    content: attr(data-position);
    color: var(--ink-faint);
    margin-left: 8px;
    font-weight: 400;
  }
}

/* =====================================================
   MAIN
   ===================================================== */

main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 24px 24px 80px;
}

.screen {
  width: 100%;
  max-width: var(--max-w);
  animation: screenIn 380ms var(--ease-out);
}

.screen-landing { max-width: var(--max-w-wide); padding-top: 8px; }
.screen-loading {
  display: flex; align-items: center; justify-content: center; min-height: 60vh;
}
.screen-results { max-width: var(--max-w-wide); }

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

/* =====================================================
   TYPOGRAPHY -- display via Fraunces
   ===================================================== */

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0 0 24px;
  color: var(--ink);
}

.display-xl {
  font-size: clamp(44px, 7.6vw, 76px);
  max-width: 14ch;
}

.display-md {
  font-size: clamp(32px, 4.4vw, 44px);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.display-italic {
  font-style: normal;
  font-weight: 600;
  display: block;
  color: var(--accent);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 20px;
  font-weight: 500;
}

.eyebrow-cream { color: var(--ink-cream-soft); }

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 24px;
  font-weight: 600;
}

.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 32px;
  line-height: 1.5;
}

.lede-sm {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.footnote {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 16px 0 0;
}

.footnote-launch {
  margin-top: 6px;
  color: var(--terracotta);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.footnote-link {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
}

.footnote-link a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 140ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--ink-cream);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(26, 34, 26, 0.18);
}

.btn-primary:disabled {
  background: var(--clay);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.btn-lg { font-size: 17px; padding: 18px 36px; min-height: 56px; }
.btn-full { width: 100%; }

.btn-text {
  background: transparent;
  color: var(--ink-muted);
  padding: 12px 16px;
  font-weight: 500;
}

.btn-text:hover { color: var(--ink); }
.btn-text-light { color: var(--ink-cream-muted); }
.btn-text-light:hover { color: var(--ink-cream); }

.btn-skip {
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 10px 4px;
  transition: gap 180ms var(--ease), color 180ms var(--ease);
}

.btn-text-arrow:hover { gap: 10px; color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--accent);
  color: var(--ink-cream);
  box-shadow: 0 6px 16px rgba(26, 34, 26, 0.18);
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 4px;
}

/* =====================================================
   LANDING
   ===================================================== */

.landing-hero {
  padding: 56px 0 48px;
}

.proof-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 28px 0;
  margin: 8px 0 56px;
}

.proof-item {
  padding: 0 28px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proof-item:first-child { border-left: 0; padding-left: 0; }

.proof-stat {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.proof-stat-suffix {
  font-size: 0.5em;
  color: var(--terracotta);
  margin-left: 2px;
  font-style: italic;
}

.proof-label {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 26ch;
  margin: 0;
}

@media (max-width: 720px) {
  .proof-bar { grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
  .proof-item { border-left: 0; padding: 0; }
  .proof-stat { font-size: 38px; }
}

.landing-section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.prose-block p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 0 16px;
}

.prose-block p:last-child { margin-bottom: 0; }

/* USP grid */

.usp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.usp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  position: relative;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.usp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.usp-num {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--terracotta);
  margin: 0 0 16px;
  font-weight: 500;
}

.usp-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
}

.usp-body {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 720px) {
  .usp-grid { grid-template-columns: 1fr; }
  .usp-card { padding: 24px 22px; }
}

/* Steps list */

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.steps-list li {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--terracotta);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--terracotta-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.steps-list strong {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}

.steps-list span {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .steps-list { grid-template-columns: 1fr; }
}

/* Mission section */

.mission-section { padding-bottom: 64px; }

.mission-quote {
  margin: 0;
  padding: 36px 40px;
  background: linear-gradient(180deg, var(--cream), var(--oat));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  position: relative;
}

.mission-quote::before {
  content: "“";
  position: absolute;
  top: -8px;
  left: 18px;
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  color: var(--terracotta);
  opacity: 0.6;
}

.mission-quote p {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  max-width: 60ch;
  margin: 0;
}

.mission-sig {
  margin-top: 20px;
  font-style: normal;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mission-sig::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-faint);
  display: inline-block;
}

.mission-attrib {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-final-cta {
  text-align: left;
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
}

.landing-footer {
  padding: 32px 0 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-faint);
}

.landing-footer p { margin: 0; }

/* =====================================================
   QUIZ -- card, options, insight, joke
   ===================================================== */

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px 24px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.step {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 14px;
  font-weight: 500;
}

.question {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--ink);
}

.hint {
  font-size: 15px;
  color: var(--ink-muted);
  margin: 0 0 20px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 24px;
}

/* Single/multi option */

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: transform 120ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
  text-align: left;
  font-family: inherit;
  width: 100%;
  line-height: 1.4;
}

.option:hover {
  border-color: var(--accent-soft);
  background: var(--bg-card);
}

.option:active { transform: scale(0.99); }

.option.selected {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--accent), 0 1px 2px rgba(26, 26, 24, 0.04);
}

.option-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
  background: var(--bg-card);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.option.multi .option-marker { border-radius: 5px; }

.option.selected .option-marker {
  border-color: var(--accent);
  background: var(--accent);
}

.option.selected .option-marker::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--bg-card);
  border-radius: inherit;
}

.option.multi.selected .option-marker::after {
  inset: 0;
  background: transparent;
  border: solid var(--bg-card);
  border-width: 0 2px 2px 0;
  width: 6px;
  height: 10px;
  margin: 3px auto auto 6px;
  transform: rotate(45deg);
  border-radius: 0;
}

/* Text input */

.text-answer {
  width: 100%;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 18px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.text-answer:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

/* Insight + joke cards (scattered through the funnel) */

.insight-card {
  margin: 16px 0 8px;
  padding: 14px 18px;
  background: var(--accent-tint);
  border-left: 2px solid var(--accent);
  border-radius: 4px var(--radius) var(--radius) 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insight-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.insight-body {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

.joke-card {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: var(--terracotta-tint);
  border-radius: var(--radius);
  border-left: 2px solid var(--terracotta);
  animation: jokeIn 320ms var(--ease-out);
}

.joke-body {
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  color: var(--terracotta-deep);
  margin: 0;
  line-height: 1.4;
}

@keyframes jokeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.quiz-nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* =====================================================
   CHAPTER TRANSITION
   ===================================================== */

.transition-card {
  background: linear-gradient(180deg, var(--cream), var(--oat));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  margin-top: 24px;
  text-align: left;
  box-shadow: var(--shadow);
}

.transition-meta {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 20px;
  font-weight: 600;
}

.transition-headline {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}

.transition-body {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 32px;
  line-height: 1.5;
  max-width: 56ch;
}

/* =====================================================
   PHOTO
   ===================================================== */

.photo-upload { margin: 24px 0 0; }

.upload-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 56px 24px;
  background: var(--bg-elevated);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.upload-tile:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.upload-tile-icon {
  color: var(--accent);
  margin-bottom: 4px;
}

.upload-tile-line {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

.upload-tile-sub {
  font-size: 14px;
  color: var(--ink-muted);
}

.photo-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.photo-preview img {
  max-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* =====================================================
   EMAIL GATE
   ===================================================== */

.gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 38px 36px;
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.gate-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(184, 89, 58, 0.16), transparent 70%);
  pointer-events: none;
}

.gate-headline {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--ink);
  position: relative;
}

.gate-name-wrap {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.gate-sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  line-height: 1.5;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.gate-form input[type="email"] {
  width: 100%;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 17px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.gate-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.gate-error {
  font-size: 14px;
  color: var(--warn);
  margin: 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 0;
  line-height: 1.45;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-row .muted { color: var(--ink-faint); }

.phone-row { margin-top: 8px; }

.phone-row input[type="tel"] {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
}

.phone-row input[type="tel"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.trust-bites {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-line {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}

.trust-line strong { color: var(--terracotta); font-weight: 600; }

/* =====================================================
   LOADING
   ===================================================== */

.loading {
  text-align: center;
  padding: 48px 24px;
}

.loading-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
}

.loading-ring svg { display: block; }

.loading-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.loading-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 163.36; /* 2 * pi * 26 */
  stroke-dashoffset: 163.36;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: ringFill 2.4s var(--ease) infinite;
}

@keyframes ringFill {
  0%   { stroke-dashoffset: 163.36; }
  50%  { stroke-dashoffset: 40; }
  100% { stroke-dashoffset: 163.36; transform: rotate(270deg); }
}

.loading-headline {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
  transition: opacity 240ms var(--ease);
}

.loading-sub { color: var(--ink-muted); font-size: 15px; margin: 0; }

/* =====================================================
   RESULTS -- light theme (matches the rest of the app)
   The original dark-theme rules use --ink-cream variables
   and rgba(255,255,255,...) borders. We redirect the cream
   vars to ink and override the hardcoded rgba below.
   ===================================================== */

body[data-screen="results"] {
  background: var(--bg);
  --ink-cream: var(--ink);
  --ink-cream-soft: var(--ink-soft);
  --ink-cream-muted: var(--ink-muted);
}
body[data-screen="results"]::before { opacity: 0; }

body[data-screen="results"] .funnel-header { display: none; }

.screen-results {
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 0;
  margin: -24px -24px 0;
  width: calc(100% + 48px);
  max-width: none;
}

.results {
  max-width: var(--max-w-results);
  margin: 0 auto;
  padding: 32px 32px 80px;
}

.results-hero {
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.results-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 20px;
  color: var(--ink-cream);
}

.results-subhead {
  font-size: 19px;
  color: var(--ink-cream-soft);
  line-height: 1.5;
  margin: 0;
  max-width: 56ch;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

.results-section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.results-section:first-of-type { border-top: 0; padding-top: 16px; }

.section-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-cream-muted);
  font-weight: 600;
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.section-meta {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--ink-cream-muted);
  font-family: var(--font-display);
  font-style: italic;
}

.observations {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.observations li {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-cream);
  padding-left: 18px;
  border-left: 2px solid var(--terracotta);
  font-family: var(--font-display);
  font-weight: 400;
}

/* Routine cards */

.routine {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 18px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.product-card:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.product-step {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--terracotta-soft);
  font-weight: 500;
}

.product-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink-cream);
}

.product-feel {
  font-size: 14px;
  color: var(--ink-cream-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.product-why {
  font-size: 15px;
  color: var(--ink-cream-soft);
  line-height: 1.5;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-why strong {
  font-weight: 600;
  color: var(--ink-cream);
}

.product-meta {
  font-size: 13px;
  color: var(--ink-cream-muted);
  text-align: right;
  white-space: nowrap;
}

.product-meta-price {
  display: block;
  margin-top: 4px;
  color: var(--ink-cream-muted);
}

@media (max-width: 540px) {
  .product-card { grid-template-columns: 32px 1fr; }
  .product-meta { grid-column: 2; text-align: left; padding-top: 0; margin-top: 4px; }
}

/* Compare table */

.compare {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.compare-row {
  display: grid;
  grid-template-columns: 1.2fr 2fr 2fr;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.compare-row:first-child { border-top: 0; }

.compare-row-head {
  background: var(--accent-tint);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.compare-dim {
  color: var(--ink-cream-muted);
  font-weight: 500;
  align-self: center;
}

.compare-current {
  color: var(--ink-cream-soft);
  align-self: center;
  line-height: 1.4;
}

.compare-heka {
  color: var(--ink-cream);
  font-weight: 500;
  align-self: center;
  line-height: 1.4;
  position: relative;
  padding-left: 14px;
}

.compare-heka::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--terracotta);
  border-radius: 2px;
}

@media (max-width: 640px) {
  .compare-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .compare-row-head { display: none; }
  .compare-dim {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-cream-muted);
  }
  .compare-current::before { content: "Now: "; color: var(--ink-cream-muted); font-weight: 400; }
  .compare-heka { padding-left: 0; }
  .compare-heka::before { display: none; }
  .compare-heka::after { content: " (Heka)"; color: var(--terracotta-soft); font-weight: 400; }
}

/* Prose, tips */

.prose {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-cream-soft);
  margin: 0;
  max-width: 60ch;
}

.tips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: tip;
}

.tips li {
  font-size: 16px;
  color: var(--ink-cream-soft);
  padding-left: 38px;
  position: relative;
  line-height: 1.5;
  counter-increment: tip;
}

.tips li::before {
  content: counter(tip, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -1px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--terracotta-soft);
  font-weight: 500;
}

/* Trust row */

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.trust-badge svg { color: var(--terracotta-soft); margin-bottom: 4px; }

.trust-badge strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-cream);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.trust-badge span {
  font-size: 12px;
  color: var(--ink-cream-muted);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}

/* CTA / bundle card */

.results-cta {
  margin-top: 8px;
  padding: 32px;
  background: linear-gradient(180deg, var(--accent-tint), var(--bg-card));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}

.cta-pitch {
  font-family: var(--font-display);
  font-size: 21px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-cream);
  margin: 0 0 24px;
  font-weight: 400;
}

.bundle-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  align-items: center;
}

.bundle-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-soft);
  margin: 0 0 4px;
  font-weight: 600;
}

.bundle-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-cream);
  margin: 0 0 4px;
}

.bundle-list {
  font-size: 13px;
  color: var(--ink-cream-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

.bundle-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.bundle-price-anchor {
  font-size: 14px;
  color: var(--ink-cream-muted);
  text-decoration: line-through;
  text-decoration-color: var(--terracotta-soft);
}

.bundle-price-now {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  color: var(--terracotta-soft);
  letter-spacing: -0.02em;
  line-height: 1;
}

.bundle-price-meta {
  font-size: 11px;
  color: var(--ink-cream-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

@media (max-width: 540px) {
  .bundle-card { grid-template-columns: 1fr; }
  .bundle-price { text-align: left; align-items: flex-start; }
}

/* FAQ accordion */

.faq {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item:first-child { border-top: 0; padding-top: 0; }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink-cream);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  text-align: left;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.faq-q:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }

.faq-toggle {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--ink);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
}

.faq-item.is-open .faq-toggle { transform: rotate(45deg); background: var(--accent); color: #ffffff; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms var(--ease), padding 280ms var(--ease);
  font-size: 15px;
  color: var(--ink-cream-soft);
  line-height: 1.55;
}

.faq-item.is-open .faq-a {
  max-height: 320px;
  padding-top: 12px;
}

.results-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Sticky CTA on results */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(15, 15, 15, 0.06);
  transform: translateY(100%);
  transition: transform 280ms var(--ease-out);
}

.sticky-cta[data-visible="true"] { transform: translateY(0); }

.sticky-meta {
  font-size: 13px;
  color: var(--ink-cream-soft);
  letter-spacing: 0.04em;
}

.sticky-cta .btn-primary {
  background: var(--terracotta);
  color: #fff;
  padding: 12px 20px;
  min-height: 44px;
  font-size: 15px;
}

.sticky-cta .btn-primary:hover { background: var(--terracotta-deep); }

/* Reveal-on-scroll */

.reveal-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   ERROR
   ===================================================== */

.error { text-align: center; padding: 80px 24px; }

.error h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  margin: 0 0 12px;
}

.error p { color: var(--ink-muted); margin: 0 0 24px; }

/* =====================================================
   MOBILE TUNING
   ===================================================== */

@media (max-width: 540px) {
  main { padding: 16px 16px 80px; }
  .topbar { padding: 14px 18px; }
  .quiz-card { padding: 30px 22px 22px; border-radius: var(--radius); }
  .gate-card { padding: 32px 22px 28px; border-radius: var(--radius); }
  .transition-card { padding: 40px 24px; border-radius: var(--radius); }
  .results { padding: 24px 20px 96px; }
  .results-cta { padding: 24px 20px; border-radius: var(--radius); }
  .landing-hero { padding: 32px 0 32px; }
  .landing-section { padding: 40px 0; }
  .founder-quote { padding: 22px 22px; }
  .founder-quote p { font-size: 19px; }
}

@media (max-width: 380px) {
  .funnel-sub { flex-direction: column; align-items: flex-start; }
}

/* Dark-mode results theme lives in palette.css so it loads last
   and beats the per-palette variable overrides. */

