/**
 * styles.css — Phase 3: Do Epic Good Brand Styling
 * 
 * Brand: Elegant, Minimal, Editorial, Clean
 * "Soft pastels, spacious layouts, simple hierarchies"
 * "Calm, sophisticated, timeless aesthetic with quiet confidence"
 */

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */

:root {
  /* Brand Colors */
  --color-slate-blue: #58698e;
  --color-warm-taupe: #cbb79d;
  --color-sage-green: #67716a;
  --color-sage-dark: #4a5548;
  --color-warm-mauve: #98899b;
  --color-plum: #654058;
  --color-dusty-rose: #c1a39e;
  
  /* Neutral Colors */
  --color-cream: #f5f0ed;
  --color-cream-light: #faf8f6;
  --color-white: #ffffff;
  --color-black: #1a1a1a;
  --color-grey-900: #1f2937;
  --color-grey-800: #2d3748;
  --color-grey-700: #374151;
  --color-grey-600: #4b5563;
  --color-grey-500: #6b7280;
  --color-grey-400: #9ca3af;
  --color-grey-300: #d1d5db;
  --color-grey-200: #e5e7eb;
  --color-grey-100: #f3f4f6;
  
  /* Semantic Colors */
  --color-warning: #dc2626;
  --color-warning-light: #fef2f2;
  --color-warning-border: #fca5a5;
  --color-success: #059669;
  --color-success-light: #f0fdf4;
  --color-highlight: #fef3c7;
  --color-highlight-border: #f59e0b;
  
  /* Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 60px;
  --space-3xl: 80px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-grey-900);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}

p {
  margin: 0;
}

strong {
  font-weight: 600;
}

a {
  color: var(--color-plum);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-slate-blue);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.is-hidden {
  display: none !important;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Bracket decoration for editorial headlines */
.bracket-headline {
  position: relative;
  padding-left: var(--space-lg);
}

.bracket-headline::before {
  content: '[';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-serif);
  font-size: 1.2em;
  color: var(--color-warm-taupe);
  font-weight: 300;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
  padding: var(--space-3xl) 0;
  scroll-margin-top: 50px;
}

.section-heading {
  font-size: 32px;
  margin-bottom: var(--space-md);
  color: var(--color-grey-900);
  scroll-margin-top: 20px;
}

.section-subheading {
  font-size: 18px;
  font-weight: 300;
  color: var(--color-grey-600);
  margin-bottom: var(--space-xl);
}

/* ============================================================
   SITE HEADER (Smart Sticky)
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-sage-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  gap: 20px;
}

.header-logo {
  text-decoration: none;
  color: var(--color-white);
  flex-shrink: 0;
}

.header-logo:hover,
.header-logo:focus-visible {
  color: var(--color-white);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.logo-text strong {
  font-weight: 600;
}

.header-course-link {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-course-link:hover {
  opacity: 0.85;
}

.header-course-link .course-intro {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-course-link .course-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-white);
}

.header-course-link .course-title .amp {
  font-weight: 300;
  font-style: italic;
}

.header-course-link .course-tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-warm-taupe);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-email-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}

.header-email-form:focus-visible {
  outline: 2px solid var(--color-warm-taupe);
  outline-offset: 2px;
  border-radius: 50px;
}

.header-email-input {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  line-height: normal;
  color: var(--color-grey-400);
  background: var(--color-white);
  border: none;
  border-radius: 50px 0 0 50px;
  width: 160px;
  text-align: left;
}

.header-email-btn {
  display: block;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  color: var(--color-white);
  background: var(--color-plum);
  border: none;
  border-radius: 0 50px 50px 0;
  transition: background 0.2s ease;
}

.header-email-form:hover .header-email-btn,
.header-email-form:focus-visible .header-email-btn {
  background: #553448;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.email-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.email-modal.is-open {
  display: flex;
}

.email-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.46);
}

.email-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
  background: var(--color-white);
  color: var(--color-grey-900);
  box-shadow: 0 18px 48px rgba(26, 26, 26, 0.18);
}

.email-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-grey-500);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.email-modal-close:hover,
.email-modal-close:focus-visible {
  color: var(--color-grey-900);
}

.email-modal-panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-sage-dark);
}

.email-modal-lede {
  margin: 0 0 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-grey-600);
}

.email-modal-label {
  display: block;
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-grey-500);
}

.email-modal-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--color-grey-900);
  background: var(--color-cream-light);
  border: 1px solid var(--color-grey-200);
}

.email-modal-input:focus {
  outline: 2px solid var(--color-warm-taupe);
  outline-offset: 1px;
  border-color: var(--color-warm-taupe);
}

.email-modal-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--color-grey-800);
  cursor: pointer;
}

.email-modal-consent input {
  margin: 3px 0 0;
  flex-shrink: 0;
}

.email-modal-notice {
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--color-grey-500);
}

.email-modal-notice a {
  color: var(--color-plum);
}

.email-modal-status {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-success);
}

.email-modal-status[data-kind="error"] {
  color: var(--color-warning);
}

.email-modal-status[data-kind="pending"] {
  color: var(--color-grey-500);
}

.email-modal-submit {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  background: var(--color-plum);
  border: none;
  border-radius: 50px;
  cursor: pointer;
}

.email-modal-submit:hover {
  background: #553448;
}

.email-modal-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-restart {
  padding: 8px 20px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-sage-dark);
  background: var(--color-warm-taupe);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.header-restart:hover {
  background: var(--color-white);
  color: var(--color-sage-dark);
}

/* ============================================================
   HERO SECTION (Split Screen)
   ============================================================ */

.section-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding: 0;
  margin-top: 44px; /* Header height */
}

/* LEFT COLUMN: Content */
.hero-content {
  background: var(--color-sage-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  padding: 40px var(--space-2xl) var(--space-3xl) var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero-content.is-promo-open {
  overflow: visible;
  z-index: 2;
}

.hero-content-inner {
  max-width: 600px;
  width: 100%;
  margin-left: auto;
  padding-right: var(--space-lg);
}

/* ============================================================
   HERO RESULTS PANEL (slides over left column after check)
   ============================================================ */

.hero-results-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  background: var(--color-white);
  color: var(--color-grey-900);
  padding: var(--space-3xl) var(--space-2xl) var(--space-3xl) var(--space-3xl);
  transform: translateX(-100%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  pointer-events: none;
}

.section-hero.is-checked .hero-results-panel {
  transform: translateX(0);
  pointer-events: auto;
}

.hero-results-inner {
  max-width: 600px;
  width: 100%;
  margin-left: auto;
  padding-right: var(--space-lg);
}

/* Eyebrow stays in the same slot; darker for white ground */
.hero-results-panel .hero-eyebrow {
  color: var(--color-sage-dark);
}

.hero-results-panel .hero-title {
  color: var(--color-grey-900);
}

.hero-results-panel .framework-title {
  color: var(--color-grey-900);
}

.hero-results-panel .framework-title em {
  color: var(--color-plum);
}

.hero-results-panel .question-list li {
  color: var(--color-grey-700);
}

.hero-results-panel .question-list li::before {
  color: var(--color-white);
  background: var(--color-sage-dark);
}

/* Marked copy — editorial underlines */
.hero-marked-copy {
  margin: 0 0 var(--space-xl) 0;
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-grey-800);
}

.hero-results-panel .hero-marked-copy.bracket-left {
  border-left-color: var(--color-sage-dark);
}

.hero-results-panel .hero-marked-copy.bracket-left::before,
.hero-results-panel .hero-marked-copy.bracket-left::after {
  background: var(--color-sage-dark);
}

.hero-marked-copy .keyword {
  background: none;
  border-bottom: 2px solid var(--color-plum);
  border-radius: 0;
  padding: 0 1px;
  color: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-marked-copy .keyword.is-highlighted {
  background: rgba(101, 64, 88, 0.08);
}

.hero-marked-copy .keyword[data-tier="banned"] {
  background: none;
  border-bottom-color: var(--color-plum);
}

.hero-marked-copy .keyword[data-tier="banned"].is-highlighted {
  background: rgba(101, 64, 88, 0.08);
}

.hero-marked-copy .keyword[data-tier="future"] {
  background: none;
  border-bottom-color: var(--color-slate-blue);
}

.hero-marked-copy .keyword[data-tier="future"].is-highlighted {
  background: rgba(88, 105, 142, 0.1);
}

/* ============================================================
   SOFT FOCUS — LHS tie to RHS interrogation
   Undo: delete this entire block (search "SOFT FOCUS").
   Also remove updateInterrogationFocus / clearInterrogationFocus
   in render.js and their call sites.

   Tunable amounts (current):
   - Marked copy dim (plain text colour alpha): 0.28
   - Inactive keywords opacity: 0.28
   - Active claim scale: none (1.0) — size left alone so layout stays stable
   - Inactive question rows opacity: 0.22
   - Active question row font-size: 19.2px (20% up from 16px)
   - Transition duration: 0.3s
   ============================================================ */

/* Dim plain copy around the active claim (colour, not opacity —
   so the active keyword can stay fully readable). */
.hero-marked-copy.is-focusing {
  color: rgba(45, 55, 72, 0.28);
  transition: color 0.3s ease;
}

/* Inactive flagged words dim with the paragraph (no size change) */
.hero-marked-copy.is-focusing .keyword {
  opacity: 0.28;
  transition: opacity 0.3s ease;
}

/* Active claim: clear only — size stays the same as the rest of the copy */
.hero-marked-copy.is-focusing .keyword.is-focus-active {
  opacity: 1;
  color: var(--color-grey-800);
}

/* Dim inactive regulator questions; enlarge the active row */
.hero-results-panel .question-list.is-focusing > li {
  opacity: 0.22;
  font-size: 16px;
  transition: opacity 0.3s ease, font-size 0.3s ease;
}

.hero-results-panel .question-list.is-focusing > li.is-focus-active {
  opacity: 1;
  font-size: 19.2px; /* 20% larger than 16px */
}

.hero-results-panel .question-list.is-focusing > li.is-focus-active::before {
  background: var(--color-sage-dark);
  color: var(--color-white);
}

/* ========== end SOFT FOCUS ========== */

/* ============================================================
   CARD FLIP — input → promo around vertical (Y) axis
   Undo: delete this block (search "CARD FLIP"), unwrap
   #hero-card-stage in index.html, remove flipInputToPromo
   in animations.js and its call in checkCopy.
   ============================================================ */

.hero-card-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  perspective: 1400px;
  perspective-origin: 50% 50%;
}

/*
  Resting input stays in-flow so the stage height = the real card height.
  That restores the pre-flip flex centering in .hero-image.
*/
.hero-card-stage .hero-input-card {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  transform: rotateY(0deg);
  transition: transform 0.32s ease-in;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  z-index: 2;
}

/* Promo overlays the stage until it becomes the sizing face after the swap */
.hero-card-stage .hero-rhs-start {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  display: flex;
  align-items: stretch;
  padding: 0;
  transform: rotateY(-90deg);
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.hero-card-stage .course-promo-card {
  width: 100%;
  max-width: none;
  min-height: 420px;
  height: 100%;
}

/* Half 1: input swings to edge-on (still in-flow — stage height held) */
.hero-card-stage.is-flip-out .hero-input-card {
  transform: rotateY(90deg);
}

/*
  From midpoint through resting flipped: keep input parked at 90° + hidden.
  (Fix: without is-flip-in here, input animated back to 0° — the white ghost.)
*/
.hero-card-stage.is-flip-mid .hero-input-card,
.hero-card-stage.is-flip-in .hero-input-card,
.hero-card-stage.is-flipped .hero-input-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  visibility: hidden;
  pointer-events: none;
  transform: rotateY(90deg);
  transition: none;
  z-index: 1;
}

/* Promo takes in-flow sizing so the stage doesn’t collapse after input is absolute */
.hero-card-stage.is-flip-mid .hero-rhs-start,
.hero-card-stage.is-flip-in .hero-rhs-start,
.hero-card-stage.is-flipped .hero-rhs-start {
  position: relative;
  left: auto;
  top: auto;
  height: auto;
  visibility: visible;
  z-index: 2;
}

.hero-card-stage.is-flip-mid .hero-rhs-start {
  transform: rotateY(-90deg);
  transition: none;
  pointer-events: none;
}

/* Half 2: promo swings from edge-on to flat */
.hero-card-stage.is-flip-in .hero-rhs-start {
  transform: rotateY(0deg);
  transition: transform 0.32s ease-out;
  pointer-events: auto;
}

.hero-card-stage.is-flipped .hero-rhs-start {
  transform: rotateY(0deg);
  transition: none;
  pointer-events: auto;
}

/* Promo → Q1: promo swings out to edge-on before question swings in */
.hero-card-stage.is-flipped.is-promo-out .hero-rhs-start {
  transform: rotateY(90deg);
  transition: transform 0.32s ease-in;
  pointer-events: none;
}

/* Hide flipped stage when interrogation card takes over */
.section-hero.is-interrogating .hero-card-stage {
  display: none;
}

/* ========== end CARD FLIP ========== */

.course-promo-card {
  width: 100%;
  max-width: 600px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

/* Collage band — crop with cover; instructor overlaps bottom-right */
.course-promo-media {
  position: relative;
  flex-shrink: 0;
  height: 200px;
  margin: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: visible;
}

.course-promo-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 40%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.course-promo-instructor {
  position: absolute;
  right: 28px;
  bottom: -34px;
  width: 112px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.course-promo-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px var(--space-xl) var(--space-xl);
  text-align: center;
}

.course-promo-eyebrow {
  margin: 0 0 8px 0;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--color-grey-500);
}

.course-promo-title {
  display: block;
  margin: 0 0 14px 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-grey-900);
  text-decoration: none;
  transition: color 0.2s ease;
}

.course-promo-title:hover,
.course-promo-title:focus-visible {
  color: var(--color-plum);
}

.course-promo-title:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 3px;
}

.course-promo-with {
  margin: 0 0 2px 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-grey-800);
}

.course-promo-role {
  margin: 0 0 var(--space-lg) 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--color-grey-500);
}

.course-promo-body .btn-stage-row {
  width: 100%;
  margin-top: auto;
  align-self: stretch;
}

/* LHS rewrite promo — fills the former questions slot; two-column body */
.hero-rewrite-promo {
  margin: 0 0 var(--space-xl) 0;
}

.hero-rewrite-promo.is-hidden {
  display: none;
}

.course-promo-card--lhs {
  max-width: none;
  min-height: 0;
  height: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.course-promo-card--lhs .course-promo-media {
  height: 148px;
}

.course-promo-card--lhs .course-promo-instructor {
  right: 22px;
  bottom: -28px;
  width: 88px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.course-promo-card--lhs .course-promo-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(168px, 0.85fr);
  align-items: start;
  gap: var(--space-md) var(--space-lg);
  padding: 36px var(--space-lg) var(--space-lg);
  text-align: left;
}

.course-promo-card--lhs .course-promo-copy {
  min-width: 0;
  padding-right: var(--space-sm);
}

.course-promo-card--lhs .course-promo-eyebrow {
  margin: 0 0 6px 0;
  font-size: 10px;
  letter-spacing: 1.5px;
}

.course-promo-card--lhs .course-promo-title {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.22;
}

.course-promo-card--lhs .course-promo-aside {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  gap: 2px;
}

.course-promo-card--lhs .course-promo-with {
  margin: 0;
  font-size: 14px;
}

.course-promo-card--lhs .course-promo-role {
  margin: 0 0 var(--space-md) 0;
  font-size: 12px;
  line-height: 1.35;
}

/* Exception: Stuck sits in the right column — banner green */
.course-promo-card--lhs .btn-promo-stuck {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px 20px;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  background: var(--color-sage-dark);
  color: var(--color-white);
  border: none;
  text-decoration: none;
}

.course-promo-card--lhs .btn-promo-stuck:hover {
  background: #3d473c;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 85, 72, 0.25);
}

@media (max-width: 720px) {
  .course-promo-card--lhs .course-promo-body {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 36px;
  }

  .course-promo-card--lhs .btn-promo-stuck {
    white-space: normal;
  }
}

/* Interrogation flip stage — perspective wrapper */
.hero-interrogation-stage {
  display: none;
  width: 100%;
  max-width: 600px;
  perspective: 1400px;
  perspective-origin: 50% 50%;
}

.section-hero.is-interrogating .hero-interrogation-stage {
  display: block;
}

/* Interrogation card — mirrors input card (slightly tighter; title size unchanged) */
.hero-interrogation-card {
  position: relative;
  z-index: 2;
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 600px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transform: rotateY(0deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.section-hero.is-interrogating .hero-interrogation-card:not(.is-hidden) {
  pointer-events: auto;
}

/* Table-row answered/gap tints must not recolour the hero question face */
.hero-interrogation-card .question-block,
.hero-interrogation-card .question-block.is-answered,
.hero-interrogation-card .question-block.is-gap {
  background: none;
  transition: none;
}

/* --- QUESTION CARD FLIP (search to undo) --- */
.hero-interrogation-card.is-flip-out {
  transform: rotateY(90deg);
  transition: transform 0.32s ease-in;
  pointer-events: none;
}

.hero-interrogation-card.is-flip-park {
  transform: rotateY(-90deg);
  transition: none;
  pointer-events: none;
}

.hero-interrogation-card.is-flip-in {
  transform: rotateY(0deg);
  transition: transform 0.32s ease-out;
}

.hero-interrogation-card.is-flip-rest {
  transform: rotateY(0deg);
  transition: none;
}
/* --- end QUESTION CARD FLIP --- */

.interrogation-progress {
  margin: 0 0 var(--space-sm) 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-grey-500);
}

.interrogation-claim {
  display: inline-block;
  margin: 0 0 var(--space-md) 0;
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-grey-900);
  background: rgba(101, 64, 88, 0.08);
  border-bottom: 2px solid var(--color-plum);
  border-radius: 0;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.interrogation-claim[data-tier="banned"] {
  background: rgba(101, 64, 88, 0.08);
  border-bottom-color: var(--color-plum);
}

.interrogation-claim[data-tier="future"] {
  background: rgba(88, 105, 142, 0.1);
  border-bottom-color: var(--color-slate-blue);
}

.interrogation-context {
  margin: 0 0 var(--space-lg) 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--color-grey-600);
}

.interrogation-context strong {
  font-weight: 600;
  color: var(--color-grey-800);
}

.hero-interrogation-card .question-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 var(--space-sm) 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--color-grey-900);
}

.hero-interrogation-card .question-list-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-white);
  background: var(--color-sage-dark);
  border-radius: 50%;
  line-height: 1;
}

.hero-interrogation-card .question-hint {
  margin: 0 0 var(--space-md) 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-grey-500);
}

.hero-interrogation-card .input-wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-md);
}

.hero-interrogation-card .answer-input {
  min-height: 100px;
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-900);
  background: var(--color-cream-light);
  border: 2px solid var(--color-grey-200);
  border-radius: var(--radius-md);
  resize: vertical;
}

.hero-interrogation-card .answer-input:focus {
  outline: none;
  border-color: var(--color-plum);
  box-shadow: 0 0 0 3px rgba(101, 64, 88, 0.12);
}

/* Stage action row — one size for every non-header button.
   Fixed half-width so solo (spacer) and pair stay identical. */
.btn-stage-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

.btn-stage-row .btn-stage,
.btn-stage-row .btn-stage-spacer {
  flex: 0 0 calc(50% - (var(--space-sm) / 2));
  width: calc(50% - (var(--space-sm) / 2));
  max-width: calc(50% - (var(--space-sm) / 2));
  min-width: 0;
  box-sizing: border-box;
}

.btn-stage-row .btn-stage {
  /* Same border box for primary + ghost so Next never resizes */
  border: 1px solid transparent;
  padding: 14px 20px;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
}

.btn-stage-row .btn-ghost.btn-stage {
  border-color: var(--color-grey-300);
}

.btn-stage-row .btn-primary.btn-stage {
  border-color: var(--color-plum);
}

.btn-stage-row .btn-stage-spacer {
  visibility: hidden;
  pointer-events: none;
}

/* Solo stage button, centered — same half-width as a pair button */
.btn-stage-row--center {
  justify-content: center;
}

/* End-of-queue promo face — flush so nested course-promo-card matches first promo */
.hero-interrogation-card.is-promo-face {
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  min-height: 420px;
}

.hero-interrogation-card.is-promo-face .course-promo-card {
  max-width: none;
  height: 100%;
  min-height: 420px;
}

.hero-interrogation-card .interrogation-done {
  margin: auto 0;
  text-align: center;
  width: 100%;
}

.hero-interrogation-card .interrogation-done p {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-grey-800);
  margin: 0 0 var(--space-lg) 0;
}

.hero-interrogation-card .interrogation-done .btn-stage-row {
  margin-top: 0;
}

/* Rewrite step — stacked-card content on the flip face.
   align-items: flex-start so .interrogation-claim stays word-sized. */
.hero-interrogation-card .rewrite-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.hero-interrogation-card .rewrite-block .input-heading,
.hero-interrogation-card .rewrite-block .interrogation-context,
.hero-interrogation-card .rewrite-block .card-context,
.hero-interrogation-card .rewrite-block .input-wrapper,
.hero-interrogation-card .rewrite-block .rewrite-card-actions {
  align-self: stretch;
  width: 100%;
}

.hero-interrogation-card .rewrite-block .interrogation-context {
  margin: 0 0 var(--space-md) 0;
}

.hero-interrogation-card .rewrite-block .card-context {
  margin: 0 0 var(--space-md) 0;
}

.hero-interrogation-card .rewrite-input {
  min-height: 100px;
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-900);
  background: var(--color-cream-light);
  border: 2px solid var(--color-grey-200);
  border-radius: var(--radius-md);
  resize: vertical;
  box-sizing: border-box;
}

.hero-interrogation-card .rewrite-input:focus {
  outline: none;
  border-color: var(--color-plum);
  box-shadow: 0 0 0 3px rgba(101, 64, 88, 0.12);
}

/* Rewrite actions: pin to bottom; hatch uses display:contents so Skip
   shares the btn-stage-row with Next. Spacer holds size when hatch hidden. */
.hero-interrogation-card .rewrite-card-actions {
  margin-top: auto;
}

.hero-interrogation-card .rewrite-card-actions .escape-hatch {
  display: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  opacity: 1;
}

.hero-interrogation-card .rewrite-card-actions .escape-hatch.is-hidden {
  display: none;
}

.hero-interrogation-card .rewrite-card-actions .escape-hatch.is-visible {
  display: contents;
}

.hero-interrogation-card .rewrite-card-actions .escape-hatch.is-hidden ~ .btn-stage-spacer {
  display: block;
}

.hero-interrogation-card .rewrite-card-actions .escape-hatch.is-visible ~ .btn-stage-spacer {
  display: none;
}

.hero-eyebrow {
  margin: 0 0 var(--space-lg) 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-warm-taupe);
}

.hero-title {
  margin: 0 0 var(--space-xl) 0;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
}

.hero-subtitle {
  margin: 0 0 var(--space-xl) 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* Bracket decoration - square bracket [ shape 
   Uses CSS borders and gradients for the full bracket */
.bracket-left {
  position: relative;
  padding-left: var(--space-lg);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
  margin-left: 4px;
  border-left: 3px solid var(--color-warm-taupe);
}

/* Top horizontal bar */
.bracket-left::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  width: 20px;
  height: 3px;
  background: var(--color-warm-taupe);
}

/* Bottom horizontal bar */
.bracket-left::after {
  content: '';
  position: absolute;
  left: -3px;
  bottom: 0;
  width: 20px;
  height: 3px;
  background: var(--color-warm-taupe);
}

.hero-problem {
  margin: 0 0 var(--space-xl) 0;
}

.hero-problem::before {
  top: -1px;
}

.problem-statement {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.problem-statement strong {
  font-weight: 600;
  color: var(--color-white);
}

/* Landing: same slot as the rewrite LHS promo */
.hero-framework-slot {
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* Expand-up: wrap keeps resting height; card stays bottom-anchored */
.course-promo-expand-wrap {
  --promo-expand-duration: 0.55s;
  position: relative;
  width: 100%;
  min-height: 300px; /* fallback until JS measures collapsed card */
}

.course-promo-expand-wrap .course-promo-card--lhs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--promo-expand-duration) ease;
}

.course-promo-expand-wrap.is-open .course-promo-card--lhs {
  z-index: 30;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.course-promo-expand-wrap .course-promo-card--lhs:focus-visible {
  outline: 2px solid var(--color-warm-taupe);
  outline-offset: 3px;
}

.course-promo-card--lhs .course-promo-detail {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: 0fr;
  opacity: 0;
  margin: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition:
    grid-template-rows var(--promo-expand-duration) ease,
    opacity var(--promo-expand-duration) ease,
    padding-top var(--promo-expand-duration) ease,
    margin-top var(--promo-expand-duration) ease,
    border-top-color var(--promo-expand-duration) ease;
}

.course-promo-expand-wrap.is-open .course-promo-card--lhs .course-promo-detail {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 4px;
  padding-top: 14px;
  border-top-color: var(--color-grey-200);
}

.course-promo-detail-clip {
  overflow: hidden;
  min-height: 0;
}

.course-promo-detail p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--color-grey-700);
}

.course-promo-detail p + p {
  margin-top: 0.85em;
}

@media (prefers-reduced-motion: reduce) {
  .course-promo-expand-wrap {
    --promo-expand-duration: 0.01s;
  }
}

#hero-landing-promo .course-promo-eyebrow,
#hero-landing-promo .course-promo-title {
  color: var(--color-plum);
}

#hero-landing-promo .course-promo-title:hover,
#hero-landing-promo .course-promo-title:focus-visible {
  color: #553448;
}

/* Tighten landing LHS stack only (~50px total). Overlay/rewrite unchanged. */
#hero-landing-inner .hero-eyebrow {
  margin-bottom: 16px;
}

#hero-landing-inner .hero-title {
  margin-bottom: 28px;
}

#hero-landing-inner .hero-subtitle {
  margin-bottom: 28px;
}

#hero-landing-inner .hero-problem {
  margin-bottom: 24px;
}

/* 6 Questions Framework (results overlay) */
.hero-framework {
  margin: 0 0 var(--space-xl) 0;
}

.framework-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 var(--space-md) 0;
  color: var(--color-white);
}

.framework-title em {
  font-weight: 300;
  font-style: italic;
  color: var(--color-warm-taupe);
}

.question-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: questions;
}

.question-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 36px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  counter-increment: questions;
}

.question-list li::before {
  content: counter(questions);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-sage-dark);
  background: var(--color-warm-taupe);
  border-radius: 50%;
}


/* RIGHT COLUMN: Image + Input Card */
.hero-image {
  /* Image with space in folder name - URL encoded */
  background-image: url('../sample%20assets/1.jpg');
  background-color: var(--color-cream); /* Fallback */
  background-size: contain;
  background-position: center center;
  background-repeat: repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: visible;
}

.hero-image.is-input-open {
  z-index: 2;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(247, 245, 241, 0.82);
  pointer-events: none;
}

.hero-input-card {
  --input-expand-duration: 0.55s;
  position: relative;
  z-index: 1;
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 600px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  cursor: pointer;
  transition: box-shadow var(--input-expand-duration) ease;
}

.hero-input-card.is-open {
  z-index: 30;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.hero-input-card:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 3px;
}

.hero-input-card .input-card-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition:
    grid-template-rows var(--input-expand-duration) ease,
    opacity var(--input-expand-duration) ease,
    padding-top var(--input-expand-duration) ease,
    margin-top var(--input-expand-duration) ease,
    border-top-color var(--input-expand-duration) ease;
}

.hero-input-card.is-open .input-card-detail {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0.85em;
  padding-top: 0.85em;
  border-top-color: var(--color-grey-200);
}

.input-card-detail-clip {
  overflow: hidden;
  min-height: 0;
}

.input-card-detail p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-700);
}

.input-card-detail p + p {
  margin-top: 0.85em;
}

@media (prefers-reduced-motion: reduce) {
  .hero-input-card {
    --input-expand-duration: 0.01s;
  }
}

.input-heading {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 var(--space-md) 0;
  color: var(--color-grey-900);
}

/* ============================================================
   BUTTONS — Pill-shaped (DEG brand style)
   ============================================================ */

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-normal);
  letter-spacing: 0.3px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-plum);
  color: var(--color-white);
}

.btn-primary:hover:not(:disabled) {
  background: #553448;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(101, 64, 88, 0.25);
}

.btn-secondary {
  background: var(--color-slate-blue);
  color: var(--color-white);
}

.btn-secondary:hover:not(:disabled) {
  background: #4a5a7a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88, 105, 142, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--color-grey-700);
  border: 1px solid var(--color-grey-300);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-grey-100);
  border-color: var(--color-grey-400);
}

.btn-small {
  padding: 10px 20px;
  font-size: 14px;
}

/* ============================================================
   INPUT CARD (Inside Hero)
   ============================================================ */

.input-wrapper {
  margin-bottom: var(--space-lg);
}

.input-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-grey-600);
  line-height: 1.4;
}

.copy-textarea {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-900);
  background: var(--color-cream-light);
  border: 2px solid var(--color-grey-200);
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 140px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-input-card .copy-textarea {
  min-height: 180px;
  flex: 1;
}

.hero-input-card .input-wrapper {
  display: flex;
  flex-direction: column;
}

.copy-textarea:focus {
  outline: none;
  border-color: var(--color-sage-dark);
  box-shadow: 0 0 0 3px rgba(74, 85, 72, 0.12);
}

.input-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.input-actions .btn {
  width: 100%;
  text-align: center;
}

.input-actions .btn-ghost {
  background: transparent;
  color: var(--color-grey-600);
  border: 1px solid var(--color-grey-300);
}

.input-actions .btn-ghost:hover {
  background: var(--color-cream-light);
  color: var(--color-grey-800);
}

/* Stage row on input card — beat stacked .input-actions defaults */
.input-actions.btn-stage-row {
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
}

.input-actions.btn-stage-row .btn-stage {
  flex: 0 0 calc(50% - (var(--space-sm) / 2));
  width: calc(50% - (var(--space-sm) / 2));
  max-width: calc(50% - (var(--space-sm) / 2));
}

.privacy-note {
  font-size: 12px;
  color: var(--color-grey-500);
  font-style: italic;
  text-align: center;
}

/* ============================================================
   FLAGS SECTION
   ============================================================ */

.section-flags {
  background: var(--color-cream-light);
}

/* Paragraph layer */
.paragraph-layer {
  margin-bottom: var(--space-xl);
}

.paragraph-display {
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-lg);
  line-height: 1.9;
  font-size: 17px;
}

/* Keywords in paragraph */
.keyword {
  background: var(--color-highlight);
  border-bottom: 2px solid var(--color-highlight-border);
  padding: 2px 6px;
  border-radius: 3px;
  cursor: default;
  transition: background var(--transition-fast);
}

.keyword.is-highlighted {
  background: #fde68a;
}

.keyword[data-tier="banned"] {
  background: #fee2e2;
  border-color: #ef4444;
}

.keyword[data-tier="future"] {
  background: #e0e7ff;
  border-color: #6366f1;
}

/* Table layer */
.table-layer {
  margin-bottom: var(--space-xl);
}

.keyword-ghosts {
  position: absolute;
  pointer-events: none;
}

.analysis-table {
  background: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-header {
  display: flex;
  background: var(--color-cream);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid var(--color-grey-200);
}

.table-header .col {
  padding: 14px var(--space-md);
  border-right: 1px solid var(--color-grey-200);
}

.table-header .col:last-child {
  border-right: none;
}

.table-body {
  background: var(--color-white);
}

.table-row {
  display: flex;
  border-bottom: 1px solid var(--color-grey-100);
}

.table-row:last-child {
  border-bottom: none;
}

.col {
  padding: var(--space-md);
  border-right: 1px solid var(--color-grey-100);
}

.col:last-child {
  border-right: none;
}

.col-keyword {
  flex: 0 0 140px;
}

.col-rule {
  flex: 0 0 240px;
}

.col-questions {
  flex: 1;
}

.keyword-target {
  display: inline-block;
  padding: 6px 10px;
  background: var(--color-highlight);
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
}

.table-row[data-tier="banned"] .keyword-target {
  background: #fee2e2;
}

.table-row[data-tier="future"] .keyword-target {
  background: #e0e7ff;
}

.rule-label {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: var(--space-xs);
  color: var(--color-grey-900);
}

.rule-text {
  margin: 0 0 var(--space-sm) 0;
  font-size: 14px;
  color: var(--color-grey-700);
}

.rule-why {
  margin: 0;
  font-size: 13px;
  color: var(--color-grey-500);
  font-style: italic;
}

/* Questions in table */
.question-block {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-grey-100);
  transition: background var(--transition-fast);
}

.question-block:last-child {
  border-bottom: none;
}

.question-block.is-answered {
  background: var(--color-cream-light);
}

.question-block.is-gap {
  background: #faf5f4;
}

.question-number {
  font-size: 12px;
  color: var(--color-grey-500);
  margin: 0 0 var(--space-xs) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-text {
  margin: 0 0 var(--space-xs) 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-grey-900);
}

.question-hint {
  margin: 0 0 var(--space-md) 0;
  font-size: 13px;
  color: var(--color-grey-500);
  font-style: italic;
}

.answer-input {
  width: 100%;
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-900);
  background: var(--color-white);
  border: 1px solid var(--color-grey-300);
  border-radius: var(--radius-sm);
  resize: vertical;
  margin-bottom: var(--space-sm);
  transition: border-color var(--transition-fast);
}

.answer-input:focus {
  outline: none;
  border-color: var(--color-slate-blue);
}

.answer-input:disabled {
  background: var(--color-grey-100);
  color: var(--color-grey-600);
}

.answer-actions {
  display: flex;
  gap: var(--space-sm);
}

.answer-status {
  margin-top: var(--space-sm);
  font-size: 13px;
  font-weight: 500;
}

.answer-status .status-saved {
  color: var(--color-sage-green);
}

.answer-status .status-gap {
  color: var(--color-dusty-rose);
  display: none;
}

.question-block.is-gap .answer-status .status-saved {
  display: none;
}

.question-block.is-gap .answer-status .status-gap {
  display: inline;
}

.flags-actions {
  margin-top: var(--space-xl);
  text-align: center;
}

.progress-note {
  margin-top: var(--space-md);
  font-size: 14px;
  color: var(--color-grey-500);
}

/* ============================================================
   REWRITE SECTION
   ============================================================ */

.section-rewrite {
  background: var(--color-white);
}

.rewrite-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.rewrite-card {
  background: var(--color-white);
  border: 2px solid var(--color-grey-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-normal), opacity var(--transition-normal), box-shadow var(--transition-normal);
}

.rewrite-card.is-locked {
  opacity: 0.5;
  border-color: var(--color-grey-100);
}

.rewrite-card.is-active {
  border-color: var(--color-slate-blue);
  box-shadow: 0 4px 20px rgba(88, 105, 142, 0.15);
}

.rewrite-card.is-complete {
  border-color: var(--color-sage-green);
}

.card-header {
  display: flex;
  justify-content: space-between;
  padding: 14px var(--space-md);
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-grey-200);
  font-size: 14px;
}

.card-number {
  color: var(--color-grey-500);
  font-weight: 400;
}

.card-status .status-locked,
.card-status .status-active,
.card-status .status-complete {
  display: none;
}

.rewrite-card.is-locked .status-locked {
  display: inline;
  color: var(--color-grey-400);
}

.rewrite-card.is-active .status-active {
  display: inline;
  color: var(--color-slate-blue);
  font-weight: 500;
}

.rewrite-card.is-complete .status-complete {
  display: inline;
  color: var(--color-sage-green);
}

.card-body {
  padding: var(--space-lg);
}

.card-phrase {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-grey-900);
}

.card-context {
  margin: 0 0 var(--space-lg) 0;
  font-size: 15px;
  color: var(--color-grey-600);
  line-height: 1.7;
}

.card-context mark {
  background: var(--color-highlight);
  padding: 2px 4px;
  border-radius: 2px;
}

.rewrite-label {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--color-grey-900);
}

.rewrite-input {
  width: 100%;
  padding: 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-900);
  background: var(--color-cream-light);
  border: 1px solid var(--color-grey-300);
  border-radius: var(--radius-md);
  resize: vertical;
  margin-bottom: var(--space-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.rewrite-input:focus {
  outline: none;
  border-color: var(--color-slate-blue);
  box-shadow: 0 0 0 3px rgba(88, 105, 142, 0.1);
}

.rewrite-input:disabled {
  background: var(--color-grey-100);
}

.rewrite-actions {
  margin-top: var(--space-xl);
  text-align: center;
}

/* Comparison display for completed cards */
.comparison-display {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.comparison-item {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-cream-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-grey-300);
}

.comparison-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-grey-500);
  margin: 0 0 var(--space-sm) 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.comparison-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* Original phrase: Dusty rose / muted warm tone */
.comparison-original {
  color: var(--color-plum);
  font-style: italic;
}

.comparison-item:has(.comparison-original) {
  border-left-color: var(--color-dusty-rose);
  background: #faf5f4;
}

.comparison-item:has(.comparison-original) .comparison-label {
  color: var(--color-plum);
}

/* Your rewrite: Slate blue / cool neutral */
.comparison-yours {
  color: var(--color-grey-800);
}

.comparison-yours.is-skipped {
  color: var(--color-grey-400);
  font-style: italic;
}

.comparison-item:has(.comparison-yours) {
  border-left-color: var(--color-slate-blue);
  background: #f4f6f9;
}

.comparison-item:has(.comparison-yours) .comparison-label {
  color: var(--color-slate-blue);
}

/* Model rewrite: Sage green / muted success */
.comparison-model {
  color: var(--color-sage-dark);
}

.comparison-item:has(.comparison-model) {
  border-left-color: var(--color-sage-green);
  background: #f4f7f5;
}

.comparison-item:has(.comparison-model) .comparison-label {
  color: var(--color-sage-green);
}

.comparison-why {
  margin: var(--space-sm) 0 0 0;
  font-size: 13px;
  color: var(--color-sage-green);
  font-style: italic;
}

/* Escape hatch - warm taupe / soft nudge */
.escape-hatch {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: #f9f6f3;
  border: 1px solid var(--color-warm-taupe);
  border-radius: var(--radius-md);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.escape-hatch.is-visible {
  opacity: 1;
}

.escape-hatch.is-hidden {
  display: none;
}

.escape-hatch-text {
  margin: 0 0 var(--space-md) 0;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--color-grey-700);
  font-weight: 500;
  font-style: italic;
}

.escape-hatch-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.escape-hatch-actions .btn {
  font-size: 14px;
  padding: 10px 18px;
}

/* ============================================================
   RESULTS SECTION
   ============================================================ */

.section-results {
  background: var(--color-cream);
}

.results-summary {
  margin-bottom: var(--space-xl);
  font-size: 18px;
  color: var(--color-grey-600);
}

.results-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.score-card {
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-grey-200);
}

.score-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-grey-500);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.score-risk .score-value {
  color: var(--color-plum);
}

.score-effort .score-value {
  color: var(--color-slate-blue);
  font-size: 32px;
}

.score-bar {
  height: 6px;
  background: var(--color-grey-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.score-bar-fill {
  height: 100%;
  background: var(--color-grey-400);
  transition: width var(--transition-slow);
  border-radius: 3px;
}

.score-risk .score-bar-fill {
  background: var(--color-plum);
}

.score-effort .score-bar-fill {
  background: var(--color-slate-blue);
}

.score-explanation {
  font-size: 14px;
  color: var(--color-grey-500);
  margin: 0;
  line-height: 1.5;
}

/* Quadrant */
.results-quadrant {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.quadrant-title {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 var(--space-lg) 0;
  color: var(--color-grey-900);
}

.quadrant-chart {
  max-width: 280px;
  margin: 0 auto var(--space-md) auto;
}

.quadrant-chart svg {
  width: 100%;
  height: auto;
}

.quadrant-border {
  stroke: var(--color-grey-300);
}

.quadrant-divider {
  stroke: var(--color-grey-300);
}

.quadrant-label {
  font-family: var(--font-sans);
  font-size: 7px;
  fill: var(--color-grey-500);
  letter-spacing: 1px;
  font-weight: 500;
}

.quadrant-axis {
  font-family: var(--font-sans);
  font-size: 8px;
  fill: var(--color-grey-400);
  letter-spacing: 1px;
  font-weight: 400;
}

.quadrant-dot {
  fill: var(--color-plum);
  transition: cx var(--transition-slow), cy var(--transition-slow);
}

.quadrant-dot.quadrant-earned,
.quadrant-dot.quadrant-undersold {
  fill: var(--color-sage-green);
}

.quadrant-caption {
  font-size: 14px;
  color: var(--color-grey-500);
  max-width: 380px;
  margin: 0 auto;
  font-style: italic;
}

/* Gap register */
.results-gaps {
  margin-bottom: var(--space-2xl);
}

.gaps-title {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-grey-900);
}

.gaps-intro {
  margin: 0 0 var(--space-lg) 0;
  font-size: 14px;
  color: var(--color-grey-500);
}

.gap-register {
  background: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gap-row {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-grey-100);
}

.gap-row:last-child {
  border-bottom: none;
}

/* Gap items: dusty rose / soft warning */
.gap-row.is-gap {
  background: #faf5f4;
  border-left: 4px solid var(--color-dusty-rose);
}

/* Answered items: neutral styling */
.gap-row.is-answered {
  background: var(--color-cream-light);
  border-left: 4px solid var(--color-grey-300);
}

/* Label badge styling */
.gap-label {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.gap-row.is-gap .gap-label {
  background: #f5e6e4;
  color: var(--color-plum);
}

.gap-row.is-answered .gap-label {
  background: var(--color-grey-200);
  color: var(--color-grey-600);
}

.gap-content {
  flex: 1;
}

.gap-content strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  margin-bottom: var(--space-xs);
  color: var(--color-grey-900);
}

.gap-keyword {
  font-size: 13px;
  color: var(--color-grey-500);
  margin: 0 0 var(--space-sm) 0;
}

/* Gap: "Needed:" text */
.gap-needed {
  margin: 0;
  font-size: 14px;
  color: var(--color-plum);
  font-style: italic;
}

/* Answered: user's answer text */
.gap-answer {
  margin: 0;
  font-size: 14px;
  color: var(--color-grey-700);
}

/* Results CTA */
.results-cta {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--color-grey-200);
}

.results-cta .cta-text {
  margin: 0 0 var(--space-md) 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: var(--color-grey-700);
}

.results-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* ============================================================
   EMAIL SECTION
   ============================================================ */

.section-email {
  background: var(--color-slate-blue);
  color: var(--color-white);
}

.section-email .section-heading {
  color: var(--color-white);
  text-align: center;
}

.section-email .section-subheading {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.email-form {
  max-width: 380px;
  margin: 0 auto var(--space-2xl) auto;
}

.form-field {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: rgba(255, 255, 255, 0.9);
}

.form-input {
  width: 100%;
  padding: 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--color-grey-900);
  background: var(--color-white);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-warm-taupe);
  box-shadow: 0 0 0 3px rgba(203, 183, 157, 0.3);
}

.form-checkbox {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.form-checkbox input {
  margin-top: 4px;
  accent-color: var(--color-plum);
}

.checkbox-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.email-form .btn {
  width: 100%;
  background: var(--color-plum);
}

.email-form .btn:hover {
  background: #553448;
}

.email-success {
  text-align: center;
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2xl);
}

.success-message {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--color-white);
  margin: 0 0 var(--space-lg) 0;
}

.email-course-cta {
  text-align: center;
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

.email-course-cta .cta-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-white);
}

.email-course-cta .cta-text {
  margin: 0 0 var(--space-lg) 0;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: var(--space-2xl) 0;
  background: var(--color-sage-dark);
  color: var(--color-grey-400);
  text-align: center;
}

.disclaimer {
  font-size: 13px;
  max-width: 560px;
  margin: 0 auto var(--space-lg) auto;
  line-height: 1.6;
}

.brand-footer {
  font-family: var(--font-serif);
  font-size: 20px;
}

.brand-name {
  color: var(--color-white);
}

/* ============================================================
   PDF CONTENT (hidden)
   ============================================================ */

.pdf-content {
  position: absolute;
  left: -9999px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .hero-content-inner,
  .hero-results-inner {
    max-width: 100%;
    padding-right: var(--space-lg);
  }
  
  .hero-input-card {
    max-width: 380px;
  }

  .hero-card-stage {
    max-width: 380px;
  }

  .hero-interrogation-card {
    max-width: 380px;
  }

  .hero-interrogation-stage {
    max-width: 380px;
  }

  .course-promo-card {
    max-width: 380px;
  }
}

@media (max-width: 1100px) {
  .header-course-link {
    display: none;
  }
}

@media (max-width: 900px) {
  /* Stack hero on tablet/mobile */
  .section-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .hero-content {
    padding: var(--space-2xl) var(--space-lg);
  }

  .hero-results-panel {
    padding: var(--space-2xl) var(--space-lg);
  }
  
  .hero-content-inner,
  .hero-results-inner {
    max-width: 600px;
    margin: 0 auto;
    padding-right: 0;
  }
  
  .hero-image {
    padding: var(--space-md);
    min-height: 400px;
    align-items: center;
  }
  
  .hero-input-card {
    max-width: 100%;
    min-height: 0;
  }

  .hero-card-stage {
    max-width: 100%;
    min-height: 0;
  }

  .hero-card-stage .hero-input-card,
  .hero-card-stage .hero-rhs-start {
    min-height: 0;
  }

  .hero-interrogation-card {
    max-width: 100%;
    min-height: 0;
  }

  .hero-interrogation-stage {
    max-width: 100%;
  }

  .course-promo-card {
    max-width: 100%;
    min-height: 380px;
  }
  
  /* Header adjustments */
  .header-email-form {
    display: none;
  }
  
  .header-inner {
    padding: 10px 16px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-3xl: 60px;
    --space-2xl: 40px;
  }

  .section-hero {
    margin-top: 40px;
  }

  .hero-title {
    font-size: 30px;
  }
  
  .hero-content {
    padding: var(--space-xl) var(--space-lg);
  }
  
  .hero-image {
    padding: var(--space-md);
  }
  
  .hero-input-card {
    padding: var(--space-lg);
  }
  
  .input-heading {
    font-size: 22px;
  }

  .section-heading {
    font-size: 26px;
  }

  .results-scores {
    grid-template-columns: 1fr;
  }

  .table-header,
  .table-row {
    flex-direction: column;
  }

  .col {
    border-right: none;
    border-bottom: 1px solid var(--color-grey-100);
  }

  .col:last-child {
    border-bottom: none;
  }

  .col-keyword,
  .col-rule,
  .col-questions {
    flex: none;
    width: 100%;
  }

  .results-actions {
    flex-direction: column;
  }

  .gap-row {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .gap-label {
    align-self: flex-start;
  }
  
  /* Question list mobile */
  .question-list li {
    padding-left: 32px;
    font-size: 13px;
  }
  
  .question-list li::before {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .header-restart {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .problem-statement {
    font-size: 15px;
  }
  
  .framework-title {
    font-size: 18px;
  }
  
  .course-title {
    font-size: 19px;
  }
}
