:root {
  --bg: #FAF9F6;
  --card: #FFFFFF;
  --primary: #6B9E78;
  --primary-light: #EBF4EE;
  --accent: #C4917A;
  --text: #2C2C2C;
  --text-muted: #6E6E6E;
  --border: #E8E2D9;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --transition: 0.3s ease;
  --secure-color: #6B9E78;
  --anxious-color: #D97757;
  --dismissive-color: #5B8CB5;
  --fearful-color: #9370B8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', 'Noto Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Lora', serif; line-height: 1.3; }

/* ── Language Switcher ── */
.lang-switcher { position: fixed; top: 20px; right: 20px; z-index: 1000; }

.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 8px 16px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--text); cursor: pointer; box-shadow: var(--shadow);
  transition: var(--transition);
}
.lang-btn:hover { background: var(--primary-light); }

.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; display: none; min-width: 180px;
}
.lang-dropdown.open { display: block; }

.lang-option {
  padding: 10px 16px; cursor: pointer; font-size: 14px;
  transition: background var(--transition);
  display: flex; align-items: center; gap: 10px;
}
.lang-option:hover { background: var(--primary-light); }
.lang-option.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }

/* ── Hero ── */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 24px 60px; text-align: center;
  max-width: 680px; margin: 0 auto;
}

.site-logo {
  font-family: 'Lora', serif; font-size: 26px; font-weight: 600;
  color: var(--primary); margin-bottom: 48px;
  display: flex; align-items: center; gap: 8px;
}
.logo-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; }

.hero-sub {
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--primary); margin-bottom: 18px;
}
.hero-title { font-size: clamp(30px, 6vw, 50px); font-weight: 500; color: var(--text); margin-bottom: 18px; }
.hero-title em { font-style: italic; color: var(--primary); }
.hero-desc { font-size: 17px; color: var(--text-muted); margin-bottom: 36px; max-width: 500px; }

/* ── Disclaimer ── */
.disclaimer {
  background: #FFFBEB; border: 1px solid #FCD34D;
  border-radius: 12px; padding: 16px 20px; margin-bottom: 36px;
  text-align: left; max-width: 560px; width: 100%;
}
.disclaimer strong { display: block; font-size: 15px; margin-bottom: 6px; color: #6B5500; }
.disclaimer p { font-size: 14px; color: #78650A; line-height: 1.65; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: white; border: none;
  border-radius: 50px; padding: 15px 38px;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 16px rgba(107,158,120,0.35);
}
.btn-primary:hover { background: #5a8a67; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(107,158,120,0.45); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 50px; padding: 11px 26px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.btn-secondary:hover { background: var(--border); color: var(--text); }

.hero-meta {
  display: flex; align-items: center; gap: 20px; margin-top: 18px;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap; justify-content: center;
}

/* ── Quiz ── */
#quiz {
  display: none; min-height: 100vh; padding: 40px 24px;
  max-width: 660px; margin: 0 auto;
  flex-direction: column; align-items: center; justify-content: center;
}
#quiz.active { display: flex; }

.quiz-top { width: 100%; margin-bottom: 28px; text-align: center; }
.quiz-logo { font-family: 'Lora', serif; font-size: 20px; color: var(--primary); margin-bottom: 22px; }

.progress-bar { width: 100%; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.4s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.question-card {
  width: 100%; background: var(--card); border-radius: var(--radius);
  padding: 40px 36px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.q-number { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.q-text { font-family: 'Lora', serif; font-size: 21px; font-weight: 500; color: var(--text); margin-bottom: 32px; line-height: 1.5; }

.answer-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

.answer-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border: 2px solid var(--border);
  border-radius: 12px; padding: 13px 16px;
  cursor: pointer; transition: var(--transition);
  font-family: 'Nunito', sans-serif; text-align: left; width: 100%;
}
.answer-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.answer-btn.selected { border-color: var(--primary); background: var(--primary-light); }

.answer-num {
  width: 28px; height: 28px; min-width: 28px; background: var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-muted); transition: var(--transition);
}
.answer-btn.selected .answer-num { background: var(--primary); color: white; }
.answer-label { font-size: 15px; font-weight: 500; color: var(--text); }

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

.inline-warn {
  font-size: 13px; color: #B45309; background: #FFFBEB;
  border: 1px solid #FCD34D; border-radius: 8px; padding: 8px 14px;
  margin-bottom: 14px; display: none;
}

/* ── Results ── */
#results { display: none; padding: 0 24px 80px; max-width: 760px; margin: 0 auto; }
#results.active { display: block; }

.results-top { text-align: center; padding-top: 60px; margin-bottom: 36px; }
.results-logo { font-family: 'Lora', serif; font-size: 20px; color: var(--primary); margin-bottom: 28px; }

.style-badge {
  display: inline-block; padding: 5px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 14px;
}
.style-title { font-size: clamp(26px, 5vw, 40px); font-weight: 500; margin-bottom: 12px; }
.style-tagline { font-size: 17px; color: var(--text-muted); font-style: italic; margin-bottom: 28px; }

.results-note {
  background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 10px;
  padding: 12px 18px; font-size: 13px; color: #78650A; margin-bottom: 36px;
}

/* ── Download Button ── */
.btn-download {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--card); border: 2px solid var(--primary);
  border-radius: 14px; padding: 14px 22px;
  text-decoration: none; transition: var(--transition);
  box-shadow: 0 2px 12px rgba(107,158,120,0.15);
  margin-bottom: 8px;
}
.btn-download:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(107,158,120,0.25); }
.btn-download-icon {
  width: 40px; height: 40px; background: var(--primary); color: white;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.btn-download span { display: flex; flex-direction: column; gap: 2px; }
.btn-download-title { font-size: 15px; font-weight: 700; color: var(--text); }
.btn-download-sub   { font-size: 12px; color: var(--text-muted); }

/* ── 2D Map ── */
.plot-card {
  background: var(--card); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow); border: 1px solid var(--border);
  margin-bottom: 24px;
}
.plot-card-title { text-align: center; font-size: 15px; font-weight: 600; margin-bottom: 20px; }
.plot-wrap { display: flex; justify-content: center; }
.plot-wrap svg { max-width: 100%; height: auto; }
.plot-note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* ── Score Row ── */
.scores-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.score-card { background: var(--card); border-radius: 12px; padding: 20px; border: 1px solid var(--border); text-align: center; }
.score-lbl { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.score-val { font-family: 'Lora', serif; font-size: 34px; font-weight: 500; }
.score-max { font-size: 15px; color: var(--text-muted); }

/* ── Tabs ── */
.tab-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 32px; }
.tab-btns { display: flex; background: var(--border); padding: 4px; }
.tab-btn {
  flex: 1; padding: 9px 8px; border: none; background: transparent;
  border-radius: 8px; font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.tab-btn.active { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.tab-pane { background: var(--card); padding: 28px; display: none; }
.tab-pane.active { display: block; }

/* ── Tab Content ── */
.tab-text { font-size: 15px; color: var(--text-muted); line-height: 1.75; margin-bottom: 16px; }
.belief-card {
  background: var(--primary-light); border-left: 4px solid var(--primary);
  border-radius: 8px; padding: 14px 18px; font-size: 15px; font-style: italic;
  color: var(--text); margin-bottom: 20px;
}
.tab-h { font-size: 16px; font-weight: 700; color: var(--text); margin: 22px 0 10px; }
.tab-h:first-child { margin-top: 0; }

.exercise-list { display: flex; flex-direction: column; gap: 12px; }
.ex-item { background: var(--bg); border-radius: 10px; padding: 16px; border: 1px solid var(--border); }
.ex-goal { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin-bottom: 5px; }
.ex-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ex-desc { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  width: 30px; height: 30px; min-width: 30px; background: var(--primary);
  color: white; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700;
}
.step-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.step-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.res-section { margin-bottom: 26px; }
.res-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.res-list { display: flex; flex-direction: column; gap: 8px; }
.res-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg); border-radius: 10px; padding: 12px 14px; border: 1px solid var(--border);
}
.res-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.res-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.res-meta { font-size: 13px; color: var(--text-muted); }
.res-link { text-decoration: none; cursor: pointer; transition: var(--transition); }
.res-link:hover { border-color: var(--primary); background: var(--primary-light); }
.res-link:hover .res-name { color: var(--primary); }
.res-arrow { font-size: 14px; color: var(--text-muted); margin-left: auto; align-self: center; padding-left: 8px; }

/* ── All Styles Grid ── */
.all-styles { margin-top: 40px; }
.all-styles-h { font-family: 'Lora', serif; font-size: 22px; font-weight: 500; text-align: center; margin-bottom: 20px; }
.styles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.style-mini { background: var(--card); border-radius: 12px; padding: 18px; border: 1px solid var(--border); }
.style-mini-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.style-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.style-mini-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.you-tag { font-size: 11px; font-weight: 700; color: var(--primary); margin-left: 2px; }

/* ── Retake ── */
.retake-section { text-align: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.retake-text { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }

/* ── Animation ── */
.fade-in { animation: fadeIn 0.45s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ── */
@media (max-width: 600px) {
  .question-card { padding: 24px 18px; }
  .q-text { font-size: 18px; }
  .styles-grid { grid-template-columns: 1fr; }
  .tab-btn { font-size: 12px; padding: 8px 6px; }
  .hero-meta { gap: 12px; }
}
