/* ============================================
   THE BITCOIN JOURNEY — Design System
   Version: 0.1
   
   ALL visual design lives here.
   Change this file to reskin the app.
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Core palette */
  --color-bg: #0a0a0b;
  --color-bg-raised: #141416;
  --color-bg-card: #1a1a1f;
  --color-bg-card-hover: #22222a;
  --color-bg-input: #1a1a1f;
  --color-border: #2a2a33;
  --color-border-subtle: #1e1e26;
  
  /* Text */
  --color-text: #e8e6e3;
  --color-text-secondary: #b8b4c0;
  --color-text-muted: #5a5866;
  
  /* Accent — Purpose orange */
  --color-accent: #f7931a;
  --color-accent-hover: #ffb454;
  --color-accent-glow: rgba(247, 147, 26, 0.15);
  --color-accent-subtle: rgba(247, 147, 26, 0.08);
  
  /* Status */
  --color-success: #34d399;
  --color-success-bg: rgba(52, 211, 153, 0.1);
  --color-warning: #fbbf24;
  --color-incomplete: #3a3a44;
  --color-error: #f87171;
  --color-error-bg: rgba(248, 113, 113, 0.1);
  
  /* Typography */
  --font-display: 'Satoshi', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px var(--color-border-subtle);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--color-border);
  --shadow-glow: 0 0 30px var(--color-accent-glow);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --content-max-width: 720px;
  --dashboard-max-width: 880px;
}

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@700,900&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* --- Landing Screen --- */
.screen-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  position: relative;
  z-index: 1;
}

.landing-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

.landing-logo {
  margin-bottom: var(--space-md);
  animation: float-in 0.8s var(--transition-slow) both;
}

.landing-logo-emoji {
  font-size: 36px;
  display: block;
  text-align: center;
  line-height: 1;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: var(--space-sm);
  animation: float-in 0.8s var(--transition-slow) 0.1s both;
}

.landing-title .accent {
  color: var(--color-accent);
}

.landing-subtitle {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-md);
  animation: float-in 0.8s var(--transition-slow) 0.2s both;
}

.landing-tagline {
  font-size: 0.88rem;
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: #f7931a;
  animation: float-in 0.8s var(--transition-slow) 0.3s both;
}

.landing-tagline .tagline-bolt {
  color: #f7931a;
}

.landing-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  max-width: 360px;
  animation: float-in 0.8s var(--transition-slow) 0.3s both;
}

.landing-form label {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.input-name {
  width: 100%;
  padding: 0.85rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-align: center;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-name:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.input-name::placeholder {
  color: var(--color-text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Dashboard Screen --- */
.screen-dashboard {
  max-width: var(--dashboard-max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  z-index: 1;
}

.dashboard-header {
  margin-bottom: var(--space-2xl);
}

.dashboard-greeting {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.dashboard-progress-bar {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--color-bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* Week Cards */
.weeks-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.week-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-base), transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.week-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.week-card.is-current {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-glow);
}

.week-card.is-complete {
  border-color: var(--color-success);
}

.week-card.is-empty {
  opacity: 0.5;
  cursor: default;
}

.week-card.is-empty .week-title {
  color: var(--color-text-muted);
}

.week-card.is-empty .week-number {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.week-card.is-empty:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

.week-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.week-card.is-complete .week-number {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.week-info {
  flex: 1;
  min-width: 0;
}

.week-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.week-description {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.week-status {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
}

.week-status.status-not-started {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.week-status.status-in-progress {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.week-status.status-complete {
  background: var(--color-success-bg);
  color: var(--color-success);
}

/* Recommended badge on dashboard */
.week-recommended-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #0a0a0b;
  margin-left: var(--space-sm);
  vertical-align: middle;
}

/* Mini progress counter in week status */
.week-mini-progress {
  font-variant-numeric: tabular-nums;
  margin-right: var(--space-xs);
}

/* Week progress bar inside week view */
.week-progress-mini {
  margin-top: var(--space-lg);
}

.week-progress-mini .progress-track {
  height: 4px;
}

.week-progress-mini .progress-label {
  font-size: 0.8rem;
}

/* --- Week View Screen --- */
.screen-week {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  z-index: 1;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm) 0;
  transition: color var(--transition-fast);
}

.btn-back:hover {
  color: var(--color-accent);
}

.week-header {
  margin-bottom: var(--space-2xl);
}

.week-header-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.week-header-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Unit blocks */
.unit-block {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-border-subtle);
  animation: fade-up 0.5s var(--transition-slow) both;
}

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

.unit-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.unit-label .badge {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.unit-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.unit-intro {
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: var(--space-lg);
  white-space: pre-line;
}

.unit-intro a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-subtle);
  transition: border-color var(--transition-fast);
}

.unit-intro a:hover {
  border-color: var(--color-accent);
}

/* Video embed */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-raised);
  box-shadow: var(--shadow-card);
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* PDF link — prominent for PDF-primary weeks */
.pdf-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-lg);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 0 0 0 var(--color-accent-glow);
}

.pdf-link:hover {
  background: var(--color-bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Mark-as-Done button.
   Primary completion action — it's what triggers unit-complete + PowerUps
   when there's no quiz. So it gets a solid filled accent CTA, NOT an
   outline that visually matches the small `.transcript-tag` meta link.
   Different jobs = different visual weights. Sky-blue fill on dark text
   (sky-blue + white had insufficient contrast).
   AI doesn't currently render `.transcript-tag` next to it (see ai/app.js)
   but the styling is kept in lockstep across journeys so the moment
   transcripts are wired in here, it just works. */
.btn-mark-done {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #0a0a0b;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mark-done .btn-mark-done-icon {
  font-size: 1.05em;
  line-height: 1;
}

.btn-mark-done:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247, 147, 26, 0.25);
}

/* Completed: soft success-bg tint with success-green text + check.
   Same footprint as the default state — no layout shift on click. */
.btn-mark-done.is-done {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success);
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Transcript download tag — small meta link, not a primary CTA. Sky-blue
   outline mirrors Money's green-outline pattern. Sits in two contexts:
   (1) standalone `.transcript-link-wrap` below the video for quiz units;
   (2) inside `.unit-actions` paired with the Mark-as-Done button for
       no-quiz units. */
.transcript-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.18s ease;
}
.transcript-tag:hover {
  background: var(--color-accent-subtle);
  border-color: var(--color-accent-hover);
}

/* Actions row for units without a quiz: pairs the transcript link and the
   Mark-as-Done button on a single line, justified to opposite ends so the
   small meta link and the primary CTA read as distinct roles rather than
   visual peers. Separator line + extra padding above sets the row apart
   as a clear "end of unit" footer. Wraps to a stack on narrow viewports. */
.unit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-subtle);
}

/* ==========================================
   Quiz UX
   ========================================== */

.quiz-block {
  margin-top: var(--space-lg);
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base);
}

.quiz-block.is-correct {
  border-color: var(--color-success);
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.85rem var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: left;
  width: 100%;
}

.quiz-option:hover:not(.is-disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.quiz-option .option-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--color-bg-raised);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.quiz-option:hover:not(.is-disabled) .option-letter {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.quiz-option .option-text {
  flex: 1;
}

.quiz-option.is-wrong {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}

.quiz-option.is-wrong .option-letter {
  background: var(--color-error);
  color: #0a0a0b;
  border-color: var(--color-error);
}

.quiz-option.is-correct {
  border-color: var(--color-success);
  background: var(--color-success-bg);
}

.quiz-option.is-correct .option-letter {
  background: var(--color-success);
  color: #0a0a0b;
  border-color: var(--color-success);
}

.quiz-option.is-disabled {
  cursor: default;
  opacity: 0.5;
}

.quiz-option.is-correct.is-disabled,
.quiz-option.is-wrong.is-disabled {
  opacity: 1;
}

.quiz-explanation {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-success-bg);
  border-left: 3px solid var(--color-success);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  animation: fade-in 0.3s ease both;
}

.quiz-explanation.is-wrong {
  background: var(--color-error-bg);
  border-left-color: var(--color-error);
}

.quiz-explanation strong {
  color: var(--color-success);
  font-weight: 600;
}

.quiz-explanation.is-wrong strong {
  color: var(--color-error);
}

.quiz-completed {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-success-bg);
  border-radius: var(--radius-md);
  color: var(--color-success);
  font-weight: 600;
  font-size: 0.95rem;
  animation: scale-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.quiz-try-again {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  animation: fade-in 0.3s ease 0.3s both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.quiz-block.is-shake {
  animation: shake 0.4s ease;
}

/* Text content (bonus resources) */
.text-content {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: var(--space-lg);
}

.text-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.text-content h3:first-child {
  margin-top: 0;
}

.text-content ul {
  list-style: none;
  padding: 0;
}

.text-content li {
  padding: var(--space-xs) 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-border-subtle);
  margin-bottom: var(--space-xs);
}

.text-content a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-subtle);
  transition: border-color var(--transition-fast);
}

.text-content a:hover {
  border-color: var(--color-accent);
}

.text-content p {
  margin-bottom: var(--space-md);
}

/* Proof of Work section */
.pow-section {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.pow-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.pow-recommended {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.pow-intro {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: var(--space-md);
  white-space: pre-line;
}

.pow-questions {
  list-style: none;
  margin-bottom: var(--space-lg);
}

/* Mission coming soon */
.pow-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-sm);
  color: var(--color-text-muted);
}

.pow-cs-icon {
  font-size: 2rem;
  opacity: 0.4;
}

.pow-cs-text {
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.7;
}

/* Quiz coming soon pill */
.coming-soon-pill {
  display: inline-block;
  padding: 0.4em 1em;
  border-radius: 999px;
  background: var(--color-bg-card, #f3f3f3);
  color: var(--color-text-muted, #888);
  font-size: 0.85rem;
  font-style: italic;
  border: 1px solid var(--color-border, #ddd);
  margin-top: var(--space-sm);
}

.pow-questions li {
  color: var(--color-text);
  font-weight: 500;
  padding: var(--space-sm) 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent-subtle);
  margin-bottom: var(--space-sm);
}

.pow-textarea {
  width: 100%;
  min-height: 150px;
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pow-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.pow-textarea::placeholder {
  color: var(--color-text-muted);
}

/* Dark scrollbar for textarea */
.pow-textarea::-webkit-scrollbar {
  width: 8px;
}
.pow-textarea::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 4px;
}
.pow-textarea::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
.pow-textarea::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
.pow-textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) var(--color-bg);
}

.pow-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.btn-save {
  padding: 0.6rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-save:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.save-feedback {
  font-size: 0.85rem;
  color: var(--color-success);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.save-feedback.is-visible {
  opacity: 1;
}

/* Week bottom navigation */
.week-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-subtle);
  gap: var(--space-md);
}

.btn-next-week {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-next-week:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Footer / Reset */
.dashboard-footer {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.dashboard-version {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.btn-reset {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* ==========================================
   Language Selector
   ========================================== */

.lang-section {
  margin-bottom: var(--space-xl);
}

.lang-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media(max-width: 640px) {
  .lang-grid {
    grid-template-columns: 1fr;
  }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem var(--space-md);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.lang-option:hover:not(.is-coming-soon) {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: var(--color-accent-subtle);
}

.lang-option.is-selected {
  border-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 0 15px var(--color-accent-glow);
}

.lang-option.is-coming-soon {
  opacity: 0.35;
  cursor: not-allowed;
}

.lang-flag {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.lang-name {
  flex: 1;
  text-align: left;
}

.lang-soon {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* ==========================================
   AI Feedback for Proof of Work
   ========================================== */

.pow-highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.btn-submit-feedback {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-submit-feedback:hover:not(:disabled) {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-submit-feedback:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-save-draft {
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.btn-save-draft:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.pow-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.pow-loading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-accent);
}

.pow-loading.is-hidden {
  display: none;
}

.pow-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Feedback display */
.pow-feedback {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 20px var(--color-accent-glow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.pow-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pow-feedback-error {
  border-color: var(--color-error);
  box-shadow: none;
}

.pow-feedback-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.pow-feedback-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
}

.pow-feedback-text p {
  margin-bottom: var(--space-sm);
}

.pow-feedback-text strong {
  color: var(--color-accent);
}

.pow-feedback-toggle {
  margin-top: var(--space-md);
}

.btn-toggle-detail {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  background: none;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-toggle-detail:hover {
  background: var(--color-accent-subtle);
}

.pow-feedback-long {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-subtle);
}

.pow-feedback-long.is-hidden {
  display: none;
}

/* ==========================================
   Badge Gallery
   ========================================== */

.badge-gallery {
  margin-top: var(--space-2xl);
}

.badge-gallery-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.badge-summary {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.badge-summary strong {
  color: var(--color-accent);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
}

.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
}

.badge-card.is-locked {
  opacity: 0.35;
}

.badge-card.is-locked .badge-icon {
  filter: grayscale(1);
}

.badge-card.is-earned {
  border-color: var(--color-accent);
  box-shadow: 0 0 20px var(--color-accent-glow);
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.badge-card.is-earned .badge-icon {
  animation: badge-pulse 2s ease infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.badge-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.badge-card.is-locked .badge-name {
  color: var(--color-text-muted);
}

.badge-desc {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.badge-card.is-earned .badge-desc {
  color: var(--color-text-secondary);
}

/* Badge unlock popup sparkle */
.gam-popup-icon-wrapper {
  position: relative;
  display: inline-block;
}

.gam-popup-icon-wrapper::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  animation: sparkle-ring 1.5s ease infinite;
}

@keyframes sparkle-ring {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ==========================================
   Gamification UI
   ========================================== */

/* Dashboard gamification header */
.gam-header {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}

.gam-level-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.gam-level-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #0a0a0b;
}

.gam-level-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.gam-sats-display {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.gam-sats-icon {
  font-size: 1rem;
}

.gam-sats-count {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.gam-sats-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.gam-level-bar {
  margin-top: var(--space-xs);
}

.gam-level-track {
  width: 100%;
  height: 6px;
  background: var(--color-bg);
  border-radius: 3px;
  overflow: hidden;
}

.gam-level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gam-level-next {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* Streak display */
.gam-streak {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-accent-subtle);
  border: 1px solid rgba(247, 147, 26, 0.2);
  border-radius: var(--radius-md);
}

.gam-streak-icon {
  font-size: 1.2rem;
}

.gam-streak-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Week view sats counter */
.week-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.gam-week-counter {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.3rem 0.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.gam-week-counter .gam-sats-count {
  font-size: 1rem;
}

.gam-week-counter .gam-sats-label {
  font-size: 0.75rem;
}

/* Quiz sats hint */
.gam-quiz-hint {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent-subtle);
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* Floating sats animation */
.gam-sats-float {
  position: fixed;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-accent);
  pointer-events: none;
  z-index: 1000;
  animation: sats-float 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-shadow: 0 0 10px var(--color-accent-glow);
}

@keyframes sats-float {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.3); }
}

/* Level up popup */
.gam-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.gam-popup-overlay.is-visible {
  opacity: 1;
}

.gam-popup {
  background: var(--color-bg-card);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-3xl);
  text-align: center;
  box-shadow: 0 0 60px var(--color-accent-glow), var(--shadow-glow);
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
  width: 90%;
}

.gam-popup-overlay.is-visible .gam-popup {
  transform: scale(1);
}

.gam-popup-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  animation: popup-bounce 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes popup-bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.gam-popup-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.gam-popup-level {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.gam-popup-name {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.gam-popup-btn {
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.gam-popup-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* Journey-complete celebration: confetti overlay + certificate CTA. */
.gam-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.gam-confetti-piece {
  position: absolute;
  top: -14px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  animation: gam-confetti-fall 3.6s cubic-bezier(0.4, 0.05, 0.6, 1) forwards;
}
@keyframes gam-confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}
.gam-journey-popup .gam-popup-title {
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}
.gam-journey-cta {
  display: inline-block;
  text-decoration: none;
}
.gam-popup-link {
  display: block;
  margin: var(--space-md) auto 0;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.75;
}
.gam-popup-link:hover { opacity: 1; }

/* Combined celebration chips: secondary badges shown alongside a level-up. */
.gam-celebration-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 0 var(--space-lg);
}
.gam-celebration-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
.gam-celebration-chip-icon {
  font-size: 1rem;
}

/* --- Animations --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.week-card { animation: fade-up 0.4s var(--transition-slow) both; }
.week-card:nth-child(1) { animation-delay: 0.05s; }
.week-card:nth-child(2) { animation-delay: 0.1s; }
.week-card:nth-child(3) { animation-delay: 0.15s; }
.week-card:nth-child(4) { animation-delay: 0.2s; }
.week-card:nth-child(5) { animation-delay: 0.25s; }
.week-card:nth-child(6) { animation-delay: 0.3s; }
.week-card:nth-child(7) { animation-delay: 0.35s; }
.week-card:nth-child(8) { animation-delay: 0.4s; }
.week-card:nth-child(9) { animation-delay: 0.45s; }
.week-card:nth-child(10) { animation-delay: 0.5s; }
.week-card:nth-child(11) { animation-delay: 0.55s; }

.unit-block:nth-child(1) { animation-delay: 0.1s; }
.unit-block:nth-child(2) { animation-delay: 0.2s; }
.unit-block:nth-child(3) { animation-delay: 0.3s; }
.unit-block:nth-child(4) { animation-delay: 0.4s; }
.unit-block:nth-child(5) { animation-delay: 0.5s; }
.unit-block:nth-child(6) { animation-delay: 0.6s; }

/* --- Responsive --- */
@media(max-width: 640px) {
  .screen-dashboard,
  .screen-week {
    padding: var(--space-lg) var(--space-md);
  }
  
  .week-card {
    padding: var(--space-md);
    gap: var(--space-md);
  }
  
  .week-number {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
  
  .week-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  .pow-section {
    padding: var(--space-lg) var(--space-md);
  }
  
  .pow-questions li {
    padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    line-height: 1.6;
  }
  
  .pow-textarea {
    min-height: 180px;
  }
  
  .pdf-link {
    padding: var(--space-md) var(--space-lg);
  }
  
  .week-recommended-badge {
    display: block;
    width: fit-content;
    margin-left: 0;
    margin-top: var(--space-xs);
  }
  
  .week-bottom-nav {
    flex-direction: column-reverse;
    gap: var(--space-md);
  }
  
  .week-bottom-nav .btn-back {
    margin-bottom: 0;
  }
  
  .btn-next-week {
    width: 100%;
    justify-content: center;
  }
  
  .quiz-block {
    padding: var(--space-lg) var(--space-md);
  }
  
  .quiz-option {
    padding: 0.75rem var(--space-md);
  }
  
  .gam-header {
    padding: var(--space-md);
  }
  
  .gam-popup {
    padding: var(--space-xl) var(--space-lg);
  }
  
  .week-top-bar {
    gap: var(--space-sm);
  }
  
  .badge-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-sm);
  }
  
  .badge-card {
    padding: var(--space-md) var(--space-sm);
  }
  
  .badge-icon {
    font-size: 1.6rem;
  }
  
  .pow-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-submit-feedback {
    width: 100%;
  }
  
  .pow-feedback {
    padding: var(--space-md);
  }
}

/* HQ nav bar — persistent top right link */
.hq-nav {
  position: fixed;
  top: 0; right: 0;
  z-index: 999;
  padding: .5rem .85rem;
}
.hq-nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .75rem; font-weight: 600;
  color: #6b6875;
  text-decoration: none;
  background: rgba(10,10,11,.8);
  border: 1px solid #1e1e28;
  border-radius: 20px;
  padding: .35rem .75rem;
  backdrop-filter: blur(8px);
  transition: color .15s, border-color .15s;
}
.hq-nav-link:hover {
  color: #e2e8f0;
  border-color: #3a3a45;
}

/* Feedback button */
.feedback-btn { background: none; border: none; cursor: pointer; font-size: .9rem; padding: 0 4px; opacity: 0.5; transition: opacity .2s; display:inline-flex; align-items:center; justify-content:center; color: #94a3b8; }
.feedback-btn:hover { opacity: 1; }
.fb-type-btn { flex: 1; padding: 6px; background: #0d0d1a; border: 1px solid #333; border-radius: 6px; color: #aaa; font-size: .8rem; cursor: pointer; transition: all .2s; }
.fb-type-btn.active { border-color: #f7931a; color: #f7931a; }

/* Tiny Habit section */
.tiny-habit-section {
  margin: var(--space-lg, 1.5rem) 0;
  padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--color-text-muted, #888);
}
.tiny-habit-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.4rem;
}
.tiny-habit-text {
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.8;
  line-height: 1.5;
}

/* --- Help Panel --- */
.help-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(56,189,248,0.5);
  color: #f7931a; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: rgba(56,189,248,0.06);
  flex-shrink: 0;
}
.help-btn:hover { background: rgba(56,189,248,0.15); }

.help-welcome-card {
  background: linear-gradient(135deg, rgba(56,189,248,.06) 0%, rgba(56,189,248,.02) 100%);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 24px;
}

.help-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 300px; z-index: 500;
  background: #111118; border-left: 1px solid #1e1e2e;
  padding: 28px 24px; display: flex; flex-direction: column; gap: 20px;
  transform: translateX(100%); transition: transform .3s ease;
}
.help-panel.open { transform: translateX(0); }
.help-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 499;
  display: none;
}
.help-overlay.open { display: block; }

/* ============================================
   How-to guide download card (per-lesson PDF)
   ============================================ */

.guide-download-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.guide-download-card:hover {
  background: var(--color-accent-glow);
  transform: translateY(-1px);
}

.guide-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  filter: hue-rotate(180deg) saturate(0);
}

.guide-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guide-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent);
}

.guide-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .guide-download-card { padding: var(--space-sm) var(--space-md); }
  .guide-label { font-size: 0.9rem; }
}

/* ============================================
   L1 Wishlist form — Option B: Wishlist Thread
   Lives inside .pow-section. Two distinct sections
   on L1: the wishlist (primary, with save button)
   and the mission warm-up (read-only, secondary).
   ============================================ */

.pow-section-wishlist .pow-header {
  color: var(--color-accent);
}

/* L1: subtle cue under Mission #1 pointing down to the Wishlist
   section. Mission #1 has no save button of its own (saving the
   Wishlist completes L1); this line tells the user where to look. */
.pow-mission-cue {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
  font-size: 0.85rem;
  color: var(--color-accent);
  font-style: italic;
}

.pow-section-warmup {
  margin-top: var(--space-md);
  background: transparent;
  border: 1px dashed var(--color-border);
}
.pow-section-warmup .pow-header {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.pow-section-warmup .pow-intro {
  font-size: 0.9rem;
}

.wishlist-section {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.wishlist-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.wishlist-bucket {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wishlist-bucket-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.wishlist-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.wishlist-dot-outsource { background: #f7931a; }   /* orange — to outsource */
.wishlist-dot-dream     { background: var(--color-accent); }  /* sky blue — to dream of */

.wishlist-input {
  width: 100%;
  padding: 11px var(--space-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.wishlist-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.wishlist-input::placeholder {
  color: var(--color-text-muted);
}

.wishlist-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.wishlist-status {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.wishlist-status.is-success {
  color: var(--color-success);
  font-weight: 600;
}
.wishlist-status.is-error {
  color: var(--color-error);
  font-weight: 600;
}

@media (max-width: 600px) {
  .wishlist-actions { flex-direction: column; align-items: stretch; }
  .wishlist-status { text-align: center; }
}

/* ============================================
   Wishlist Thread — per-lesson submission (L2-L10)
   Picker chips + scale + concern pills + save row
   ============================================ */

.wlt-section {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.wlt-section-commitment {
  /* L10 — slightly warmer accent strip for the commitment moment. */
  border-left: 3px solid #f7931a;
  padding-left: var(--space-md);
  margin-left: -3px;
}

.wlt-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}
.wlt-label.wlt-picker-label {
  margin-top: 0;
}

.wlt-divider {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Picker chips */
.wlt-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wlt-chip {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: 7px 12px;
  /* Pill radius when the chip is a single line; gracefully degrades to
     a softer rectangle when the text wraps to 2 lines. */
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  max-width: 100%;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.wlt-chip:hover {
  border-color: var(--color-accent);
}
.wlt-chip.is-selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #0a0a0b;
  font-weight: 600;
}
.wlt-chip.is-selected .wlt-dot {
  background: #0a0a0b !important;
}

.wlt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.wlt-dot-outsource { background: #f7931a; }
.wlt-dot-dream     { background: var(--color-accent); }

.wlt-chip-text {
  /* Allow 2-line wrap before truncating. Long Wishlist items like
     "An agent that turns each podcast into a one-pager" now read
     fully on desktop in two lines instead of getting mid-word ellipsis.
     Past 2 lines, line-clamp + ellipsis kicks in as a safety net. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-width: 340px;
}

/* Empty-wishlist state */
.wlt-empty {
  padding: var(--space-md);
  background: rgba(247, 147, 26, 0.05);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

/* Text & URL inputs */
.wlt-input {
  width: 100%;
  padding: 11px var(--space-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.wlt-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.wlt-input::placeholder { color: var(--color-text-muted); }

/* Textarea (L10 plan + prevention) */
.wlt-textarea {
  width: 100%;
  min-height: 90px;
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.wlt-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.wlt-textarea::placeholder { color: var(--color-text-muted); }

/* 1-5 scale (L4 trust) */
.wlt-scale {
  display: flex;
  gap: 8px;
}
.wlt-scale-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.wlt-scale-dot:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}
.wlt-scale-dot.is-selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #0a0a0b;
}

/* 7-concern pill picker (L8) */
.wlt-concerns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.wlt-concern {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.wlt-concern:hover { border-color: var(--color-accent); }
.wlt-concern.is-selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #0a0a0b;
  font-weight: 600;
}

/* "You can edit any of this later" affordance — sits just above the save
   row to reassure users their answers stay open across visits. */
.wlt-edit-later {
  margin-top: var(--space-lg);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Save row + status */
.wlt-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
.wlt-status {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.wlt-status.is-success {
  color: var(--color-success);
  font-weight: 600;
}
.wlt-status.is-error {
  color: var(--color-error);
  font-weight: 600;
}
/* Cancel button — appears in inline-edit mode on My Progress (the lesson
   page omits it because there's nothing to cancel back to). Styled as a
   ghost button so the primary Save action stays visually dominant. */
.btn-cancel-edit {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-cancel-edit:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}
/* Single-field rename editor for a Wishlist item on My Progress. */
.wlt-item-rename {
  width: 100%;
}
.wlt-item-rename .wlt-textarea {
  width: 100%;
  min-height: 60px;
}

/* Mark-as-done for L3 / L5 */
.wlt-markdone {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}
.wlt-markdone-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--space-md);
}

@media (max-width: 600px) {
  .wlt-concerns { grid-template-columns: 1fr; }
  .wlt-actions { flex-direction: column; align-items: stretch; }
  .wlt-status { text-align: center; }
  .wlt-chip-text { max-width: 100%; }
}

/* ───────────────────────────────────────────────────────────────────
   Values Card Sort (Purpose L1 / w1u2) — purpose/values-card-sort.js
   Direction C: surfaces + borders lifted clear of the near-black page so
   they read; gradient play/card accents tie the orange to its surfaces.
   ─────────────────────────────────────────────────────────────────── */
.vcs-mount { display: block; }
.vcs {
  display: block;
  --vcs-surface: #221f29;     /* card inner / chips, clearly off black */
  --vcs-surface-2: #2b2734;   /* default buttons, deck edges */
  --vcs-surface-3: #332e3d;   /* hover */
  --vcs-line: #4a4556;        /* borders that actually read on the page */
  --vcs-line-soft: #393444;
  --vcs-text: #e8e6e3;
  --vcs-text-2: #bdb9c6;
  --vcs-text-muted: #827e90;
  --vcs-accent: #f7931a;
  --vcs-glow: rgba(247, 147, 26, 0.18);
  --vcs-grad: linear-gradient(90deg, #ffb454, #f7931a);
  --vcs-most-grad: linear-gradient(90deg, #4ade80, #22c55e);   /* Stage 2 "most" = green */
  --vcs-most-glow: rgba(34, 197, 94, 0.22);
  --vcs-least-grad: linear-gradient(90deg, #60c5fb, #38bdf8);  /* Stage 2 "least" = blue */
  --vcs-least-glow: rgba(56, 189, 248, 0.22);
}

/* loading / sign-in / error sit outside .vcs, so use the journey tokens */
.vcs-msg { padding: 28px 18px; text-align: center; color: var(--color-text-secondary); font-size: 15px; }
.vcs-msg-error { color: #ff8a8a; }

/* ── Cover / entry ── */
.vcs-cover {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 26px; padding: 22px 10px 10px;
}
.vcs-hero { position: relative; display: flex; align-items: center; justify-content: center; }
.vcs-deck { position: relative; width: 160px; height: 200px; }
.vcs-dcard { position: absolute; inset: 0; border-radius: 18px; background: var(--vcs-surface); border: 1px solid var(--vcs-line); }
.vcs-dcard.d4 { transform: rotate(-9deg) translate(-10px, 8px); background: #0e0d11; opacity: 0.55; }
.vcs-dcard.d3 { transform: rotate(-4deg) translate(-5px, 4px); opacity: 0.7; }
.vcs-dcard.d2 { transform: rotate(4deg) translate(6px, 3px); opacity: 0.85; }
.vcs-dcard.d1 {
  border: 1.5px solid transparent;
  background: linear-gradient(var(--vcs-surface), var(--vcs-surface)) padding-box,
              var(--vcs-grad) border-box;
  box-shadow: 0 0 36px var(--vcs-glow);
}
.vcs-play {
  position: absolute; width: 108px; height: 108px; border: none; padding: 0; background: none;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.vcs-play-spin { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 180deg, #22c55e, #38bdf8, #f7931a, #22c55e);
  animation: vcs-spin 9s linear infinite; }
.vcs-play-core { position: absolute; inset: 5px; border-radius: 50%; background: #15131a; }
.vcs-play-pulse { position: absolute; inset: -9px; border-radius: 50%;
  border: 2px solid rgba(247, 147, 26, 0.45); animation: vcs-pulse 2.4s ease-out infinite; }
.vcs-play-tri { position: relative; z-index: 2; width: 0; height: 0; border-style: solid;
  border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; margin-left: 7px; }
.vcs-play:focus-visible { outline: 2px solid var(--vcs-accent); outline-offset: 6px; }
@keyframes vcs-spin { to { transform: rotate(360deg); } }
@keyframes vcs-pulse { 0% { transform: scale(0.94); opacity: 0.85; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vcs-play-spin, .vcs-play-pulse { animation: none; } }

.vcs-eyebrow { font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--vcs-accent); font-weight: 700; }
.vcs-cover-title { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 600; font-size: 30px;
  line-height: 1.08; margin: 10px 0 12px; color: var(--vcs-text); }
.vcs-grad { background: var(--vcs-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vcs-cover-sub { color: var(--vcs-text-2); line-height: 1.6; font-size: 15.5px; max-width: 34ch; margin: 0 auto; }
.vcs-cover-foot { color: var(--vcs-text-muted); font-weight: 600; margin-top: 16px; font-size: 13.5px; }

/* ── Sort screen ── */
.vcs-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.vcs-topbar-label { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--vcs-text-muted); font-weight: 700; }
.vcs-topbar-counts { font-size: 12px; color: var(--vcs-text-muted); }

.vcs-progress { margin-bottom: 18px; }
.vcs-progress-bar { height: 6px; background: var(--vcs-surface-2); border: 1px solid var(--vcs-line-soft); border-radius: 999px; overflow: hidden; }
.vcs-progress-bar span { display: block; height: 100%; background: var(--vcs-grad); border-radius: 999px; transition: width 0.25s ease; }
.vcs-progress-label { margin-top: 8px; font-size: 13px; color: var(--vcs-text-muted); text-align: center; }

.vcs-intro { color: var(--vcs-text-2); font-size: 14.5px; line-height: 1.55; margin: 0 auto 18px; text-align: center; max-width: 46ch; }

/* The value card — gradient hairline border ties it to the orange buttons */
.vcs-card { border-radius: 18px; padding: 1.5px; background: var(--vcs-grad); transition: transform 0.16s ease, opacity 0.16s ease; }
.vcs-card-in { background: var(--vcs-surface); border-radius: 16.5px; padding: 32px 22px; text-align: center; min-height: 206px; display: flex; flex-direction: column; justify-content: center; }
.vcs-band { height: 5px; width: 52px; border-radius: 5px; margin: 0 auto 16px; background: var(--vcs-grad); }
.vcs-card-name { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-size: 28px; color: var(--vcs-text); margin-bottom: 9px; line-height: 1.15; }
.vcs-card-desc { font-size: 16px; color: var(--vcs-text-2); line-height: 1.5; max-width: 34ch; margin: 0 auto; }
.vcs-card-out-yes   { transform: translateX(40px)  scale(0.96); opacity: 0; }
.vcs-card-out-maybe { transform: translateY(40px)  scale(0.96); opacity: 0; }
.vcs-card-out-no    { transform: translateX(-40px) scale(0.96); opacity: 0; }

/* Choice buttons */
.vcs-choices { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }
.vcs-btn {
  width: 100%; padding: 15px 18px; border-radius: 14px; font-size: 15.5px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--vcs-line); background: var(--vcs-surface-2); color: var(--vcs-text);
  font-family: inherit; transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.vcs-btn:active { transform: scale(0.985); }
.vcs-btn-yes { background: var(--vcs-grad); border: none; color: #1a1208; box-shadow: 0 8px 22px var(--vcs-glow); }
.vcs-btn-maybe:hover, .vcs-btn-no:hover { background: var(--vcs-surface-3); border-color: var(--vcs-text-muted); }

/* Rebalance grid */
.vcs-rebalance-title { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-size: 21px; color: var(--vcs-text); margin-bottom: 6px; }
.vcs-rebalance-body { font-size: 15px; color: var(--vcs-text-2); line-height: 1.5; margin-bottom: 16px; }
.vcs-chip-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
.vcs-chip {
  text-align: left; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--vcs-line);
  background: var(--vcs-surface); color: var(--vcs-text); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.vcs-chip.is-on { border-color: var(--vcs-accent); background: rgba(247, 147, 26, 0.10); box-shadow: inset 0 0 0 1px var(--vcs-accent); }
.vcs-chip.is-off { opacity: 0.45; border-style: dashed; }
.vcs-chip-name { display: block; font-weight: 700; font-size: 15px; }
.vcs-chip-desc { display: block; font-size: 13px; color: var(--vcs-text-2); margin-top: 3px; line-height: 1.4; }

.vcs-continue {
  width: 100%; padding: 15px 18px; border-radius: 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; border: none; background: var(--vcs-grad); color: #1a1208;
  box-shadow: 0 8px 22px var(--vcs-glow); font-family: inherit; transition: opacity 0.15s ease;
}
.vcs-continue:disabled { background: var(--vcs-surface-2); color: var(--vcs-text-muted); box-shadow: none; cursor: default; }

/* Stage 1 complete */
.vcs-done { text-align: center; padding: 14px 6px; }
.vcs-done-title { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-size: 23px; color: var(--vcs-text); margin-bottom: 8px; }
.vcs-done-body { font-size: 15px; color: var(--vcs-text-2); line-height: 1.55; max-width: 44ch; margin: 0 auto 18px; }
.vcs-shortlist-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vcs-text-muted); margin-bottom: 10px; }
.vcs-shortlist { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.vcs-shortlist-chip { padding: 8px 14px; border-radius: 999px; background: var(--vcs-surface-2); border: 1px solid var(--vcs-line); color: var(--vcs-text); font-size: 14px; font-weight: 600; }

/* Desktop (landscape): two-column cover; card + choices share one width so
   their left/right edges align; choices sit in a row. */
@media (min-width: 640px) {
  .vcs-cover { flex-direction: row; text-align: left; gap: 44px; padding: 32px 16px; justify-content: center; }
  .vcs-cover-copy { max-width: 36ch; }
  .vcs-cover-sub { margin: 0; }
  .vcs-cover-title { font-size: 38px; }
  .vcs-card { max-width: 600px; margin-left: auto; margin-right: auto; }
  .vcs-card-in { padding: 40px 28px; min-height: 212px; }
  .vcs-card-name { font-size: 34px; }
  .vcs-choices { flex-direction: row; max-width: 600px; margin-left: auto; margin-right: auto; }
  .vcs-chip-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Stage 2: comparison rounds (most = green, least = blue) ── */
.vcs-pips { display: flex; gap: 5px; }
.vcs-pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--vcs-surface-3); }
.vcs-pips i.on { background: var(--vcs-accent); width: 18px; border-radius: 4px; }

.vcs-prompt { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 500; font-size: 22px; line-height: 1.25; color: var(--vcs-text); margin: 4px 0 4px; text-align: center; }
.vcs-hi-most { color: #5fe39b; }
.vcs-hi-least { color: #69caf9; }
.vcs-prompt-sub { color: var(--vcs-text-muted); font-size: 13px; text-align: center; margin-bottom: 18px; }

.vcs-opts { display: flex; flex-direction: column; gap: 10px; }
.vcs-opt { cursor: pointer; border-radius: 14px; padding: 1.5px; background: var(--vcs-line); transition: transform 0.08s ease; }
.vcs-opt-in { background: var(--vcs-surface-2); border-radius: 12.5px; padding: 13px 15px; display: flex; align-items: center; gap: 12px; }
.vcs-opt-text { min-width: 0; }
.vcs-opt-name { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 500; font-size: 17px; color: var(--vcs-text); line-height: 1.1; }
.vcs-opt-desc { color: var(--vcs-text-2); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.vcs-opt-badge { margin-left: auto; flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.vcs-opt-badge:empty { display: none; }
.vcs-opt:active { transform: scale(0.99); }
.vcs-opt.is-most { background: var(--vcs-most-grad); box-shadow: 0 6px 20px var(--vcs-most-glow); }
.vcs-opt.is-most .vcs-opt-badge { background: var(--vcs-most-grad); color: #0c3d1f; }
.vcs-opt.is-least { background: var(--vcs-least-grad); box-shadow: 0 6px 20px var(--vcs-least-glow); }
.vcs-opt.is-least .vcs-opt-badge { background: var(--vcs-least-grad); color: #06314a; }
.vcs-opt.dimmed { opacity: 0.65; }

.vcs-s2-next { margin-top: 20px; width: 100%; padding: 15px; border-radius: 14px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; border: none; background: var(--vcs-grad); color: #1a1208; box-shadow: 0 8px 22px var(--vcs-glow); transition: opacity 0.15s ease; }
.vcs-s2-next:disabled { background: var(--vcs-surface-2); color: var(--vcs-text-muted); box-shadow: none; cursor: default; }

/* Emerging top 5 (Stage 2 interstitial) */
.vcs-rank { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 0 auto; }
.vcs-rank-row { display: flex; align-items: center; gap: 12px; background: var(--vcs-surface-2); border: 1px solid var(--vcs-line); border-radius: 12px; padding: 11px 14px; }
.vcs-rank-num { font-family: 'Fredoka One', 'Fredoka', sans-serif; color: var(--vcs-accent); font-size: 16px; width: 18px; text-align: center; }
.vcs-rank-name { font-weight: 700; color: var(--vcs-text); }

@media (min-width: 640px) {
  .vcs-prompt { font-size: 26px; }
  .vcs-opts { flex-direction: row; }
  .vcs-opt { flex: 1; }
  .vcs-opt-in { flex-direction: column; align-items: flex-start; text-align: left; gap: 8px; min-height: 150px; }
  .vcs-opt-badge { margin-left: 0; margin-top: auto; }
  .vcs-s2-next { display: block; max-width: 280px; margin-left: auto; margin-right: auto; }
}

/* ── Stage 3: confirm your five ── */
.vcs-s3-title { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 600; font-size: 28px; line-height: 1.1; margin: 10px 0 8px; color: var(--vcs-text); }
.vcs-s3-sub { color: var(--vcs-text-2); font-size: 14.5px; line-height: 1.55; margin-bottom: 20px; }

.vcs-rank-list { display: flex; flex-direction: column; gap: 10px; }
.vcs-rk { display: flex; align-items: center; gap: 14px; border-radius: 14px; padding: 1.5px; background: var(--vcs-grad); }
.vcs-rk-in { flex: 1; display: flex; align-items: center; gap: 14px; background: var(--vcs-surface); border-radius: 12.5px; padding: 13px 15px; }
.vcs-rk-num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--vcs-grad); color: #1a1208; font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.vcs-rk-body { min-width: 0; flex: 1; }
.vcs-rk-name { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 500; font-size: 18px; color: var(--vcs-text); line-height: 1.1; }
.vcs-rk-desc { color: var(--vcs-text-2); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.vcs-rk-swap { flex-shrink: 0; background: none; border: 1px solid var(--vcs-line); color: var(--vcs-text-2); border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 12.5px; padding: 7px 13px; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: border-color 0.15s ease, color 0.15s ease; }
.vcs-rk-swap:hover { border-color: var(--vcs-accent); color: var(--vcs-accent); }

.vcs-drawer { margin-top: 10px; background: var(--vcs-surface-2); border: 1px solid var(--vcs-line); border-radius: 14px; padding: 14px 15px; }
.vcs-drawer-h { font-size: 13px; color: var(--vcs-text-2); margin-bottom: 10px; }
.vcs-drawer-h b { color: var(--vcs-text); font-weight: 700; }
.vcs-bench { display: flex; flex-wrap: wrap; gap: 8px; }
.vcs-bench-chip { background: var(--vcs-surface); border: 1px solid var(--vcs-line); color: var(--vcs-text); border-radius: 999px; padding: 8px 14px; font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.vcs-bench-chip:hover { border-color: var(--vcs-accent); background: var(--vcs-surface-3); }
.vcs-drawer-cancel { margin-top: 10px; background: none; border: none; color: var(--vcs-text-muted); font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }

.vcs-lock { margin-top: 22px; width: 100%; padding: 16px; border-radius: 14px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; border: none; background: var(--vcs-grad); color: #1a1208; box-shadow: 0 8px 22px var(--vcs-glow); transition: opacity 0.15s ease; }
.vcs-lock:disabled { opacity: 0.7; cursor: default; }

/* Tiebreaker */
.vcs-tb-title { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 500; font-size: 22px; color: var(--vcs-text); margin: 8px 0 4px; }
.vcs-tb-sub { color: var(--vcs-text-muted); font-size: 13px; margin-bottom: 18px; }
.vcs-tb-row { display: flex; gap: 12px; align-items: stretch; }
.vcs-tb-card { flex: 1; cursor: pointer; border-radius: 14px; padding: 1.5px; background: var(--vcs-line); transition: transform 0.08s ease; }
.vcs-tb-in { background: var(--vcs-surface-2); border-radius: 12.5px; padding: 20px 16px; text-align: center; min-height: 120px; display: flex; flex-direction: column; justify-content: center; }
.vcs-tb-card:active { transform: scale(0.98); }
.vcs-tb-card:hover { background: var(--vcs-grad); }
.vcs-tb-name { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 500; font-size: 19px; color: var(--vcs-text); }
.vcs-tb-desc { color: var(--vcs-text-2); font-size: 12.5px; margin-top: 6px; line-height: 1.35; }
.vcs-tb-or { align-self: center; color: var(--vcs-text-muted); font-weight: 700; font-size: 12px; }

/* Locked-in final screen */
.vcs-locked { text-align: center; padding: 8px 6px; }
.vcs-locked-badge { width: 52px; height: 52px; border-radius: 50%; background: var(--vcs-grad); color: #1a1208; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; box-shadow: 0 8px 22px var(--vcs-glow); }
.vcs-locked .vcs-rank-list { max-width: 360px; margin: 18px auto 0; }

@media (min-width: 640px) {
  .vcs-s3-title { font-size: 34px; }
  .vcs-rank-list { max-width: 600px; margin-left: auto; margin-right: auto; }
  .vcs-lock { display: block; max-width: 300px; margin-left: auto; margin-right: auto; }
}

/* Keyboard focus visibility for every interactive control in the widget */
.vcs-btn:focus-visible, .vcs-opt:focus-visible, .vcs-tb-card:focus-visible,
.vcs-bench-chip:focus-visible, .vcs-rk-swap:focus-visible, .vcs-lock:focus-visible,
.vcs-s2-next:focus-visible, .vcs-continue:focus-visible, .vcs-chip:focus-visible,
.vcs-drawer-cancel:focus-visible {
  outline: 2px solid var(--vcs-accent);
  outline-offset: 2px;
}
