:root {
  --brand: #26344a;
  --brand-light: #3a4d6b;
  --brand-lighter: #e8ecf1;
  --accent: #4f8cff;
  --bg: #26344a;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #5a6578;
  --border: #dde3ea;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
  --green: #6ee7b7;
  --lime: #bef264;
  --yellow: #fde68a;
  --orange: #fdba74;
  --red: #fca5a5;
  --red-strong: #f87171;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; max-width: 100vw; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===================== LAYOUT ===================== */
.page-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 10px 40px;
  overflow-x: hidden;
}

/* Centered narrow sections */
.section:not(#results) .card,
#intro .card,
#mode-select .card,
#relationship .card,
#quiz .card,
#loading .card {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Center the form vertically for non-results sections */
.section:not(#results) {
  display: none;
  min-height: calc(100vh - 80px);
  align-items: center;
  justify-content: center;
}
.section:not(#results).active {
  display: flex;
}

/* Results wrapper */
#results .results-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.site-header { text-align: center; padding: 16px 0 8px; }
.header-logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 4px;
}
.logo-img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
.header-logo-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
}
.gdpr-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.section { display: none; animation: fadeIn .35s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 14px;
  margin-bottom: 12px;
  max-width: 100%;
}
.card.center { text-align: center; }

h1 { font-size: 22px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
h2 { font-size: 18px; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
h3 { font-size: 16px; font-weight: 700; color: var(--brand); margin-bottom: 12px; }
.subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 14px; }
.description { color: var(--text-secondary); font-size: 14px; margin-bottom: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 12px; padding: 10px 18px; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: background .2s ease;
  text-decoration: none;
  gap: 8px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-light); }
.btn-secondary { background: var(--brand-lighter); color: var(--brand); }
.btn-secondary:hover { background: #dce3eb; }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 10px 14px; }
.btn-ghost:hover { color: var(--brand); background: var(--brand-lighter); }
.btn-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn-large { padding: 14px 28px; font-size: 15px; border-radius: 14px; }

.disclaimer, .disclaimer-small { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.disclaimer-small { margin-top: 14px; }

/* ===================== INTRO CARD ===================== */
.intro-card {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.intro-card-inner {
  padding: 32px 16px 28px;
  text-align: center;
}

/* Pills Carousel */
.pills-carousel-wrap {
  position: relative;
  margin: 0 0 20px;
  overflow: hidden;
  max-width: 100%;
}
.pills-track {
  display: flex;
  gap: 8px;
  padding: 4px 20px;
  animation: scrollPills 30s linear infinite;
  width: max-content;
}
.pills-track:hover {
  animation-play-state: paused;
}
@keyframes scrollPills {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.pills-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  pointer-events: none;
  z-index: 2;
}
.pills-fade-left {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}
.pills-fade-right {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.intro-card-inner .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-lighter);
  border: 1px solid var(--border);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.intro-card-inner .pill i { font-size: 11px; opacity: 0.7; }

.intro-card-inner h1 {
  color: var(--brand);
  font-size: 24px;
  margin-bottom: 6px;
}
.intro-card-inner .subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}
.intro-card-inner .description {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.intro-card-inner .feature-bullets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 100%;
  margin: 0 auto 24px;
  text-align: center;
}
@media (max-width: 768px) {
  .intro-card-inner .feature-bullets {
    display: none;
  }
}
.intro-card-inner .bullet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 16px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.intro-card-inner .bullet i {
  color: var(--brand);
  font-size: 20px;
}

.intro-card-inner .btn-primary {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.intro-card-inner .btn-primary:hover {
  background: var(--brand-light);
}
.intro-card-inner .btn-ghost {
  color: var(--text-secondary);
  margin-top: 6px;
}
.intro-card-inner .btn-ghost:hover {
  color: var(--brand);
  background: var(--brand-lighter);
}
.intro-card-inner .disclaimer-small {
  color: var(--text-secondary);
  opacity: 0.7;
  max-width: 420px;
  margin: 14px auto 0;
}
.intro-card-inner .disclaimer-small i { margin-right: 4px; }

.gdpr-intro-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-lighter);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.gdpr-intro-notice i {
  color: var(--brand);
  font-size: 13px;
}
.gdpr-intro-notice a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
}

.intro-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px;
}
.intro-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-lighter);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
}
.intro-icon-ring::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.5;
  animation: ringPulse 2.5s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.08); opacity: 0.7; }
}
.intro-icon-ring.small {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}
.intro-icon {
  font-size: 28px;
  color: var(--brand);
}
.intro-icon-ring.small .intro-icon {
  font-size: 24px;
}

/* Step badge */
.step-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-lighter);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.btn-back {
  margin-top: 16px;
  display: inline-flex;
  position: relative;
  z-index: 10;
}

/* Email Gate Overlay */
.email-gate {
  position: fixed;
  inset: 0;
  background: rgba(38, 52, 74, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.email-gate.hidden {
  display: none;
}
.email-gate-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.email-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease;
  font-family: inherit;
}
.email-input:focus {
  border-color: var(--accent);
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
.consent-label a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
}
.consent-label a:hover {
  color: var(--brand-light);
}
.results-wrapper.blur {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  max-width: 100%;
  overflow-x: hidden;
}

/* Prevent dev tools / inspect element bypass */
.results-wrapper.blur * {
  filter: blur(10px) !important;
}

/* Preview cards - visible behind blur */
.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.preview-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 10px;
  text-align: center;
  opacity: 0.6;
}
.preview-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 16px;
  color: var(--brand);
}
.preview-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}
.preview-bar {
  height: 6px;
  background: var(--brand-lighter);
  border-radius: 999px;
  overflow: hidden;
}
.preview-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0.5;
}

/* Hide preview cards when unlocked */
.results-wrapper:not(.blur) .preview-cards {
  display: none;
}

.btn-home-reset {
  background: #fff;
  color: var(--brand);
  border: 2px solid var(--brand);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
}
.btn-home-reset:hover {
  background: var(--brand);
  color: #fff;
}

/* Mode Selection Cards */
.mode-options {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.mode-card {
  flex: 1 1 160px;
  max-width: 260px;
  padding: 20px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}
.mode-card:hover {
  border-color: var(--brand);
  background: #f8fafc;
}
.mode-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 20px;
  color: var(--brand);
}
.mode-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}
.mode-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===================== QUIZ ===================== */
.quiz-card {
  padding: 20px 14px 18px;
  width: 100%;
  max-width: 720px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

/* Boost Toast */
.boost-toast {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: none;
  transition: all .4s ease;
  pointer-events: none;
  z-index: 100;
}
.boost-toast.show {
  opacity: 1;
}
.boost-toast i { font-size: 13px; }

.progress-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
#progress-text { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

/* Progress Segments */
.progress-segments {
  display: flex;
  gap: 4px;
  width: 100%;
}
.segment-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.segment {
  height: 5px;
  background: var(--brand-lighter);
  border-radius: 999px;
  overflow: hidden;
}
.segment-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width .4s ease;
  width: 0%;
}
.seg-label {
  font-size: 9px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

#question-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#question-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.45;
  min-height: 46px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  font-size: 14px;
  color: var(--text);
  min-height: 46px;
}
.option:hover { border-color: var(--brand-light); background: #f8fafc; }
.option.selected { border-color: var(--brand); background: #f0f4fa; }
.option .radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease;
}
.option.selected .radio { border-color: var(--brand); }
.option.selected .radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  display: block;
}
.quiz-nav { display: flex; justify-content: space-between; margin-top: 16px; }

/* ===================== LOADING ===================== */
.loading-card { padding: 40px 24px; }
.spinner-ring {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.spinner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  animation: bounce 1.4s infinite ease-in-out both;
}
.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
  0%, 80%, 100% { opacity: 0.5; }
  40% { opacity: 1; }
}
.loading-text { color: var(--text-secondary); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.loading-sub { color: var(--text-secondary); font-size: 12px; opacity: 0.7; }

/* ===================== RESULTS LAYOUT ===================== */
.results-wrapper { animation: fadeIn .5s ease; overflow-x: hidden; max-width: 100%; }

/* Hero: Wellness Score */
.results-hero {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 12px 22px;
  margin-bottom: 12px;
  text-align: center;
  max-width: 100%;
  overflow-x: hidden;
}
.wellness-gauge-wrap { position: relative; max-width: 260px; margin: 0 auto; text-align: center; padding-bottom: 48px; }
.wellness-score { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; }
.wellness-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-top: 10px; }
.wellness-msg {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 12px auto 0;
  line-height: 1.6;
}

/* Pie Charts Row - MOBILE: 1 column */
.pies-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
  max-width: 100%;
}
.pie-box {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pie-box h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pie-chart-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.pie-avg {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Main Grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}
.radar-card .chart-wrap {
  margin: 0 auto;
}
.results-grid .card {
  margin-bottom: 12px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.results-grid .card:last-child {
  margin-bottom: 0;
}
.results-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Radar Card Layout */
.radar-card .radar-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Chart */
.chart-wrap { max-width: 200px; margin: 0 auto; overflow-x: hidden; }

/* Radar Side (legend + summary) */
.radar-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Radar Legend */
.radar-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Radar Summary */
.radar-summary {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.summary-line {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.5;
}
.summary-line:last-child {
  margin-bottom: 0;
}
.summary-line i {
  margin-right: 4px;
}

/* Domain Bars */
.domain-bar { margin-bottom: 14px; }
.domain-bar:last-child { margin-bottom: 0; }
.domain-bar .bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; gap: 8px; }
.domain-bar .bar-label span:first-child { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-bar .bar-label span:last-child { flex-shrink: 0; }
.domain-bar .bar-track { height: 8px; background: var(--brand-lighter); border-radius: 999px; position: relative; overflow: visible; }
.domain-bar .bar-fill { height: 100%; border-radius: 999px; position: relative; }
.domain-bar .bar-avg { position: absolute; top: -3px; width: 3px; height: 14px; background: #9aa5b8; border-radius: 2px; }

/* ADHD */
.adhd-badge { display: inline-block; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; margin-bottom: 6px; }

/* Attachment */
.attachment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.attachment-cell {
  padding: 12px; border-radius: 10px; border: 2px solid var(--border); text-align: center;
  font-size: 13px; color: var(--text-secondary); background: #f8fafc;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.attachment-cell.active { border-color: var(--brand); background: #f0f4fa; color: var(--brand); font-weight: 700; }
.attachment-cell .att-title { font-weight: 700; margin-bottom: 4px; font-size: 12px; }

/* Communication */
.comm-bar { margin-bottom: 8px; }
.comm-bar .bar-track { height: 8px; background: var(--brand-lighter); border-radius: 999px; position: relative; }
.comm-bar .bar-fill { height: 100%; border-radius: 999px; }

/* Tips & Resources */
.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.tip-item:last-child {
  margin-bottom: 0;
}
.tip-item i {
  color: var(--brand);
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}
.tip-item strong {
  color: var(--brand);
}

/* Results Action Buttons */
.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.results-actions .btn {
  min-width: 180px;
}

/* Crisis Banner */
.crisis-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 16px;
  text-align: center;
}
.crisis-inner p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #991b1b;
}
.crisis-helplines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.crisis-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #dc2626;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #fecaca;
  transition: all 0.2s;
}
.crisis-line:hover {
  background: #dc2626;
  color: #fff;
}
.crisis-note {
  font-size: 11px !important;
  color: #b91c1c !important;
  margin: 0 !important;
}

/* Footer Disclaimer */
.results-footer {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 14px;
  margin-top: 12px;
  text-align: center;
  max-width: 100%;
  overflow-x: hidden;
}
.results-footer .disclaimer {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.results-footer #btn-restart {
  margin-top: 16px;
}

/* ===================== SITE FOOTER ===================== */
.site-footer {
  background: var(--brand);
  color: #fff;
  padding: 40px 20px 24px;
  margin-top: 40px;
  text-align: center;
}
.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}
.footer-logo-link {
  display: inline-block;
  margin-bottom: 12px;
  text-decoration: none;
}
.footer-logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  text-transform: uppercase;
}
.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.footer-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color .2s ease;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-gdpr {
  margin-bottom: 16px;
}
.gdpr-badge-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.footer-cookies {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}
.footer-cookies a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}
.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 16px;
}

/* ===================== COOKIE BANNER ===================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  padding: 16px;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform .4s ease;
}
.cookie-banner.show {
  transform: translateY(0);
}
.cookie-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cookie-text p {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.5;
}
.cookie-text p:first-child {
  font-weight: 600;
  margin-bottom: 6px;
}
.cookie-text a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.cookie-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
}

@media (min-width: 481px) {
  .site-footer {
    padding: 48px 24px 32px;
    margin-top: 48px;
  }
  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-text {
    flex: 1;
  }
  .cookie-actions {
    flex-shrink: 0;
  }
}

/* ===================== TABLET (481px - 768px) ===================== */
@media (min-width: 481px) {
  .page-wrapper { padding: 20px 16px 48px; }
  .site-header { padding: 20px 0 12px; }
  .brand { font-size: 14px; }

  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  .intro-card-inner { padding: 36px 24px 32px; }
  .intro-card-inner h1 { font-size: 28px; }
  .intro-icon-ring { width: 84px; height: 84px; }
  .intro-icon { font-size: 32px; }
  .intro-card-inner .feature-list { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .intro-card-inner .feature-item { flex: 1 1 200px; max-width: 280px; width: auto; }

  .mode-card { flex: 1 1 200px; max-width: 280px; padding: 24px 20px; }
  .mode-icon { width: 52px; height: 52px; font-size: 22px; }
  .mode-title { font-size: 16px; }
  .mode-desc { font-size: 13px; }

  .quiz-card { padding: 24px 24px 20px; min-height: 400px; }
  #question-text { font-size: 17px; min-height: 50px; }
  .option { padding: 13px 15px; font-size: 15px; min-height: 50px; }
  .seg-label { font-size: 10px; }

  /* Tablet: 3 columns for pies */
  .pies-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pie-box { padding: 14px 10px; flex-direction: column; text-align: center; gap: 8px; }
  .pie-box h4 { font-size: 11px; margin-bottom: 8px; }
  .pie-chart-wrap { width: 100%; height: auto; aspect-ratio: 1; max-width: 110px; }
  .pie-avg { font-size: 9px; margin-top: 6px; }
  .preview-cards { grid-template-columns: repeat(6, 1fr); gap: 10px; }
  .preview-card { padding: 16px 12px; }
  .preview-icon { width: 40px; height: 40px; font-size: 18px; }
  .preview-title { font-size: 12px; }

  .results-hero { padding: 32px 20px 26px; }
  .wellness-gauge-wrap { max-width: 300px; padding-bottom: 52px; }
  .wellness-score { font-size: 44px; }
  .wellness-label { font-size: 15px; }
  .wellness-msg { font-size: 15px; }
}

/* ===================== DESKTOP (769px+) ===================== */
@media (min-width: 769px) {
  .page-wrapper { padding: 24px 20px 64px; }

  .intro-card-inner { padding: 48px 40px 40px; }
  .intro-card-inner h1 { font-size: 36px; }
  .intro-icon-ring { width: 100px; height: 100px; }
  .intro-icon { font-size: 40px; }
  .pills-carousel-wrap { margin: 0 0 28px; }
  .pills-track { padding: 4px 64px; }
  .pills-fade { width: 64px; }
  .intro-card-inner .pill { padding: 10px 20px; font-size: 14px; }
  .intro-card-inner .feature-item { padding: 20px 32px; flex: 1 1 280px; max-width: 720px; }
  .intro-card-inner .feature-icon { width: 48px; height: 48px; font-size: 20px; }
  .intro-card-inner .feature-text strong { font-size: 17px; }
  .intro-card-inner .feature-text span { font-size: 15px; }

  .mode-options { gap: 16px; }
  .mode-card { flex: 1 1 220px; max-width: 300px; padding: 28px 24px; }
  .mode-icon { width: 56px; height: 56px; font-size: 24px; }

  .quiz-card { padding: 28px 32px 24px; min-height: 420px; }
  .boost-toast { padding: 10px 18px; font-size: 13px; }
  #question-text { font-size: 18px; min-height: 52px; }
  .option { padding: 14px 16px; font-size: 15px; min-height: 52px; }
  .segment { height: 6px; }
  .seg-label { font-size: 10px; }

  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .radar-card .radar-content {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }
  .radar-card .chart-wrap {
    flex-shrink: 0;
    margin: 0;
  }
  .radar-card .radar-side {
    flex: 0 0 auto;
    justify-content: center;
  }

  /* Desktop: 5 columns for pies */
  .pies-row { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .pie-box { padding: 16px 12px; flex-direction: column; text-align: center; gap: 8px; }
  .pie-box h4 { font-size: 12px; margin-bottom: 8px; }
  .pie-chart-wrap { width: 100%; height: auto; aspect-ratio: 1; max-width: 130px; }
  .pie-avg { font-size: 9px; margin-top: 6px; }
  .preview-cards { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .preview-card { padding: 18px 14px; }
  .preview-icon { width: 44px; height: 44px; font-size: 20px; }
  .preview-title { font-size: 13px; }

  .results-hero { padding: 40px 24px 32px; margin-bottom: 16px; }
  .wellness-gauge-wrap { max-width: 320px; padding-bottom: 55px; }
  .wellness-score { font-size: 48px; }
  .wellness-label { font-size: 16px; }
  .wellness-msg { font-size: 15px; }

  .domain-bar .bar-label { font-size: 13px; }
  .domain-bar .bar-track { height: 10px; }

  .attachment-grid { grid-template-columns: 1fr 1fr; }
  .attachment-cell { padding: 14px; font-size: 14px; }

  .results-footer { padding: 20px 24px; margin-top: 16px; }
}

/* ===================== PDF PRINTABLE ===================== */
.pdf-printable {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 210mm;
  background: #fff;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  box-sizing: border-box;
}
.pdf-page {
  width: 210mm;
  min-height: 297mm;
  padding: 18mm 20mm 22mm 20mm;
  box-sizing: border-box;
  page-break-after: always;
  position: relative;
}
.pdf-page:last-child {
  page-break-after: auto;
}
.pdf-header {
  text-align: center;
  border-bottom: 2.5px solid #26344a;
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.pdf-brand {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #26344a;
}
.pdf-subtitle {
  font-size: 15px;
  color: #5a6578;
  margin-top: 5px;
  font-weight: 500;
}
.pdf-date {
  font-size: 11px;
  color: #9aa5b8;
  margin-top: 4px;
}
.pdf-wellness {
  background: linear-gradient(135deg, #f8fafc 0%, #e8ecf1 100%);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid #dde3ea;
}
.pdf-wellness-label {
  font-size: 12px;
  color: #5a6578;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}
.pdf-wellness-score {
  font-size: 52px;
  font-weight: 700;
  color: #26344a;
  margin: 10px 0;
}
.pdf-wellness-text {
  font-size: 14px;
  color: #5a6578;
  font-weight: 500;
}
.pdf-section {
  margin-bottom: 22px;
}
.pdf-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #26344a;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #e8ecf1;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pdf-domain-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.pdf-domain-name {
  width: 130px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.pdf-domain-bar-wrap {
  flex: 1;
  height: 10px;
  background: #e8ecf1;
  border-radius: 5px;
  overflow: hidden;
}
.pdf-domain-bar-fill {
  height: 100%;
  border-radius: 5px;
}
.pdf-domain-value {
  width: 70px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: #5a6578;
}
.pdf-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.pdf-text {
  font-size: 12px;
  color: #5a6578;
  line-height: 1.6;
}
.pdf-tip {
  font-size: 12px;
  color: #1a1a1a;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.5;
}
.pdf-tip:last-child {
  border-bottom: none;
}
.pdf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pdf-col {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e8ecf1;
}
.pdf-col-title {
  font-size: 12px;
  font-weight: 700;
  color: #26344a;
  margin-bottom: 8px;
}
.pdf-col-text {
  font-size: 11px;
  color: #5a6578;
  line-height: 1.5;
}
.pdf-footer {
  position: absolute;
  bottom: 14mm;
  left: 20mm;
  right: 20mm;
  text-align: center;
  font-size: 9px;
  color: #9aa5b8;
  line-height: 1.5;
}
.pdf-footer p {
  margin: 3px 0;
}
