/* ==========================================================================
   COREN33 - CLEAN HUMAN DESIGN SYSTEM & THEME ENGINE
   Dual Theme Support: Modern Light (16personalities style) & Dark Mode
   Full Mobile Responsive with Hamburger Navigation
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

/* --- LIGHT THEME (Default) --- */
:root, [data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-glass: rgba(15, 23, 42, 0.03);
  
  --border-light: #e2e8f0;
  --border-active: #4f46e5;

  /* Archetype Group Accent Colors */
  --color-strategist: #4f46e5;
  --color-innovator: #059669;
  --color-leader: #e11d48;
  --color-mentor: #7c3aed;
  --color-integrator: #0284c7;

  /* Text Colors */
  --text-heading: #0f172a;
  --text-body: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;

  --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --navbar-bg: rgba(255, 255, 255, 0.88);
}

/* --- DARK THEME --- */
[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-surface: #131927;
  --bg-surface-elevated: #1a2235;
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: #6366f1;

  --text-heading: #ffffff;
  --text-body: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.6);
  --navbar-bg: rgba(11, 15, 25, 0.88);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #e11d48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation Bar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
  transition: background-color 0.3s ease;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-heading);
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
}

.logo-badge {
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #4f46e5;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: 'Space Grotesk', monospace;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-heading);
  background: var(--bg-glass);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  border-color: var(--border-active);
}

/* Hamburger Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
  border: none;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-heading);
  border: 1px solid var(--border-light);
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--text-dim);
}

/* --- Hero Section --- */
.hero-section {
  padding: 4.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.2rem;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 50px;
  color: #4f46e5;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.4rem;
}

.hero-subtitle {
  font-size: 1.18rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Hero Showcase Card */
.hero-showcase {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: all 0.3s ease;
}

.hero-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #059669, #e11d48, #7c3aed);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.showcase-avatar-box {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.2rem;
}

.avatar-svg {
  width: 100%;
  height: 100%;
}

.showcase-title {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 0.3rem;
}

.showcase-tagline {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 1.8rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

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

.stat-number {
  font-size: 2.3rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--text-heading);
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.app-section {
  padding: 4.5rem 0;
}

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

/* --- Quiz Module --- */
.quiz-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 3rem;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.quiz-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-family: 'Space Grotesk', monospace;
}

.question-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.35;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  color: var(--text-heading);
  text-align: left;
  font-size: 1.02rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.option-btn:hover {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.05);
  transform: translateX(6px);
}

.option-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', monospace;
  flex-shrink: 0;
}

/* --- Results Section --- */
.results-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 3.5rem;
  box-shadow: var(--shadow-card);
}

.results-header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: #059669;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  font-family: 'Space Grotesk', monospace;
}

.result-type-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.result-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.radar-chart-container {
  position: relative;
  width: 100%;
  height: 340px;
}

/* Trait Vector Gauges */
.vector-gauges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.gauge-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
}

.gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.gauge-bar {
  height: 6px;
  background: var(--bg-main);
  border-radius: 10px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  background: #4f46e5;
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
  margin-bottom: 2.2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-heading);
  background: var(--bg-glass);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.detail-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.detail-box h4 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-heading);
}

.steps-list {
  list-style-type: none;
  counter-reset: step-counter;
  margin-top: 1.2rem;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2.8rem;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid #4f46e5;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: 'Space Grotesk', monospace;
}

/* --- Catalog Grid --- */
.catalog-controls {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 0.9rem 1.6rem;
  border-radius: 50px;
  color: var(--text-heading);
  font-size: 0.98rem;
  font-family: inherit;
  width: 340px;
  max-width: 100%;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
}

.filter-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.65rem 1.3rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(79, 70, 229, 0.1);
  border-color: #4f46e5;
  color: #4f46e5;
}

.psychotypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.pt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pt-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-active);
}

.pt-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.pt-avatar-box {
  width: 65px;
  height: 65px;
  background: var(--bg-surface-elevated);
  border-radius: 16px;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-code-badge {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
}

.pt-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.pt-card-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.pt-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1.2rem;
  margin-top: auto;
}

.pt-group-tag {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Consultant & HR Module --- */
.consultant-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 3.5rem;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-label {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-heading);
}

.form-control, .form-select {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  padding: 1rem 1.4rem;
  border-radius: 14px;
  color: var(--text-heading);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
}

.form-control:focus, .form-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
}

textarea.form-control {
  min-height: 130px;
  resize: vertical;
}

/* Printable Report Preview Box */
.report-preview-box {
  background: #ffffff;
  color: #0f172a;
  padding: 3.5rem;
  border-radius: 20px;
  margin-top: 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.report-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.8rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.report-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #4f46e5;
}

.report-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #4f46e5;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.4rem;
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  width: 100%;
  max-width: 940px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  box-shadow: var(--shadow-hover);
  -webkit-overflow-scrolling: touch;
}

.modal-close-btn {
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--bg-glass);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 0;
  margin-top: 6rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  text-align: center;
}

/* --- Psychotype Full Page --- */
.pt-page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2rem 2.5rem 2.5rem;
  box-shadow: var(--shadow-card);
  max-width: 960px;
  margin: 0 auto;
}

.pt-page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pt-page-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pt-page-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.pt-page-hero-left {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.pt-page-avatar {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 0.5rem;
  border-top: 3px solid var(--pt-accent, #4f46e5);
}

.pt-page-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-top: 0.35rem;
  line-height: 1.15;
}

.pt-page-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.35rem;
}

.pt-page-super {
  margin-top: 0.75rem;
  font-size: 0.98rem;
}

.pt-page-vectors {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: center;
}

.pt-page-para {
  margin-bottom: 0.85rem;
  line-height: 1.7;
  color: var(--text-body);
}

.pt-page-para:last-child {
  margin-bottom: 0;
}

.pt-tab-pane {
  display: none;
}

.pt-tab-pane.active {
  display: block;
}

.pt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pt-chip {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.22);
  color: #4f46e5;
}

.pt-chip-hr {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.22);
  color: #e11d48;
}

.pt-chip-career {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

.pt-list {
  padding-left: 1.2rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.pt-list li {
  margin-bottom: 0.35rem;
}

.pt-dialogue-lines {
  margin-top: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--border-active);
}

.pt-dialogue-line {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.45rem;
  color: var(--text-body);
}

.pt-dialogue-line:last-child {
  margin-bottom: 0;
}

.pt-plan14 li {
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.pt-page-tabs {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pt-supp-disclaimer {
  border-color: rgba(217, 119, 6, 0.35) !important;
  background: rgba(245, 158, 11, 0.06);
}

.pt-supp-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.pt-supp-item {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface-elevated);
}

.pt-supp-name {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}

.pt-supp-aim {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-body);
}

.pt-supp-note {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pt-supp-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pt-supp-mode-label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-heading);
}

.pt-supp-toggle {
  display: inline-flex;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.pt-supp-toggle-btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.pt-supp-toggle-btn.active {
  background: #4f46e5;
  color: #fff;
}

.pt-supp-toggle-btn:not(.active):hover {
  color: var(--text-heading);
  background: rgba(79, 70, 229, 0.08);
}

.pt-supp-mode-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.pt-supp-mode-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.35rem;
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.25);
}

/* --- Cabinet --- */
.cabinet-user-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.cabinet-plan-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.cabinet-plan-badge.is-pro {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.35);
}

.cabinet-run-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.cabinet-run-card:last-child {
  border-bottom: none;
}

.cabinet-run-title {
  font-weight: 800;
  color: var(--text-heading);
  font-size: 1.02rem;
}

.cabinet-run-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.cabinet-run-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.save-result-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  padding: 0.85rem 1rem;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
}

.save-result-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 600;
  color: var(--text-heading);
}

@media (max-width: 768px) {
  .nav-cta-btn#nav-cabinet-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .pt-page-card { padding: 1.25rem; }
  .pt-page-hero { grid-template-columns: 1fr; }
  .pt-page-title { font-size: 1.75rem; }
  .pt-page-hero-left { flex-direction: column; }
}

/* --- Mega Diagnostics Hub --- */
.mega-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.mega-hub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-card);
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.mega-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-active);
}

.mega-hub-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(225, 29, 72, 0.06));
  border-color: rgba(79, 70, 229, 0.25);
  min-height: 140px;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.mega-hub-featured .mega-hub-emoji {
  font-size: 3rem;
}

.mega-hub-emoji {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.mega-hub-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.mega-hub-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
}

.mega-hub-meta {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--border-active);
  font-family: 'Space Grotesk', sans-serif;
}

.mega-resume-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(79, 70, 229, 0.3);
  background: rgba(79, 70, 229, 0.06);
  margin-bottom: 1.5rem;
}

.mega-legal-note {
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.quiz-module-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  font-family: 'Space Grotesk', sans-serif;
}

.mega-block + .mega-block {
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .mega-hub-featured {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Screen: hide print-only blocks */
.print-only {
  display: none !important;
}

.quiz-meta {
  position: relative;
}

.quiz-exit-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.quiz-exit-btn:hover {
  color: var(--text-heading);
  border-color: var(--border-active);
  background: var(--bg-surface-elevated);
}

.nav-link.active {
  color: var(--border-active);
  font-weight: 700;
}

/* Print Overrides */
@media print {
  .no-print {
    display: none !important;
  }

  /* Default: print consultant report if marked */
  body.printing-report * {
    visibility: hidden;
  }
  body.printing-report .report-preview-box,
  body.printing-report .report-preview-box * {
    visibility: visible;
  }
  body.printing-report .report-preview-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    padding: 0;
  }

  /* Results / Mega passport PDF */
  body.printing-results * {
    visibility: hidden;
  }
  body.printing-results .results-card,
  body.printing-results .results-card *,
  body.printing-results #mega-results-card,
  body.printing-results #mega-results-card *,
  body.printing-results .pt-page-card,
  body.printing-results .pt-page-card * {
    visibility: visible;
  }
  body.printing-results .results-card,
  body.printing-results #mega-results-card,
  body.printing-results .pt-page-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    border: none;
    padding: 0;
  }
  body.printing-results .pt-tab-pane {
    display: none !important;
  }
  body.printing-results .pt-print-all {
    display: block !important;
    visibility: visible !important;
  }
  body.printing-results .pt-print-all * {
    visibility: visible !important;
  }
  body.printing-results .print-only {
    display: block !important;
    visibility: visible !important;
  }
  body.printing-results .print-only * {
    visibility: visible !important;
  }
  body.printing-results .radar-chart-container {
    break-inside: avoid;
  }
  body.printing-results .tab-pane {
    display: none !important;
  }
  body.printing-results .tabs-nav {
    display: none !important;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE — Full iPhone / Android Support
   ========================================================================== */

@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 200;
    padding: 2rem;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-link {
    font-size: 1.3rem;
    padding: 1rem 2rem;
  }

  .hamburger-btn {
    display: flex;
  }

  .nav-cta-btn {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-badge {
    justify-content: center;
  }

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

@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .section-title { font-size: 2rem; }
  .result-type-title { font-size: 2rem; }
  
  .quiz-card, .results-card, .consultant-card, .modal-content {
    padding: 1.5rem;
    border-radius: 18px;
  }
  
  .catalog-controls { flex-direction: column; }
  .search-input { width: 100%; }
  
  .psychotypes-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  
  .pt-card { padding: 1.5rem; }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat-card { padding: 1.2rem; }
  .stat-number { font-size: 1.8rem; }

  .vector-gauges-grid {
    grid-template-columns: 1fr;
  }

  .report-preview-box { padding: 1.5rem; }

  .detail-box { padding: 1.2rem; }

  .hero-showcase { padding: 1.5rem; }

  /* Fix comparison grid on mobile */
  #comparison-results-grid {
    grid-template-columns: 1fr !important;
  }

  .modal-content {
    max-height: 95vh;
    padding: 1.5rem;
    border-radius: 18px;
    margin: 0.5rem;
  }
  
  .modal-close-btn {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }

  .tabs-nav {
    gap: 0.4rem;
    padding-bottom: 0.6rem;
  }

  .tab-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
  }

  .question-title { font-size: 1.25rem; }
  
  .option-btn {
    padding: 1rem;
    font-size: 0.95rem;
    gap: 0.8rem;
  }

  .filter-buttons {
    gap: 0.4rem;
  }

  .filter-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }

  .app-section { padding: 3rem 0; }
  .hero-section { padding: 2.5rem 0 2rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: 1.8rem; }
  .section-title { font-size: 1.6rem; }
  .result-type-title { font-size: 1.6rem; }
  .logo { font-size: 1.3rem; gap: 0.5rem; }
  .logo-badge { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary, .btn-secondary {
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.8rem;
  }
}
