/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
  /* Brand Colors */
  --color-cyan: #13C6D4;
  --color-cyan-light: #5FE3EA;
  --color-cyan-dark: #0A8F9A;
  
  --color-purple: #6541C8;
  --color-purple-light: #8B6DE3;
  --color-purple-dark: #43299B;

  /* State Colors */
  --color-green: #28C98B;
  --color-green-dark: #169E6B;
  --color-red: #EF5B6C;
  --color-red-dark: #CF3E51;

  /* Neutral Palette (Dark Theme) */
  --color-bg-base: #0D1117;
  --color-bg-surface: #151B23;
  --color-bg-card: #1C2430;
  
  --color-text-primary: #F5F7FA;
  --color-text-secondary: #AAB4C0;
  --color-border: #2A3440;

  /* Typography */
  --font-family-base: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  --spacing-4xl: 8rem;

  /* Touch Targets */
  --touch-target-min: 44px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}
body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.text-hero {
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-sm);
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: var(--spacing-sm);
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-purple-light);
  margin-bottom: var(--spacing-xs);
  display: block;
}

.text-lead {
  font-size: clamp(1.125rem, 3vw, 1.25rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

/* Stacked Layout on Mobile */
.flex-stack {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

/* Desktop Enhancements */
@media (min-width: 768px) {
  .section {
    padding: var(--spacing-4xl) 0;
  }
  
  .md\:flex-row {
    flex-direction: row;
  }
  
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target-min);
  padding: 0 var(--spacing-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background-color: var(--color-cyan);
  color: var(--color-bg-base);
}

.btn-primary:active,
.btn-primary:focus-visible {
  background-color: var(--color-cyan-dark);
  transform: translateY(2px);
}

.btn-secondary {
  background-color: var(--color-purple);
  color: #fff;
}

.btn-secondary:active,
.btn-secondary:focus-visible {
  background-color: var(--color-purple-dark);
  transform: translateY(2px);
}

.btn-outline {
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  background-color: transparent;
}

/* Button hover effects - enabled only if device supports hover */
@media (hover: hover) {
  .btn-primary:hover {
    background-color: var(--color-cyan-light);
    box-shadow: 0 4px 14px rgba(19, 198, 212, 0.4);
  }
  
  .btn-secondary:hover {
    background-color: var(--color-purple-light);
    box-shadow: 0 4px 14px rgba(101, 65, 200, 0.4);
  }
  
  .btn-outline:hover {
    border-color: var(--color-text-primary);
  }
}

/* Cards */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: var(--spacing-sm) 0;
  background-color: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-ads {
  color: var(--color-cyan);
}

.logo-for {
  color: var(--color-text-primary);
}

.logo-sales {
  color: var(--color-purple-light);
}

/* MultiLoop Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Helper Classes */
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }
.mt-2xl { margin-top: var(--spacing-2xl); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-auto { margin-top: auto; }
.my-md { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }
.my-xl { margin-top: var(--spacing-xl); margin-bottom: var(--spacing-xl); }
.p-md { padding: var(--spacing-md); }
.ml-lg { margin-left: var(--spacing-lg); }
.pt-md { padding-top: var(--spacing-md); }

.flex { display: flex; }
.flex-wrap { display: flex; flex-wrap: wrap; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-xs { gap: var(--spacing-xs); }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-1 { flex: 1; }

@media (min-width: 768px) {
  .sm-flex-row { flex-direction: row; }
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-cyan { color: var(--color-cyan); }
.text-purple { color: var(--color-purple); }
.text-purple-light { color: var(--color-purple-light); }
.text-white { color: var(--color-text-primary); }
.text-bg-base { color: var(--color-bg-base); }
.text-red { color: var(--color-red); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-normal { font-weight: 400; }

.hover-white:hover { color: var(--color-text-primary); }

.bg-surface { background-color: var(--color-bg-surface); }
.bg-bg-base { background-color: var(--color-bg-base); }
.bg-green { background-color: var(--color-green); }
.bg-green-dark { background-color: var(--color-green-dark); }
.bg-purple { background-color: var(--color-purple); }
.bg-red { background-color: var(--color-red); }
.bg-red-dark { background-color: var(--color-red-dark); }
.bg-cyan { background-color: var(--color-cyan); }

.border-cyan { border-color: var(--color-cyan); }
.border-purple { border-color: var(--color-purple); }
.border-top { border-top: 1px solid var(--color-border); }
.rounded { border-radius: var(--radius-md); }

.max-w-lg { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.block { display: block; }
.hidden { display: none !important; }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.opacity-75 { opacity: 0.75; }
.opacity-80 { opacity: 0.8; }

.list-styled {
  list-style-type: disc;
  padding-left: 1rem;
}
.list-styled li {
  margin-bottom: 0.25rem;
}

.negative-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  text-align: left;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.negative-list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}
.negative-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin-top: 4px;
}

.chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Loop Details (Progressive Disclosure) */
.loop-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-cyan);
  user-select: none;
}
.loop-details summary:hover {
  text-decoration: underline;
}

/* Diagnostic Buttons */
.diag-btn {
  flex: 1;
  padding: 0 var(--spacing-xs);
  font-size: 0.875rem;
}
.diag-btn.active {
  background-color: var(--color-cyan);
  color: var(--color-bg-base);
  border-color: var(--color-cyan);
}
.diag-btn.diag-btn-na.active {
  background-color: var(--color-border);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.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;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
  text-align: left;
}
.input-field {
  width: 100%;
  background-color: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  color: var(--color-text-primary);
  font-size: 1rem;
  min-height: var(--touch-target-min);
  transition: border-color var(--transition-fast);
}
.input-field:focus {
  outline: none;
  border-color: var(--color-cyan);
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-sm);
  background-color: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--spacing-sm);
  z-index: 90;
  transition: transform var(--transition-normal);
}
@media (min-width: 768px) {
  .mobile-sticky-cta {
    display: none !important;
  }
}

/* Accordion Component */
.accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  background-color: var(--color-bg-surface);
  overflow: hidden;
}
.accordion-header {
  width: 100%;
  text-align: left;
  padding: var(--spacing-md);
  background: none;
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--touch-target-min);
}
.accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.02);
}
.accordion-icon {
  color: var(--color-cyan);
  transition: transform var(--transition-fast);
}
.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}
.accordion-content {
  padding: 0 var(--spacing-md) var(--spacing-md);
}

/* Animations */
@keyframes signalMove {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.signal {
  animation: signalMove 2s infinite ease-in-out;
}
.s1 { animation-delay: 0s; }
.s2 { animation-delay: 0.5s; }
.s3 { animation-delay: 1s; }
.s4 { animation-delay: 1.5s; }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Diagnostic Carousel Animations & Utilities */
.diagnostic-container {
  width: 100%;
}
.progress-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.progress-node.is-active {
  background: var(--gradient-cyan-purple);
  transform: scale(1.2);
}
.progress-node.is-complete {
  background-color: var(--color-cyan);
}

.carousel-card {
  display: flex;
  flex-direction: column;
}

.loop-details summary {
  list-style: none;
}
.loop-details summary::-webkit-details-marker {
  display: none;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  background-color: var(--color-surface);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
}
@media (min-width: 576px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.diag-btn-yn {
  transition: all 0.2s ease;
}
.bg-green-subtle { background-color: rgba(34, 197, 94, 0.1) !important; }
.border-green { border-color: #22c55e !important; }
.text-green { color: #22c55e !important; }
.bg-red-subtle { background-color: rgba(239, 68, 68, 0.1) !important; }
.border-red { border-color: #ef4444 !important; }
.text-red { color: #ef4444 !important; }
.border-cyan-subtle { border: 1px solid rgba(0, 255, 255, 0.15); }
.border-top-secondary { border-top: 1px solid var(--color-surface); }
.border-bottom-secondary { border-bottom: 1px solid var(--color-surface); }
.line-height-relaxed { line-height: 1.6; }
.last-no-border:last-child { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.underline-transparent {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}
.underline-transparent:hover { text-decoration-color: currentColor; }

.w-full { width: 100%; }
.p-xs { padding: var(--spacing-xs); }

/* Slide Animations */
.slide-out-left { animation: slideOutLeft 0.25s forwards cubic-bezier(0.4, 0, 0.2, 1); }
.slide-out-right { animation: slideOutRight 0.25s forwards cubic-bezier(0.4, 0, 0.2, 1); }
.slide-in-right { animation: slideInRight 0.25s forwards cubic-bezier(0.4, 0, 0.2, 1); }
.slide-in-left { animation: slideInLeft 0.25s forwards cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes slideOutLeft {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-20px); opacity: 0; }
}
@keyframes slideOutRight {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(20px); opacity: 0; }
}
@keyframes slideInRight {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
  0% { transform: translateX(-20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   V3 DIAGNOSTIC STYLES (Coloured Cards)
   ========================================================================== */

.diagnostic-container {
  width: 100%;
  position: relative;
}

/* --- Progress Navigation --- */
.diag-desktop-pill, .diag-mobile-pill {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-secondary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 4px 12px;
}
.diag-mobile-pill {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.diag-desktop-pill:hover, .diag-mobile-pill:hover {
  border-color: var(--loop-color);
  color: var(--color-white);
}
.diag-desktop-pill.active, .diag-mobile-pill.active {
  background: var(--loop-color);
  border-color: var(--loop-color);
  color: var(--color-bg);
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--loop-color);
}
.diag-desktop-pill.answered, .diag-mobile-pill.answered {
  border-color: var(--loop-color);
  color: var(--loop-color);
}
/* For mobile active pill, we expand it to show text if needed, but for now we just scale it. */

/* --- Stage & Carousel --- */
.diagnostic-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-md) 0;
}

.diagnostic-stage {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  gap: 16px; /* Gap between cards */
  /* Calculate padding so the first/last cards are centered. 
     Desktop active card max width: 850px.
     Mobile active card max width: 92vw. */
  padding: 20px calc(50vw - (min(92vw, 850px) / 2));
}
.diagnostic-stage::-webkit-scrollbar {
  display: none;
}

/* --- Cards --- */
.v3-card {
  flex: 0 0 auto;
  width: min(92vw, 850px);
  scroll-snap-align: center;
  
  /* The core colour applied via inline variable --card-color */
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent), var(--card-color);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 0; /* padding moved to inner for nav placement */
  
  opacity: 0.4; /* dim non-active */
  transform: scale(0.9);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 30px rgba(0,0,0,0.5);
}

.v3-card.active {
  opacity: 1;
  transform: scale(1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 20px 40px rgba(0,0,0,0.8);
}

.diag-card-inner {
  padding: clamp(16px, 4vw, 32px);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.v3-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.v3-card-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
}
.v3-card-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #fff;
  font-weight: 800;
}

.v3-card-question {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 32px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* --- Interaction Area --- */
.v3-interaction-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.v3-instruction-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.v3-choice-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.v3-tile {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 30%; /* Try to fit 3 across */
  min-width: 90px;
  color: #fff;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.v3-tile:hover {
  background: rgba(0,0,0,0.6);
  border-color: rgba(255,255,255,0.3);
}

.v3-tile.selected {
  background: #fff;
  border-color: #fff;
  color: #000;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.v3-tile-val {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.v3-tile-desc {
  font-size: 0.65rem;
  opacity: 0.8;
  text-align: center;
  line-height: 1.2;
}

/* Checkmark injection for selected */
.v3-tile.selected::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  background: #22c55e;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid var(--card-color);
}

@media (max-width: 400px) {
  /* Fallback 2 + 1 if 3 across is too tight */
  .v3-tile {
    flex: 1 1 45%;
  }
  .v3-tile:last-child {
    flex: 1 1 100%;
  }
}

/* --- Looping Destination --- */
.v3-looping-destination {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.v3-destination-arrow {
  color: rgba(255,255,255,0.7);
  font-size: 1.2rem;
}
.v3-destination-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.v3-destination-name {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}
.v3-destination-sub {
  font-size: 1.1rem;
}

/* --- Disclosure --- */
.v3-disclosure {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 12px;
  margin-top: auto;
}
.v3-disclosure summary {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 20px;
}
.v3-disclosure summary::-webkit-details-marker {
  display: none;
}
.v3-disclosure summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
}
.v3-disclosure[open] summary::after {
  content: '-';
}
.v3-disclosure-content {
  padding-top: 12px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
}

/* --- Card Navigation Bottom Bar --- */
.v3-card-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.3);
  padding: 12px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.v3-nav-btn {
  background: none;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 8px 0;
}
.v3-nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}
.v3-nav-btn:hover {
  opacity: 0.7;
}
.pulse-emphasis {
  animation: pulseEmphasis 2s infinite;
}
@keyframes pulseEmphasis {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); text-shadow: 0 0 10px rgba(255,255,255,0.5); }
  100% { transform: scale(1); }
}

/* --- Results Screen --- */
.v3-result-pill {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.v3-res-name {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.v3-res-val {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .result-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .v3-result-pill {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0;
  }
}

/* Utils */
.sm-hidden { display: flex; }
.sm-flex { display: none; }
@media (min-width: 640px) {
  .sm-hidden { display: none !important; }
  .sm-flex { display: flex !important; }
}

/* ==========================================================================
   RECOVERED LOOP TOKENS
   ========================================================================== */
:root {
  --loop-c1: #13C6D4;
  --loop-c2: #0BADD1;
  --loop-c3: #0F8EC7;
  --loop-c4: #156CC3;
  --loop-c5: #204CBE;
  --loop-c6: #4235B4;
  --loop-c7: #582CA9;
  --loop-c8: #6541C8;
  --loop-c9: #5FE3EA;
}

/* ==========================================================================
   RECOVERED HERO STYLES
   ========================================================================== */
.hero-loop-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.loop-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
.loop-label.loop-color-1 { border-color: var(--loop-c1); color: var(--loop-c1); }
.loop-label.loop-color-2 { border-color: var(--loop-c2); color: var(--loop-c2); }
.loop-label.loop-color-3 { border-color: var(--loop-c3); color: var(--loop-c3); }
.loop-label.loop-color-4 { border-color: var(--loop-c4); color: var(--loop-c4); }
.loop-label.loop-color-5 { border-color: var(--loop-c5); color: var(--loop-c5); }
.loop-label.loop-color-6 { border-color: var(--loop-c6); color: var(--loop-c6); }
.loop-label.loop-color-7 { border-color: var(--loop-c7); color: var(--loop-c7); }
.loop-label.loop-color-8 { border-color: var(--loop-c8); color: var(--loop-c8); }
.loop-label.loop-color-9 { border-color: var(--loop-c9); color: var(--loop-c9); }

/* ==========================================================================
   RECOVERED SECTION 2 STYLES (Signal Modules)
   ========================================================================== */
.problem-questions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: calc(var(--spacing-xl) * 1.5);
}
.signal-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
@media (min-width: 768px) {
  .signal-card {
    flex-direction: row;
    align-items: center;
    padding: 1.5rem 2rem;
    gap: 1rem;
  }
}
.signal-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-cyan);
  margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
  .signal-label {
    min-width: 100px;
    margin-bottom: 0;
  }
}
.signal-context {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
.signal-ask {
  color: var(--text-white);
  font-weight: 700;
  font-size: 1.125rem;
  margin-top: 0;
}

/* ==========================================================================
   RECOVERED STICKY BAR VISIBILITY
   ========================================================================== */
.contact-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.contact-sticky.is-visible {
  transform: translateY(0);
}
/* Hide sticky bar when near the bottom / calculator */
@media (max-width: 767px) {
  .contact-sticky.hide-on-calc {
    transform: translateY(100%) !important;
  }
}

/* ==========================================================================
   RECOVERED TYPOGRAPHY & BUTTONS
   ========================================================================== */
.btn-primary {
  background: var(--color-cyan);
  color: #000;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}


/* ==========================================================================
   V3 DIAGNOSTIC (SINGLE CARD STATIC TEST)
   ========================================================================== */

/* Preview Toggle */
body.v3-preview #diagnostic-v2 { display: none !important; }
body:not(.v3-preview) #diagnostic-v3 { display: none !important; }

/* Container */
#diagnostic-v3 {
  overflow: hidden;
}

.v3-diag-carousel {
  width: 100%;
  padding: 0 var(--spacing-sm);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Card */
.v3-diag-card {
  width: 94%;
  max-width: 800px;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg) var(--spacing-md);
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255,255,255,0.2);
  color: #ffffff; /* Default text for dark blue/purple */
  
  /* Tonal gradient */
  background-image: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.2) 100%);
  
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.v3-diag-card-header {
  text-align: left;
}

.v3-diag-loop-title {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.8;
}

.v3-diag-question {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
  /* text-wrap: balance; */
}

.v3-diag-instruction {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.6;
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

/* Answer Grid */
.v3-diag-answers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
}

/* Fallback for very small screens if 3 across is too tight */
@media (max-width: 380px) {
  .v3-diag-answers {
    grid-template-columns: 1fr 1fr;
  }
  .v3-diag-tile:last-child {
    grid-column: 1 / -1;
  }
}

/* Answer Tiles */
.v3-diag-tile {
  background: rgba(0, 0, 0, 0.35); /* Dark translucent surface */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-xs);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.v3-diag-tile:hover {
  background: rgba(0, 0, 0, 0.5);
}

.v3-diag-tile.selected {
  background: #ffffff;
  color: #0b0f19;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.v3-diag-tile-title {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.v3-diag-tile-desc {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Selected state adjustments */
.v3-diag-tile.selected .v3-diag-tile-title {
  color: #0b0f19;
}
.v3-diag-tile.selected .v3-diag-tile-desc {
  opacity: 0.6;
  color: #0b0f19;
}

/* Looping Destination */
.v3-diag-destination {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.v3-diag-dest-arrow {
  font-size: 1.5rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.v3-diag-dest-title {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.v3-diag-dest-brand {
  font-size: 1.25rem;
}

/* Disclosure */
.v3-diag-disclosure {
  overflow: hidden;
  margin-top: var(--spacing-sm);
}

.v3-diag-disclosure summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  list-style: none; /* Hide default arrow */
  opacity: 0.9;
  transition: opacity 0.2s;
}
.v3-diag-disclosure summary:hover {
  opacity: 1;
}
.v3-diag-disclosure summary::-webkit-details-marker {
  display: none;
}
.v3-diag-disclosure summary::before {
  content: "+";
  margin-right: 0.5rem;
  font-weight: bold;
}
.v3-diag-disclosure[open] summary::before {
  content: "-";
}

.v3-diag-disclosure-content {
  padding: 0 var(--spacing-sm) var(--spacing-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}








/* ==========================================================================
   SECTION 2 REDESIGN (CHECKPOINT 1.5)
   ========================================================================== */

#problem {
  scroll-margin-top: 100px;
  padding-top: calc(var(--spacing-2xl) * 2.5); /* Substantially more top padding */
  padding-bottom: var(--spacing-lg);
}

/* 8 QUESTIONS GRID */
.problem-boxes-grid {
  display: grid;
  gap: var(--spacing-md);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.problem-box {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.box-number {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.9;
  flex: 0 0 24px;
}

.box-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.box-context {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

.box-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

/* CLIMAX */
.problem-climax {
  margin-top: calc(var(--spacing-2xl) * 1.5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.climax-text {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* PROOF SEQUENCE */
.problem-proof-sequence {
  margin-top: var(--spacing-2xl);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(20, 25, 40, 0.3);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl) var(--spacing-md);
}

.proof-numbers-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  align-items: center;
  justify-content: center;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proof-value {
  font-size: clamp(3rem, 10vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--spacing-xs);
  letter-spacing: -0.03em;
}

.proof-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* MOBILE */
@media (max-width: 767px) {
  #problem {
  scroll-margin-top: 100px;
    padding-top: calc(var(--spacing-2xl) * 2);
  }
  .problem-boxes-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .problem-box {
    padding: var(--spacing-md) 0;
    gap: var(--spacing-sm);
  }
  .problem-box:last-child {
    border-bottom: none;
  }
  .box-context {
    font-size: 0.95rem;
  }
  .box-question {
    font-size: 1.15rem;
  }
  .climax-text {
    font-size: 1.6rem;
  }
  .reveal-text {
    margin-top: calc(var(--spacing-2xl) * 1.5);
    font-size: 2rem;
    line-height: 1.2;
  }
  .problem-proof-sequence {
    padding: var(--spacing-xl) var(--spacing-sm);
    background: transparent;
    border: none;
  }
}

/* DESKTOP */
@media (min-width: 768px) {
  .problem-boxes-grid {
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--spacing-lg);
    row-gap: var(--spacing-xl);
    max-width: 1200px;
  }
  .problem-box {
    border-bottom: none;
    border-left: 1px solid rgba(255,255,255,0.05);
    padding: 0 0 0 var(--spacing-md);
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  .box-number {
    margin-bottom: var(--spacing-xs);
  }
  .box-context {
    font-size: 0.95rem;
  }
  .box-question {
    font-size: 1.15rem;
  }
  .proof-numbers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
  }
  .reveal-text {
    margin-top: calc(var(--spacing-2xl) * 1.5);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.15;
  }
}


/* PREMIUM ACCORDIONS */
.problem-accordions {
  width: 100%;
}
.premium-accordion {
  background: rgba(20, 25, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.premium-accordion:hover {
  background: rgba(30, 35, 50, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.premium-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
}

.premium-accordion summary::-webkit-details-marker {
  display: none;
}

.premium-accordion summary::marker {
  display: none;
}

.summary-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.summary-icon {
  font-size: 1.5rem;
  color: #00E6FF;
  transition: transform 0.3s ease;
  line-height: 1;
}

.premium-accordion[open] .summary-icon {
  transform: rotate(45deg);
}

.premium-accordion[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-accordion-content {
  padding: var(--spacing-lg);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-size: 0.95rem;
}

.premium-accordion-content p {
  margin-bottom: var(--spacing-md);
}

.premium-accordion-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   PHASE 1: HERO LAYOUT (RESTORED)
   ========================================================================== */

/* Structure */
.hero-section {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  padding-top: 80px;
}

/* Typography & Spacing */
.hero-group-positioning { margin-bottom: var(--spacing-lg); }
.hero-headline { 
  font-size: clamp(2rem, 8vw, 4.5rem); 
  line-height: 1.05; 
  letter-spacing: -0.03em; 
  margin-top: 0.5rem;
}

.hero-group-pain { margin-bottom: var(--spacing-md); }
.hero-pain-1 { 
  font-size: clamp(1.1rem, 2.5vw, 1.4rem); 
  font-weight: 600;
  margin-bottom: var(--spacing-xs); 
}
.hero-pain-2 { 
  font-size: clamp(1rem, 2vw, 1.25rem); 
  line-height: 1.4; 
}

/* Pills block */
.hero-loop-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-md);
  max-width: 95%;
}
.hero-loop-labels .loop-label {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* CTA Group */
.hero-group-cta { 
  margin-top: var(--spacing-md); 
  margin-bottom: var(--spacing-md); 
}
.hero-cta-text {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.hero-cta-btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
}

/* MOBILE & TABLET */
@media (max-width: 991px) {
  .hero-container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .hero-content {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: var(--spacing-lg);
  }
  .hero-group-positioning { margin-bottom: var(--spacing-md); }
  .hero-group-pain { margin-bottom: var(--spacing-md); }
  .hero-loop-labels { margin-bottom: var(--spacing-md); }
  .hero-cta-text { margin-bottom: var(--spacing-lg); }
  
  .hero-visual {
    width: 100%;
    display: none; /* Hidden on mobile */
    justify-content: center;
    padding-bottom: var(--spacing-2xl);
  }
  .hero-visual svg, .hero-visual img { max-width: 90%; margin-left: auto; margin-right: auto; }
}

/* DESKTOP (Shifted to 992px to prevent tablet squishing) */
@media (min-width: 992px) {
  .hero-section {
    padding-top: 110px; 
    padding-bottom: var(--spacing-2xl);
  }
  .hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr; 
    gap: var(--spacing-lg);
    align-items: center; 
  }
  .hero-content {
    padding-right: var(--spacing-md);
  }
  .hero-group-cta { margin-bottom: 0; }
  .hero-cta-text { margin-bottom: 0.5rem; }
  .hero-visual {
    display: flex;
    justify-content: flex-end;
    margin-top: 0; 
  }
  .hero-visual svg, .hero-visual img {
    width: 100%;
    max-width: 500px;
    height: auto;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes svgPulse {
  0% {
    filter: drop-shadow(0 0 1px var(--pulse-color, currentColor)) drop-shadow(0 0 4px var(--pulse-color, currentColor)) drop-shadow(0 0 15px var(--pulse-color, currentColor));
    stroke-opacity: 0.8;
  }
  50% {
    filter: drop-shadow(0 0 2px var(--pulse-color, currentColor)) drop-shadow(0 0 6px var(--pulse-color, currentColor)) drop-shadow(0 0 25px var(--pulse-color, currentColor));
    stroke-opacity: 1;
  }
  100% {
    filter: drop-shadow(0 0 1px var(--pulse-color, currentColor)) drop-shadow(0 0 4px var(--pulse-color, currentColor)) drop-shadow(0 0 15px var(--pulse-color, currentColor));
    stroke-opacity: 0.8;
  }
}

.pulsate-active {
  animation: svgPulse 1.5s infinite ease-in-out;
}

#wheel-svg {
  width: 100%;
  height: auto;
  max-height: 80vh;
  overflow: visible;
}

/* Responsive Wheel Typography & Layout */
.wheel-container {
  /* Padding to prevent SVG shadow clipping on mobile viewport edges */
  padding: 0 5px !important;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  position: relative;
  /* Add padding to ensure the heavy SVG drop-shadows never clip against the viewport edges */
  padding: 0 15px; 
}

#wheel-svg {
  width: 100%;
  height: auto;
  overflow: visible !important;
}

.wheel-center-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* The SVG inner hole is exactly 40% (200 diameter in 500 viewBox). 
     Setting the container to 36% guarantees it never overlaps the neon ring */
  width: 35%; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

.wheel-center-overlay * {
  pointer-events: auto;
}

#wheel-question-text {
  /* Fluid typography: small on mobile, capped on desktop */
  font-size: clamp(0.85rem, 3.5vw, 1.7rem);
  line-height: 1.25;
  margin-bottom: clamp(0.4rem, 1.5vw, 1.5rem);
  padding: 0;
}

.wheel-btn-group {
  gap: clamp(0.5rem, 2vw, 1rem);
}

.btn-wheel-yes, .btn-wheel-no {
  padding: clamp(0.25rem, 1vw, 0.6rem) clamp(0.6rem, 2.5vw, 2rem);
  font-size: clamp(0.65rem, 1.8vw, 1rem);
}


.sandbox-section {
  padding: var(--spacing-md) 0;
}
@media (min-width: 768px) {
  .sandbox-section {
    padding: var(--spacing-2xl) 0;
  }
}

/* Subtle Button Dance Animation */
@keyframes subtleDance {
  0% { transform: scale(1) rotate(0deg); }
  4% { transform: scale(1.05) rotate(-4deg); }
  8% { transform: scale(1.05) rotate(4deg); }
  12% { transform: scale(1.05) rotate(-4deg); }
  16% { transform: scale(1.05) rotate(4deg); }
  20% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.btn-dance {
  animation: subtleDance 5s infinite ease-in-out;
  animation-delay: 1s; /* Delays the first dance so the user is looking at the screen when it happens */
  animation-fill-mode: both;
}
.btn-wheel-yes.btn-dance {
  animation-delay: 1.3s; /* Offset from the red button */
}

/* Custom Layout for Wheel Sandbox */
.desktop-wheel-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.desktop-wheel-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
}

@media (min-width: 768px) {
    .desktop-wheel-layout {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        max-width: 950px !important; /* Allow it to span wider to fit buttons side-by-side */
    }
    .desktop-wheel-actions {
        flex-direction: column;
        margin-top: 0;
        gap: 1rem;
        width: auto;
    }
}

/* ==========================================================================
   LANDING PAGE ADDITIONS
   ========================================================================== */
/* Utility Classes */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

   ========================================================================== */

/* 10,000s Float Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* MultiLoop Graphic Nodes */
.ml-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 15px var(--cyan);
  z-index: 2;
  transform: translate(-50%, -50%);
}

.ml-node span {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0.9;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes signalPulse {
  0% { stroke-opacity: 0.1; }
  50% { stroke-opacity: 0.8; stroke-width: 2px; }
  100% { stroke-opacity: 0.1; }
}

.ml-path {
  fill: none;
  stroke: var(--purple-light);
  stroke-width: 1px;
  stroke-dasharray: 5, 5;
  animation: signalPulse 3s infinite;
}

.ml-path:nth-child(even) {
  stroke: var(--cyan);
  animation-duration: 4s;
  animation-delay: 1s;
}

/* Human Judgement Loop */
.loop-step {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.arrow {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
  z-index: 1;
  margin: -10px 0;
}

/* Timeline */
.timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: rgba(255,255,255,0.1);
  z-index: 0;
}

@media (max-width: 639px) {
  .timeline::before {
    display: none;
  }
}


/* Background Data Points Animations */
.fade-edges {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%), radial-gradient(ellipse at center, transparent 25%, black 50%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%), radial-gradient(ellipse at center, transparent 25%, black 50%);
  mask-composite: intersect;
}

@keyframes drift {
  0% { transform: translate(-50%, -50%); }
  50% { transform: translate(calc(-50% + 20px), calc(-50% - 20px)); }
  100% { transform: translate(calc(-50% - 15px), calc(-50% + 15px)); }
}

.floating-data-point {
  transform: translate(-50%, -50%);
}


.data-path-glow {
  filter: drop-shadow(0 0 5px currentColor);
}

/* Fix mobile gap between Hero and Wheel */
@media (max-width: 768px) {
  .hero-section {
    padding-bottom: var(--spacing-md);
  }
  .sandbox-section {
    padding-top: var(--spacing-md) !important;
  }
}

/* Infinite Logo Marquee */
.logo-marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 12s linear infinite;
}

.logo-marquee-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding-right: 4rem; /* Replaces the gap between blocks and guarantees exact width matching */
  flex-shrink: 0;
}

.logo-marquee-content img {
  height: 45px;
  width: auto;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: opacity 0.3s ease;
  object-fit: contain;
}

.logo-marquee-content img:hover {
  opacity: 1;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } 
}

/* Grid Utilities */
.grid {
  display: grid;
}
@media (min-width: 992px) {
  .md-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sci-Fi Calculator Styles */
.scifi-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-bottom: 2px solid rgba(0, 230, 255, 0.4);
  color: var(--color-cyan);
  font-size: 1.5rem;
  font-weight: bold;
  padding: 0.75rem 1rem;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}
.scifi-input:focus {
  outline: none;
  border-bottom-color: var(--color-cyan);
  background: rgba(0, 230, 255, 0.05);
  box-shadow: inset 0 0 15px rgba(0,230,255,0.1);
}
/* Remove increment arrows from number inputs for clean look */
.scifi-input::-webkit-outer-spin-button,
.scifi-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.scifi-input[type=number] {
  -moz-appearance: textfield;
}

/* CALCULATOR 2.0 STYLES */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: 45% 55%;
  }
}

.formula-visualizer .active-glow {
  background: rgba(0, 230, 255, 0.05);
  border-color: rgba(0, 230, 255, 0.5) !important;
  box-shadow: inset 0 0 15px rgba(0,230,255,0.1), 0 0 20px rgba(0,230,255,0.2);
}
.formula-visualizer .active-glow span.text-white {
  color: var(--color-cyan) !important;
  text-shadow: 0 0 10px rgba(0,230,255,0.8);
}

/* CALCULATOR 3.0 STYLES */
.calc-unified-grid {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .calc-unified-grid {
    display: grid;
    grid-template-columns: 42fr 1px 58fr;
    gap: 4rem;
  }
}

.calc-center-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0,230,255,0.3), transparent);
  height: 100%;
  margin: 0 auto;
}

.calc-input-row {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}
.calc-input-row.border-none {
  border-bottom: none;
  padding-bottom: 0;
}

.scifi-clean-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0,230,255,0.2);
  color: var(--color-cyan);
  font-size: 2rem;
  font-weight: bold;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}
.scifi-clean-input:focus {
  outline: none;
  border-bottom-color: var(--color-cyan);
  background: rgba(0, 230, 255, 0.02);
}
.scifi-clean-input::-webkit-outer-spin-button,
.scifi-clean-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.scifi-clean-input[type=number] {
  -moz-appearance: textfield;
}

.formula-block .rule-active {
  opacity: 1 !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.formula-block .rule-active span.text-white {
  color: var(--color-cyan) !important;
  text-shadow: 0 0 15px rgba(0,230,255,0.8);
}

.calc-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* LEDGER RESPONSIVE LAYOUT */
.ledger-input-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ledger-input-col { order: 2; margin: 0 auto; }
.ledger-label-col { order: 1; text-align: center; }

.ledger-output-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ledger-output-val { order: 2; font-size: 1.5rem; }
.ledger-output-label { order: 1; text-align: left; }

@media (min-width: 768px) {
  .ledger-input-row {
    grid-template-columns: 140px 1fr;
    gap: var(--spacing-md);
  }
  .ledger-input-col { order: 1; margin: 0; }
  .ledger-label-col { order: 2; text-align: left; }
  
  .ledger-output-row {
    justify-content: flex-start;
  }
  .ledger-output-val {
    order: 1;
    width: 140px;
    text-align: right;
    margin-right: var(--spacing-md);
    font-size: 1.25rem;
  }
  .ledger-output-label {
    order: 2;
  }
}

@media (min-width: 768px) {
  .md-text-left { text-align: left !important; }
}

/* CALCULATOR ENHANCEMENTS */
.calc-timeframe-pills {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px;
  gap: 4px;
}
.calc-pill-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-secondary, #94a3b8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.calc-pill-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.calc-pill-btn.active {
  background: rgba(0, 230, 255, 0.15);
  color: var(--color-cyan, #00e6ff);
  border-color: rgba(0, 230, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 230, 255, 0.2);
}

.calc-preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.calc-preset-chip:hover {
  background: rgba(0, 230, 255, 0.1);
  border-color: rgba(0, 230, 255, 0.4);
  color: var(--color-cyan, #00e6ff);
}
.calc-preset-chip.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}

.calc-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 230, 255, 0.3);
  border-radius: 6px;
  color: var(--color-cyan, #00e6ff);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.calc-select:focus {
  border-color: var(--color-cyan, #00e6ff);
  box-shadow: 0 0 12px rgba(0, 230, 255, 0.25);
}
.calc-select option {
  background: #0d131a;
  color: #ffffff;
  padding: 8px;
}

.calc-benchmark-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}

.calc-link-btn {
  background: none;
  border: none;
  color: var(--color-cyan, #00e6ff);
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.2s;
  font-family: inherit;
}
.calc-link-btn:hover {
  opacity: 1;
}


