:root {
  /* Light Mode (default) */
  --bg: #FAFAF8;
  --bg-2: #F0EDE6;
  --bg-3: #E4E0D8;
  --surface: #FFFFFF;
  --surface-elevated: #FFFFFF;

  --ink: #1A1A2E;
  --muted: #8A8A9A;

  --primary: #2D4A3E;
  --primary-light: #3D6354;

  --accent: #E76F51;
  --accent-hover: #D45D40;

  --gold: #B8965A;
  --gold-light: #D4B87A;

  --success: #3D8B6E;
  --error: #E76F51;
  --warning: #D4A04A;

  /* Legacy aliases */
  --accent-2: var(--primary);
  --accent-3: var(--primary);
  --card: var(--surface);

  /* Trait atmosphere colors */
  --trait-conscientiousness: #2563EB;
  --trait-conscientiousness-glow: #60A5FA;
  --trait-extraversion: #F59E0B;
  --trait-extraversion-glow: #FCD34D;
  --trait-stability: #10B981;
  --trait-stability-glow: #6EE7B7;
  --trait-openness: #8B5CF6;
  --trait-openness-glow: #C4B5FD;
  --trait-agreeableness: #EC4899;
  --trait-agreeableness-glow: #F9A8D4;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-elevated: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-glow: 0 4px 16px rgba(184,150,90,0.12);

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

/* Dark mode via system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0D14;
    --bg-2: #151520;
    --bg-3: #1E1E2E;
    --surface: #1A1A28;
    --surface-elevated: #222236;

    --ink: #E8E8EC;
    --muted: #6E6E80;

    --primary: #3D8B6E;
    --primary-light: #4DAA86;

    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-elevated: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 4px 16px rgba(184,150,90,0.08);
  }
}

/* Dark mode via explicit toggle */
[data-theme="dark"] {
  --bg: #0D0D14;
  --bg-2: #151520;
  --bg-3: #1E1E2E;
  --surface: #1A1A28;
  --surface-elevated: #222236;

  --ink: #E8E8EC;
  --muted: #6E6E80;

  --primary: #3D8B6E;
  --primary-light: #4DAA86;

  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-elevated: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 4px 16px rgba(184,150,90,0.08);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-pill);
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.theme-toggle:hover {
  background: var(--bg-2);
  border-color: var(--primary-light);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
}

h3, h4, h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 12px;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
}

.glow-1 {
  background: radial-gradient(ellipse at 20% 50%, rgba(45,74,62,0.06) 0%, transparent 70%);
  top: -15vh;
  right: -10vw;
}

.glow-2 {
  background: radial-gradient(ellipse at 80% 20%, rgba(184,150,90,0.05) 0%, transparent 70%);
  bottom: -20vh;
  left: -10vw;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(45,74,62,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(45,74,62,0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 250, 248, 0.85);
  color: var(--ink);
  border-bottom: 1px solid var(--bg-3);
}

[data-theme="dark"] .site-header {
  background: rgba(13, 13, 20, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background: rgba(13, 13, 20, 0.85);
  }
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity var(--transition);
}

.logo:hover {
  opacity: 0.85;
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Subtle separator between nav groups */
.nav-separator {
  width: 1px;
  height: 20px;
  background: var(--bg-3);
  margin: 0 4px;
}

.locale-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.locale-select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--ink);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-xs);
  padding: 4px 28px 4px 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.locale-select select:hover {
  background-color: var(--bg-3);
  border-color: var(--muted);
}

.locale-select select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(231, 111, 81, 0.15);
}

.locale-select select option {
  background: var(--surface);
  color: var(--ink);
}

/* Modules Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-dropdown-trigger:hover {
  background: var(--bg-3);
  border-color: var(--muted);
}

.nav-dropdown-trigger:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(231, 111, 81, 0.15);
}

.nav-dropdown-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  transition: transform var(--transition);
  margin-left: 2px;
}

.nav-dropdown.open .nav-dropdown-trigger {
  background: var(--bg-3);
  border-color: var(--muted);
}

.nav-dropdown.open .nav-dropdown-trigger::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  color: var(--ink);
  padding: 10px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-dropdown-menu a:hover {
  background: var(--bg);
  transform: translateX(2px);
}

.nav-dropdown-menu a.active {
  background: rgba(45, 74, 62, 0.08);
  color: var(--primary);
}

.nav-dropdown-menu a.active .nav-dropdown-icon {
  opacity: 1;
}

.nav-dropdown-icon {
  font-size: 1.15rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-dropdown-label {
  flex: 1;
}

.nav-dropdown-badge {
  font-size: 0.6rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.nav-dropdown-divider {
  height: 1px;
  background: rgba(26, 26, 26, 0.06);
  margin: 8px 6px;
}

/* Nav link active state */
.nav a.active {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

/* Mobile nav improvements */
@media (max-width: 720px) {
  .site-header {
    padding: 0 16px;
    height: 52px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo-icon {
    width: 24px;
    height: 24px;
  }

  .nav-dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 24px 24px 0 0;
    max-height: 75vh;
    overflow-y: auto;
    padding: 20px 16px 32px;
    box-shadow: 0 -8px 32px rgba(26, 26, 26, 0.15);
  }

  .nav-dropdown.open .nav-dropdown-menu {
    transform: none;
  }

  .nav-dropdown-menu a {
    padding: 14px 16px;
  }

  .nav-dropdown-icon {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

  /* Add overlay for mobile */
  .nav-dropdown.open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.5);
    z-index: 99;
  }
}

button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  min-height: 44px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

input,
textarea,
select {
  background: var(--bg-3);
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  width: 100%;
}

input[type="file"] {
  padding: 8px 12px;
  border-radius: 14px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,74,62,0.12);
  outline: none;
}

button:active {
  transform: scale(0.97);
  box-shadow: none;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.primary {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  min-height: 44px;
  font-weight: 500;
  font-size: 15px;
}

.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(196,101,74,0.25);
}

.secondary {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  min-height: 44px;
  font-weight: 500;
  font-size: 15px;
}

.secondary:hover {
  background: var(--primary-light);
}

.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  min-height: 44px;
  font-weight: 500;
  font-size: 15px;
}

.ghost:hover {
  background: var(--bg-2);
  border-color: var(--primary);
}

main {
  display: flex;
  flex-direction: column;
  gap: 100px;
  padding: 30px 6vw 80px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.results-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.print-mode {
  display: grid;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.print-mode select {
  border-radius: var(--radius-xs);
  padding: 8px 14px;
  border: 1px solid transparent;
  background: var(--bg-3);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
}

.progress {
  min-width: 250px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  max-width: 100%;
  box-sizing: border-box;
}

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

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 2px;
  transition: width 400ms ease;
}

.progress-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 24px;
}

.section-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: var(--surface);
  padding: 18px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-meta {
  max-width: 420px;
}

.section-steps {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.section-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-3);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.section-step.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.section-step.completed {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  margin: 0;
  padding: 24px;
  box-shadow: none;
  transform: translateY(12px);
  opacity: 0;
  animation: float-in 500ms ease forwards;
}

.question-card:nth-child(odd) {
  animation-delay: 60ms;
}

.question-card legend {
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding: 0;
  font-weight: 600;
}

.scale {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.scale label {
  position: relative;
  flex: 1;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-3);
  background: var(--surface);
  color: var(--muted);
  padding: 10px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.scale label:hover {
  background: var(--bg-2);
  border-color: var(--primary-light);
}

.scale label:active {
  transform: scale(0.95);
}

.scale input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.scale input:checked + span {
  color: #fff;
}

.scale label:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(45,74,62,0.2);
}

.scale span {
  display: block;
  padding: 8px 0;
  border-radius: 12px;
}

.scale label:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(45,74,62,0.15);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.alert {
  min-height: 20px;
  color: var(--accent);
  margin-top: 12px;
  font-weight: 600;
}

.fine-print {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.trait {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-3);
}

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

.trait-title {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.trait-title span:last-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.trait-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}

.trait-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 4px;
  transition: width 600ms ease;
}

.insights {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.email-capture {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.insight-pill {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: rgba(45, 74, 62, 0.08);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reflection-list {
  display: grid;
  gap: 14px;
}

.mbti-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mbti-controls {
  display: grid;
  gap: 12px;
  margin: 12px 0 16px;
}

.mbti-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mbti-settings label {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.toggle input {
  width: 18px;
  height: 18px;
}

.mbti-tile {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--bg-3);
  transition: var(--transition);
}

.mbti-tile.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mbti-tile.active .mbti-label {
  color: rgba(255, 255, 255, 0.8);
}

.mbti-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.mbti-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.mbti-detail {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mbti-panel {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--bg-3);
}

.mbti-panel h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}

.mbti-panel ul {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.mbti-panel li::before {
  content: "•";
  margin-right: 6px;
  color: var(--primary);
}

.tooltip-item {
  position: relative;
  cursor: help;
}

/* Make non-interactive tooltips focusable */
.tooltip-item[tabindex] {
  outline: none;
}

.tooltip-item[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.tooltip-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  background: var(--ink);
  color: #fff;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  width: max-content;
  max-width: 220px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 2;
}

.tooltip-item:hover::after,
.tooltip-item:focus::after,
.tooltip-item:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.certificate-card {
  display: grid;
  gap: 16px;
}

.certificate-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
}

.certificate-preview {
  background: #f6f0e2;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(26, 26, 26, 0.08);
}

.certificate-body {
  background: #fffaf2;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.certificate-meta {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
}

.certificate-signature {
  margin-top: 20px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
}

.print-summary {
  display: none;
}

.reflection-item {
  background: #f9f6f1;
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px dashed rgba(26, 26, 26, 0.12);
}

.site-footer {
  text-align: center;
  padding: 30px 6vw 60px;
  color: var(--muted);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-nav a:hover {
  color: var(--ink);
}

.faq {
  display: grid;
  gap: 30px;
}

.faq h2 {
  color: var(--ink);
}

.faq .lede {
  color: var(--muted);
}

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

.faq-card {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  padding: 20px;
}

.faq-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.faq-card p {
  font-size: 14px;
  color: var(--muted);
}

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

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

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .certificate-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
  }

  .scale {
    gap: 6px;
  }

  .email-form {
    grid-template-columns: 1fr;
  }

  .mbti-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mbti-settings {
    grid-template-columns: 1fr;
  }

  .mbti-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .scale {
    gap: 4px;
    flex-wrap: wrap;
  }

  .scale label {
    padding: 10px 6px;
    font-size: 0.85rem;
    min-height: 44px; /* WCAG AA touch target */
    min-width: 44px; /* WCAG AA touch target */
    flex: 1 1 auto;
  }

  .results-hidden::before {
    white-space: normal;
    top: 120px;
    padding: 20px 24px;
    font-size: 1rem;
  }

  .progress {
    min-width: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .bottom-tabs,
  .module-breadcrumb,
  .trust-bar,
  .assessment,
  .email-capture,
  #trait-cards,
  #narrative-card,
  #reflection-card,
  .faq,
  .site-footer,
  .background {
    display: none !important;
  }

  .print-summary {
    display: block;
    padding: 30px;
  }

  #mbti-card,
  #certificate-card {
    display: block;
    box-shadow: none;
    border: 1px solid rgba(26, 26, 26, 0.2);
  }

  .trait-bar span {
    background: var(--primary) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .mbti-controls,
  #download-json-btn,
  #download-pdf-btn,
  #download-csv-btn,
  .print-mode,
  #certificate-btn,
  #download-card-btn,
  #print-btn {
    display: none !important;
  }

  body.print-mode-certificate .print-summary,
  body.print-mode-certificate #mbti-card {
    display: none !important;
  }

  body.print-mode-mbti .print-summary,
  body.print-mode-mbti #certificate-card {
    display: none !important;
  }
}

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

/* Results section hidden state */
.results-hidden {
  opacity: 0.3;
  pointer-events: none;
  position: relative;
  min-height: 300px;
}

.results-hidden::before {
  content: var(--results-hidden-message, "Complete all 50 questions to see your results");
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  padding: 24px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  z-index: 10;
  text-align: center;
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  box-sizing: border-box;
}

/* Qualitative score label */
.score-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-left: 8px;
  opacity: 0.9;
}

/* Scale legend shown once per section */
.scale-legend {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-2);
  border-radius: 14px;
}

.scale-legend span {
  flex: 1;
  max-width: 80px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .scale-legend {
    gap: 6px;
    padding: 10px 12px;
  }
  .scale-legend span {
    font-size: 0.7rem;
  }
}

@media (max-width: 520px) {
  .scale-legend {
    gap: 4px;
    padding: 8px 10px;
  }
  .scale-legend span {
    font-size: 0.65rem;
  }
}

/* MBTI advanced dropdown */
.mbti-advanced-dropdown {
  margin-bottom: 16px;
}

.mbti-advanced-dropdown summary {
  cursor: pointer;
  font-size: 0.9rem;
}

.mbti-advanced-dropdown .mbti-settings {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: 12px;
}

.mbti-advanced-dropdown .mbti-settings label {
  display: block;
  margin-bottom: 12px;
}

.mbti-advanced-dropdown .mbti-settings input[type="number"] {
  width: 80px;
  margin-left: 8px;
}

/* Auto-save toast indicator */
#auto-save-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  z-index: 100;
  pointer-events: none;
}

.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.export-dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10;
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.dropdown-content button {
  width: 100%;
  text-align: left;
  border: none;
  padding: 10px 14px;
}

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

  .question-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .progress-bar,
  .trait-bar span {
    transition: none;
  }
}

/* Answered question styling (use background instead of opacity) */
.question-card.answered {
  background: var(--bg);
  border-left: 3px solid var(--primary);
}

/* Section completion celebration */
.section-complete-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 20px;
  animation: pulse-once 600ms ease;
}

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

/* Loading spinner */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* Custom confirm dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.confirm-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.confirm-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  transform: scale(0.95);
  transition: transform var(--transition);
}

.confirm-overlay.visible .confirm-dialog {
  transform: scale(1);
}

.confirm-dialog h3 {
  margin-bottom: 12px;
}

.confirm-dialog p {
  color: var(--muted);
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Hamburger menu for mobile */
.menu-toggle {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.menu-toggle:hover {
  background: var(--bg-3);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.active {
  background: var(--bg-3);
  border-color: var(--bg-3);
}

.menu-toggle.active span {
  background: var(--ink);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
    order: 3;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 20px 5vw;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--bg-3);
    box-shadow: var(--shadow-elevated);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav-separator {
    display: none;
  }

  .site-header {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .locale-select {
    width: 100%;
  }

  .locale-select select {
    width: 100%;
    background-color: var(--bg-2);
    color: var(--ink);
    border-color: var(--bg-3);
    padding: 8px 32px 8px 12px;
    font-size: 0.875rem;
  }

  .nav-dropdown-trigger {
    background: var(--bg-2);
    color: var(--ink);
    border-color: var(--bg-3);
    width: 100%;
    justify-content: center;
  }

  .nav-dropdown-trigger::after {
    border-top-color: var(--muted);
  }

  .auth-container {
    width: 100%;
  }

  .auth-trigger {
    width: 100%;
    text-align: center;
  }
}

/* Email validation */
input:invalid:not(:placeholder-shown) {
  border-color: var(--accent);
}

input:valid:not(:placeholder-shown) {
  border-color: var(--success);
}

/* Section transition */
.question-list.transitioning {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 150ms ease;
}

/* ============================================================================
   Dashboard / Home
   ============================================================================ */

.dashboard {
  padding: 40px 6vw 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.dashboard-greeting {
  padding: 48px 24px 32px;
  text-align: center;
}

.greeting-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.greeting-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}
.greeting-subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* Module Tiles Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px 0 32px;
}

.module-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
  cursor: pointer;
  text-align: center;
}
.module-tile:hover {
  transform: translateY(-4px);
  border-color: var(--gold-light);
  box-shadow: 0 8px 32px rgba(184,150,90,0.12);
}

/* Featured personality card */
.module-tile-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a2e 100%);
  border: none;
  color: #fff;
  padding: 32px 24px;
  flex-direction: row;
  justify-content: center;
  gap: 16px;
}
.module-tile-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45,74,62,0.25);
  border-color: transparent;
}
.module-tile-featured .module-tile-icon {
  font-size: 36px;
}
.module-tile-featured .module-tile-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
}
.module-tile-featured .module-tile-meta {
  color: rgba(255,255,255,0.7);
}
.module-tile-featured .module-tile-status {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.module-tile-icon {
  font-size: 28px;
  line-height: 1;
}
.module-tile-title {
  font-weight: 600;
  font-size: 15px;
}
.module-tile-meta {
  font-size: 12px;
  color: var(--muted);
}
.module-tile-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  color: var(--muted);
}
.module-tile-status[data-status="completed"] {
  background: rgba(61,139,110,0.1);
  color: var(--success);
}
.module-tile-status[data-status="in-progress"] {
  background: rgba(184,150,90,0.15);
  color: var(--gold);
}
.module-tile-status[data-status="locked"] {
  opacity: 0.5;
}

@media (max-width: 720px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px 16px 24px;
  }
  .module-tile-featured {
    flex-direction: column;
    padding: 24px 16px;
  }
  .module-tile {
    padding: 20px 12px;
    gap: 8px;
  }
  .module-tile-icon {
    font-size: 24px;
  }
  .module-tile-title {
    font-size: 14px;
  }
  .dashboard-greeting {
    padding: 24px 16px 12px;
  }
  .dashboard-greeting h1 {
    font-size: 1.8rem;
  }
  .deep-dive {
    padding: 40px 16px 60px;
  }
  .deep-dive-section.module-page {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .modules-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .module-tile {
    flex-direction: row;
    text-align: left;
    padding: 16px;
    gap: 12px;
  }
  .module-tile-featured {
    flex-direction: column;
    text-align: center;
  }
  .dashboard-greeting h1 {
    font-size: 1.5rem;
  }
  .greeting-subtitle {
    font-size: 14px;
  }
}

/* Trust Bar */
.trust-bar {
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 14px 20px;
  background: var(--bg-2);
  border-radius: var(--radius);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.trust-bar strong {
  color: var(--primary);
}

/* Module Tiles Mobile Responsive — rules merged into @720px and @480px blocks above */

/* ============================================================================
   Deep Dive Section
   ============================================================================ */

.deep-dive {
  padding: 60px 6vw 80px;
}

/* ============================================================================
   Talent Deep Dive Styles
   ============================================================================ */

.talent-deep-dive-card {
  margin-top: 0;
}

.talent-deep-dive-card .talent-header {
  margin-bottom: 16px;
}

.talent-deep-dive-card .talent-header h3 {
  margin-top: 8px;
}

/* API Key Form */
.api-key-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin: 20px 0 12px;
  flex-wrap: wrap;
}

.api-key-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.api-key-label span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.api-key-label input {
  padding: 12px 16px;
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.api-key-label input:focus {
  outline: none;
  border-color: var(--primary);
}

.api-key-status {
  font-size: 0.85rem;
  min-height: 1.2em;
}

.api-key-status.success {
  color: var(--success);
}

.api-key-status.error {
  color: var(--error);
}

/* Chat Interface */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.chat-progress {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.chat-progress span {
  color: var(--gold);
}

.topic-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all var(--transition);
}

.topic-badge.covered {
  background: rgba(45,74,62,0.12);
  color: var(--primary);
}

/* Chat Messages */
.chat-messages {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--bg-2);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.chat-message {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
}

.chat-message.assistant {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: 16px 16px 16px 4px;
  align-self: flex-start;
}

.chat-message.user {
  background: var(--accent);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  align-self: flex-end;
}

.chat-message p {
  margin-bottom: 12px;
}

.chat-message p:last-child {
  margin-bottom: 0;
}

.chat-message strong {
  color: var(--primary);
}

.chat-message.user strong {
  color: #fff;
}

.chat-message ul,
.chat-message ol {
  margin: 8px 0 8px 20px;
}

.chat-message li {
  margin-bottom: 4px;
}

.chat-message hr {
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: 16px 0;
}

/* Chat Input */
.chat-input-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input-container textarea {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-3);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 60px;
  max-height: 200px;
  transition: border-color var(--transition);
}

.chat-input-container textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-input-container textarea:disabled {
  background: var(--bg-2);
  cursor: not-allowed;
}

.chat-input-container button {
  flex-shrink: 0;
  height: 48px;
  background: var(--accent);
}

.chat-input-container button:hover {
  background: var(--accent-hover);
}

/* Report Section */
.report-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

.report-header h3 {
  margin-bottom: 4px;
}

.report-content {
  line-height: 1.8;
  max-width: 100%;
}

.report-content h1,
.report-h1 {
  font-size: 1.8rem;
  margin: 2em 0 0.8em;
  color: var(--primary);
}

.report-content h2,
.report-h2 {
  font-size: 1.4rem;
  margin: 1.8em 0 0.6em;
  color: var(--primary);
}

.report-content h3,
.report-h3 {
  font-size: 1.15rem;
  margin: 1.4em 0 0.5em;
  color: var(--ink);
}

.report-content p {
  margin-bottom: 1em;
}

.report-content ul,
.report-ul {
  list-style: disc;
  margin: 1em 0 1em 24px;
}

.report-content ol,
.report-ol {
  list-style: decimal;
  margin: 1em 0 1em 24px;
}

.report-content li,
.report-li,
.report-li-num {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

.report-content hr,
.report-hr {
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: 2em 0;
}

.report-content strong {
  color: var(--primary);
}

.report-content em {
  font-style: italic;
}

.report-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  flex-wrap: wrap;
}

/* Loading State */
#talent-loading {
  text-align: center;
  padding: 60px 20px;
}

.talent-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: talent-spin 1s linear infinite;
}

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

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

#talent-loading-message {
  color: var(--muted);
  font-size: 1rem;
}

/* Hidden state */
.hidden {
  display: none !important;
}

/* ============================================================================
   Signature Cards
   ============================================================================ */

#talent-cards-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.cards-header {
  margin-bottom: 24px;
}

.cards-header h3 {
  margin-bottom: 8px;
}

.talent-cards-error {
  color: var(--accent);
  margin-bottom: 16px;
}

.signature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.signature-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.signature-card:hover {
  box-shadow: var(--shadow-elevated);
}

.signature-card-talents {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.signature-card-energy {
  background: linear-gradient(135deg, var(--accent), #D4804A);
}

.signature-card-environment {
  background: linear-gradient(135deg, var(--muted), var(--gold));
}

.signature-card-growth {
  background: linear-gradient(135deg, var(--primary), var(--gold));
}

.signature-card-rule {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.signature-card-header {
  padding: 20px 24px 16px;
  color: #fff;
}

.signature-card-logo {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
  margin-bottom: 8px;
}

.signature-card-header h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.signature-card-content {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.95);
  min-height: 120px;
}

.signature-item {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--ink);
}

.signature-item:last-child {
  margin-bottom: 0;
}

.signature-quote {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  text-align: center;
  padding: 12px 0;
}

.signature-card-actions {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.signature-card-actions button {
  flex: 1;
  font-size: 0.85rem;
  padding: 10px 16px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .api-key-form {
    flex-direction: column;
    align-items: stretch;
  }

  .api-key-form button {
    width: 100%;
  }

  .chat-messages {
    max-height: 400px;
    padding: 16px;
  }

  .chat-message {
    max-width: 95%;
    padding: 12px 16px;
  }

  .chat-input-container {
    flex-direction: column;
  }

  .chat-input-container button {
    width: 100%;
  }

  .topic-badges {
    width: 100%;
    justify-content: flex-start;
  }

  .signature-cards-grid {
    grid-template-columns: 1fr;
  }

  .signature-card-actions {
    flex-direction: column;
  }
}

/* ============================================================================
   Auth Modal & User Menu
   ============================================================================ */

/* Auth container in header */
.auth-container {
  margin-left: 4px;
}

.auth-trigger {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-trigger:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.auth-trigger:active {
  transform: translateY(0) scale(0.98);
}

/* User menu */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  cursor: pointer;
  color: var(--bg);
  transition: all 0.2s ease;
}

.user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255,255,255,0.25);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.user-name {
  font-size: 0.9rem;
  color: var(--bg);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  min-width: 200px;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--bg-3);
  margin-bottom: 8px;
}

.user-email {
  font-size: 0.85rem;
  color: var(--muted);
}

.user-logout {
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border-radius: 0;
}

.user-logout:hover {
  background: var(--bg-2);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.dropdown-item:hover {
  background: var(--bg-2);
}

/* Auth overlay/modal */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,43,36,0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.auth-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.auth-dialog h2 {
  font-family: 'Playfair Display', Georgia, serif;
}

.auth-overlay.visible .auth-dialog {
  transform: scale(1);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.auth-close:hover {
  color: var(--ink);
}

.auth-step h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--ink);
}

.auth-desc {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  text-align: center;
}

.auth-input-group {
  margin-bottom: 20px;
}

.auth-input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.auth-input-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-input-group input::placeholder {
  color: var(--muted);
}

.auth-submit {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.auth-privacy {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.auth-hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.auth-step .secondary,
.auth-step .ghost {
  width: 100%;
  margin-top: 12px;
}

.auth-loading {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.auth-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.auth-loading p {
  color: var(--muted);
}

/* Responsive */
@media (max-width: 768px) {
  .user-name {
    display: none;
  }

  .auth-container {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .auth-dialog {
    padding: 24px;
    margin: 16px;
  }

  .auth-step h3 {
    font-size: 1.2rem;
  }
}

/* ============================================================================
   Personalization Indicator
   ============================================================================ */

.personalization-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(45, 74, 62, 0.08);
  border: 1px solid rgba(45, 74, 62, 0.2);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--ink);
}

.personalization-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 12px;
}

.personalization-badge::before {
  content: "✨";
  font-size: 0.85rem;
}

/* ============================================================================
   Button Links & Module Page Styles
   ============================================================================ */

.btn-link {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 16px;
  transition: color 0.2s ease;
}

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

.module-page {
  padding: 40px 20px;
}

.module-page .section-head {
  margin-bottom: 32px;
}

.module-intro {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.module-intro a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.module-page h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .module-page {
    padding: 24px 16px;
  }
  .module-page h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
  }
  .module-page .section-head {
    margin-bottom: 20px;
  }
}
@media (max-width: 480px) {
  .module-page h1 {
    font-size: 1.5rem;
  }
}

/* Header logo as link */
a.logo {
  text-decoration: none;
  color: inherit;
}

/* Nav links styled as ghost buttons */
nav a.ghost {
  text-decoration: none;
}

/* ============================================================================
   Deep Dive UX Improvements
   ============================================================================ */

/* Save indicator toast */
#deep-dive-save-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  z-index: 100;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

#deep-dive-save-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Topic badges with tooltip */
.topic-badge {
  position: relative;
  cursor: help;
}

.topic-badge[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  max-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  pointer-events: none;
}

.topic-badge[data-tooltip]:hover::after,
.topic-badge[data-tooltip]:focus::after {
  opacity: 1;
  visibility: visible;
}

/* Progress bar for chat */
.chat-progress-bar {
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.chat-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 0.5s ease;
}

/* Generating report state */
.generating-state {
  text-align: center;
  padding: 60px 20px;
}

.generating-state .talent-spinner {
  margin-bottom: 24px;
}

.generating-state h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.generating-state p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto;
}

.generating-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.generating-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.generating-step.active {
  color: var(--primary);
  font-weight: 600;
}

.generating-step.done {
  color: var(--success);
}

.generating-step.done::before {
  content: "✓";
  font-weight: bold;
}

.generating-step.active::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Restart confirmation dialog */
.restart-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.restart-confirm-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.restart-confirm-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.restart-confirm-overlay.visible .restart-confirm-dialog {
  transform: scale(1);
}

.restart-confirm-dialog h3 {
  margin-bottom: 12px;
  color: var(--accent);
}

.restart-confirm-dialog p {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.restart-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Mobile chat improvements */
@media (max-width: 600px) {
  .chat-messages {
    max-height: 60vh;
    padding: 12px;
  }

  .chat-message {
    max-width: 90%;
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .chat-input-container textarea {
    min-height: 50px;
    font-size: 16px; /* Prevent iOS zoom */
  }

  .chat-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .topic-badges {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .topic-badge {
    flex-shrink: 0;
  }

  .chat-progress {
    font-size: 0.85rem;
  }

  /* Hide tooltips on mobile - use tap instead */
  .topic-badge[data-tooltip]::after {
    display: none;
  }
}

/* Keyboard navigation for chat */
.chat-input-container textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Message entry animation */
.chat-message {
  animation: message-slide-in 0.3s ease-out;
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error message styling */
.chat-error {
  background: rgba(196, 101, 74, 0.1);
  border: 1px solid rgba(196, 101, 74, 0.3);
  color: var(--error);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-error::before {
  content: "⚠";
  font-size: 1.1rem;
}

.chat-error button {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* ============================================================================
   Focus-visible styles for keyboard navigation (Accessibility)
   ============================================================================ */

/* Global focus-visible styles for all interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(45, 74, 62, 0.15);
}

/* Remove default focus for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* High contrast focus for dark backgrounds */
.primary:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* Gold focus ring on dark header for visibility */
.site-header *:focus-visible {
  outline-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 150, 90, 0.3);
}

/* Bottom tab bar focus */
.bottom-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--radius-xs);
}

/* ============================================================================
   Offline Indicator
   ============================================================================ */

.offline-indicator {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--warning);
  color: var(--ink);
  padding: var(--space-md) var(--space-lg);
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.offline-indicator.visible {
  display: flex;
  transform: translateY(0);
}
@media (max-width: 767px) {
  .offline-indicator {
    bottom: 60px;
    bottom: calc(60px + env(safe-area-inset-bottom));
    font-size: 0.8rem;
    padding: 10px 16px;
  }
}

.offline-icon {
  font-size: 1.2rem;
}

/* Online indicator (shown briefly when reconnected) */
.online-indicator {
  background: linear-gradient(135deg, var(--success), var(--primary-light));
  color: #fff;
}

/* ============================================================================
   Enhanced Loading States
   ============================================================================ */

/* Button loading state */
button.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Secondary button loading */
button.secondary.loading::after,
button.ghost.loading::after {
  border: 2px solid rgba(26, 26, 26, 0.2);
  border-top-color: var(--ink);
}

/* Skeleton loading placeholder */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-2) 25%,
    var(--bg-3) 50%,
    var(--bg-2) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius);
}

/* ============================================================================
   Toast Improvements (Success/Error/Warning)
   ============================================================================ */

.success-toast {
  position: fixed;
  bottom: 80px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.success-toast.show,
.success-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.success-toast.error {
  background: var(--error);
  box-shadow: 0 8px 24px rgba(196, 101, 74, 0.3);
}

.success-toast.warning {
  background: var(--warning);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(212, 160, 74, 0.3);
}

/* ============================================================================
   Form Validation Feedback
   ============================================================================ */

.form-field {
  position: relative;
  margin-bottom: var(--space-md);
}

.form-field .validation-message {
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: 0.8rem;
  color: var(--error);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-field.invalid .validation-message {
  opacity: 1;
  transform: translateY(0);
}

.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
  border-color: var(--error);
}

.form-field.valid input,
.form-field.valid select,
.form-field.valid textarea {
  border-color: var(--success);
}

/* ============================================================================
   Screen Reader Only (for aria-live announcements)
   ============================================================================ */

.sr-only,
[aria-live="polite"].visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Profile Page
   ============================================ */

.profile-header-card {
  text-align: center;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.profile-info h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  color: var(--ink);
}

.profile-username {
  color: var(--muted);
  font-size: 0.95rem;
}

.mbti-badge {
  display: inline-flex;
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.profile-chart-container {
  display: flex;
  justify-content: center;
  padding: var(--space-lg) 0;
}

.profile-chart-container canvas {
  max-width: 100%;
  height: auto;
}

.trait-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.trait-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.trait-bar-label {
  min-width: 140px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.trait-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.trait-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 0.6s ease;
}

.trait-bar-value {
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.profile-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.profile-not-found {
  text-align: center;
  padding: var(--space-3xl);
}

.profile-not-found h2 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  color: var(--ink);
}

@media (max-width: 600px) {
  .profile-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }

  .profile-info h2 {
    font-size: 1.4rem;
  }

  .trait-bar-label {
    min-width: 100px;
    font-size: 0.8rem;
  }

  .profile-cta {
    flex-direction: column;
  }

  .profile-cta .btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   Comparison Page
   ============================================ */

.copy-link-row {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.copy-link-row .text-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--bg-2);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
}

.copy-link-row .text-input:focus {
  border-color: var(--primary);
}

.relationship-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.95rem;
}

.radio-option:hover {
  background: var(--bg-2);
}

.radio-option input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.compare-dual-chart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.compare-chart-col {
  text-align: center;
}

.compare-chart-col h4 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-bottom: var(--space-sm);
  color: var(--ink);
}

.compare-chart-col canvas {
  max-width: 100%;
  height: auto;
}

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

.compare-report-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--bg-2);
}

.compare-report-section p {
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.comparison-card {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comparison-card-info h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.comparison-card-info p {
  color: var(--muted);
  font-size: 0.9rem;
}

.comparison-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}

.comparison-status.pending {
  background: var(--gold);
  color: var(--ink);
}

.comparison-status.ready {
  background: var(--primary);
  color: #fff;
}

.comparison-status.completed {
  background: var(--success);
  color: #fff;
}

.label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

@media (max-width: 600px) {
  .compare-dual-chart {
    grid-template-columns: 1fr;
  }

  .comparison-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

/* ============================================
   Trait Distribution
   ============================================ */

.trait-percentile {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: var(--space-xs);
}

.mbti-rarity {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* ============================================
   Team Dashboard
   ============================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group .label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-group .text-input {
  padding: 10px 14px;
  border: 1px solid var(--bg-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  width: 100%;
}

.form-group .text-input:focus {
  border-color: var(--primary);
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.team-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-glow);
}

.team-card h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.team-card-meta {
  display: flex;
  gap: var(--space-md);
  color: var(--muted);
  font-size: 0.85rem;
}

.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-badge.admin {
  background: var(--accent);
  color: #fff;
}

.role-badge.member {
  background: var(--bg-2);
  color: var(--muted);
}

.team-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--ink);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mbti-distribution-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.mbti-type-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

.mbti-type-count {
  background: var(--primary);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

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

.member-card {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.member-card .profile-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.3rem;
  margin: 0 auto var(--space-sm);
}

.member-card h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.member-card .mbti-badge {
  font-size: 0.8rem;
  padding: 2px 12px;
}

.member-card-traits {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--muted);
}

.member-card-actions {
  margin-top: var(--space-md);
}

.team-composition-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.composition-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.composition-bar-label {
  min-width: 140px;
  font-weight: 600;
  font-size: 0.9rem;
}

.composition-bar-track {
  flex: 1;
  height: 12px;
  background: var(--bg-2);
  border-radius: var(--radius-pill);
  position: relative;
  overflow: hidden;
}

.composition-bar-avg {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s ease;
}

.composition-bar-value {
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.team-insights-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--bg-2);
}

.team-insights-section p {
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

@media (max-width: 600px) {
  .member-cards-grid {
    grid-template-columns: 1fr;
  }

  .composition-bar-label {
    min-width: 100px;
    font-size: 0.8rem;
  }

  .team-chart-legend {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Bottom Tab Bar ── */
.bottom-tabs {
  display: none;
}

@media (max-width: 767px) {
  .bottom-tabs {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    background: var(--surface);
    border-top: 1px solid var(--bg-3);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    transition: color 180ms ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }
  .bottom-tab.active {
    color: var(--primary);
  }
  .bottom-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 0 0 2px 2px;
  }

  .bottom-tab-icon {
    width: 20px;
    height: 20px;
  }

  /* Padding so content doesn't hide behind bottom bar */
  main {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  footer,
  .site-footer {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  .chat-input-container {
    margin-bottom: 60px;
  }
}

/* ============================================================================
   Module Page Breadcrumb
   ============================================================================ */

.module-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--bg-3);
  background: var(--bg);
}
.module-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.module-breadcrumb a:hover {
  text-decoration: underline;
}
@media (max-width: 720px) {
  .module-breadcrumb {
    padding: 10px 16px;
    font-size: 13px;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ============================================================================
   Journey Assessment — Single Question View
   ============================================================================ */

.journey-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-3);
  z-index: 1000;
  overflow: hidden;
}

.journey-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 400ms ease, background-color 600ms ease;
  position: relative;
}

.journey-progress-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2px;
  width: 20px;
  height: 8px;
  background: inherit;
  border-radius: 4px;
  filter: blur(6px);
  opacity: 0.8;
  animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.journey-viewport {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  padding: 80px 24px 60px;
  z-index: 50;
  background-color: var(--bg);
  transition: background 800ms ease;
  overflow: hidden;
}

.journey-active .journey-viewport {
  display: flex;
}

/* Trait-themed backgrounds */
.journey-viewport[data-trait="Conscientiousness"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
}
.journey-viewport[data-trait="Extraversion"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
}
.journey-viewport[data-trait="Emotional Stability"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
}
.journey-viewport[data-trait="Openness"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
}
.journey-viewport[data-trait="Agreeableness"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
}

/* Dark mode: stronger glow */
[data-theme="dark"] .journey-viewport[data-trait="Conscientiousness"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
}
[data-theme="dark"] .journey-viewport[data-trait="Extraversion"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
}
[data-theme="dark"] .journey-viewport[data-trait="Emotional Stability"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
}
[data-theme="dark"] .journey-viewport[data-trait="Openness"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
}
[data-theme="dark"] .journey-viewport[data-trait="Agreeableness"] {
  background-image: radial-gradient(ellipse at 50% 40%, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .journey-viewport[data-trait="Conscientiousness"] {
    background-image: radial-gradient(ellipse at 50% 40%, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  }
  :root:not([data-theme="light"]) .journey-viewport[data-trait="Extraversion"] {
    background-image: radial-gradient(ellipse at 50% 40%, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  }
  :root:not([data-theme="light"]) .journey-viewport[data-trait="Emotional Stability"] {
    background-image: radial-gradient(ellipse at 50% 40%, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  }
  :root:not([data-theme="light"]) .journey-viewport[data-trait="Openness"] {
    background-image: radial-gradient(ellipse at 50% 40%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  }
  :root:not([data-theme="light"]) .journey-viewport[data-trait="Agreeableness"] {
    background-image: radial-gradient(ellipse at 50% 40%, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  }
}

.journey-nav {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.journey-back {
  background: var(--surface);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius-pill);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.journey-back:hover {
  background: var(--bg-2);
  transform: translateX(-2px);
}
.journey-back:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.journey-counter {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.journey-trait-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
}

.journey-question {
  max-width: 640px;
  text-align: center;
  margin-bottom: 48px;
}

.journey-question-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

.journey-question.slide-out-left {
  animation: slideOutLeft 250ms ease forwards;
}
.journey-question.slide-in-right {
  animation: slideInRight 250ms ease forwards;
}
.journey-question.slide-out-right {
  animation: slideOutRight 250ms ease forwards;
}
.journey-question.slide-in-left {
  animation: slideInLeft 250ms ease forwards;
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-40px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

.journey-scale {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 500px;
  width: 100%;
}

.journey-scale-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: 72px;
  text-align: center;
  flex-shrink: 0;
}

.journey-options {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.journey-option {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--bg-3);
  background: var(--surface);
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
  position: relative;
  overflow: hidden;
}

.journey-option:hover {
  transform: scale(1.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(231, 111, 81, 0.2);
}

.journey-option:active {
  transform: scale(0.95);
}

.journey-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(231, 111, 81, 0.3);
}

[data-trait="Conscientiousness"] .journey-option:hover,
[data-trait="Conscientiousness"] .journey-option.selected {
  border-color: var(--trait-conscientiousness);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.25);
}
[data-trait="Conscientiousness"] .journey-option.selected {
  background: var(--trait-conscientiousness);
}

[data-trait="Extraversion"] .journey-option:hover,
[data-trait="Extraversion"] .journey-option.selected {
  border-color: var(--trait-extraversion);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}
[data-trait="Extraversion"] .journey-option.selected {
  background: var(--trait-extraversion);
}

[data-trait="Emotional Stability"] .journey-option:hover,
[data-trait="Emotional Stability"] .journey-option.selected {
  border-color: var(--trait-stability);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}
[data-trait="Emotional Stability"] .journey-option.selected {
  background: var(--trait-stability);
}

[data-trait="Openness"] .journey-option:hover,
[data-trait="Openness"] .journey-option.selected {
  border-color: var(--trait-openness);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.25);
}
[data-trait="Openness"] .journey-option.selected {
  background: var(--trait-openness);
}

[data-trait="Agreeableness"] .journey-option:hover,
[data-trait="Agreeableness"] .journey-option.selected {
  border-color: var(--trait-agreeableness);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.25);
}
[data-trait="Agreeableness"] .journey-option.selected {
  background: var(--trait-agreeableness);
}

.journey-option .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple-expand 500ms ease forwards;
  pointer-events: none;
}

@keyframes ripple-expand {
  to { transform: scale(2.5); opacity: 0; }
}

.journey-interlude {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  animation: fadeIn 400ms ease;
}

.journey-interlude.hidden {
  display: none;
}

.journey-interlude-content {
  text-align: center;
}

.journey-interlude-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: interlude-bounce 600ms ease;
}

@keyframes interlude-bounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.journey-interlude-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.journey-interlude-trait {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 600px) {
  .journey-scale {
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
  }
  .journey-scale-label {
    display: none;
  }
  .journey-options {
    gap: 8px;
  }
  .journey-option {
    width: 48px;
    height: 48px;
    font-size: 14px;
  }
  .journey-nav {
    top: 16px;
    left: 16px;
    right: 16px;
  }
  .journey-viewport {
    padding: 60px 16px 40px;
  }
}

.journey-active .section-head,
.journey-active #assessment-form:not(.hidden),
.journey-active .progress,
.journey-active .section-steps {
  display: none;
}

/* When journey is active, hide elements behind the full-screen viewport */
.journey-active ~ .results,
.journey-active ~ .site-footer {
  display: none;
}
body:has(.journey-active) > .site-header {
  display: none;
}

/* ============================================================================
   Results Reveal Animation
   ============================================================================ */

.results-reveal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 200;
}

.results-reveal-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(20px, 4vw, 28px);
  color: var(--ink);
  margin-bottom: 24px;
}

.results-reveal-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.trait-card-reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 500ms ease forwards;
}
.trait-card-reveal:nth-child(1) { animation-delay: 200ms; }
.trait-card-reveal:nth-child(2) { animation-delay: 350ms; }
.trait-card-reveal:nth-child(3) { animation-delay: 500ms; }
.trait-card-reveal:nth-child(4) { animation-delay: 650ms; }
.trait-card-reveal:nth-child(5) { animation-delay: 800ms; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

.mbti-badge-reveal {
  opacity: 0;
  transform: scale(0.8);
  animation: badgePop 400ms ease forwards;
  animation-delay: 1000ms;
}

@keyframes badgePop {
  0% { opacity: 0; transform: scale(0.8); }
  60% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
