/* PopiGuard Assessment — Styles */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap');

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

:root {
  --navy:        #0f2044;
  --navy-mid:    #1a3260;
  --teal:        #0a7c6e;
  --teal-light:  #e6f4f2;
  --gold:        #b07d2e;
  --accent:      #ff4633;
  --accent-dark: #d63163;
  --red:         #dc2626;
  --red-light:   #fef2f2;
  --amber:       #d97706;
  --amber-light: #fffbeb;
  --green:       #16a34a;
  --green-light: #f0fdf4;
  --slate-50:    #f8fafc;
  --slate-100:   #f1f5f9;
  --slate-200:   #e2e8f0;
  --slate-300:   #cbd5e1;
  --slate-500:   #64748b;
  --slate-700:   #334155;
  --slate-900:   #0f172a;
  --white:       #ffffff;
  --radius:      12px;
  --shadow:      0 4px 24px rgba(15,32,68,0.10);
  --shadow-lg:   0 8px 40px rgba(15,32,68,0.15);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--navy);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  color: var(--white);
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.site-header .logo span { color: var(--accent); }

.site-header .tagline {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */

.progress-header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 0.875rem 1.5rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.progress-meta strong { color: var(--navy); font-weight: 600; }

.progress-track {
  height: 6px;
  background: var(--slate-200);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.module-tabs {
  display: flex;
  gap: 3px;
  margin-top: 0.625rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.module-tabs::-webkit-scrollbar { display: none; }

.module-tab {
  flex: none;
  width: 28px;
  height: 6px;
  border-radius: 99px;
  background: var(--slate-200);
  transition: background 0.2s;
}
.module-tab.done     { background: var(--teal); }
.module-tab.active   { background: var(--navy); }
.module-tab.skipped  { background: var(--slate-300); opacity: 0.5; }

/* ── Main layout ──────────────────────────────────────────────────────────── */

.assessment-wrap {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 0 1.25rem 4rem;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.card--module-header {
  background: var(--navy);
  color: var(--white);
  border-color: transparent;
}

.card--module-header .module-number {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.card--module-header h2 {
  font-size: 1.35rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.card--module-header .popia-anchor {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

/* ── Question card ────────────────────────────────────────────────────────── */

.question-number {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.question-text {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--slate-900);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* ── Answer options ───────────────────────────────────────────────────────── */

.answer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
  .answer-options { grid-template-columns: 1fr; }
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--slate-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate-700);
}

.answer-option:hover { border-color: var(--teal); background: var(--teal-light); }

.answer-option input[type="radio"] { display: none; }

.answer-option .radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--slate-300);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.answer-option.selected { border-color: var(--teal); background: var(--teal-light); }
.answer-option.selected .radio-dot { border-color: var(--teal); background: var(--teal); }
.answer-option.selected .radio-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
}

.answer-option.selected-no     { border-color: var(--red);   background: var(--red-light); }
.answer-option.selected-no .radio-dot { border-color: var(--red); background: var(--red); }

.answer-option.selected-partial { border-color: var(--amber); background: var(--amber-light); }
.answer-option.selected-partial .radio-dot { border-color: var(--amber); background: var(--amber); }

/* ── Follow-up ────────────────────────────────────────────────────────────── */

.followup-block {
  background: var(--amber-light);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.followup-block label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.followup-block .followup-prompt {
  font-size: 0.9rem;
  color: var(--slate-700);
  margin-bottom: 0.625rem;
  line-height: 1.5;
}

.followup-block textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.625rem 0.75rem;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--slate-900);
  background: var(--white);
  resize: vertical;
  outline: none;
}

.followup-block textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217,119,6,0.12); }

/* ── Remediation guidance ─────────────────────────────────────────────────── */

.remediation-block {
  background: var(--teal-light);
  border: 1px solid #99d9d4;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.remediation-block .rem-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.remediation-block p {
  font-size: 0.875rem;
  color: var(--slate-700);
  line-height: 1.6;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */

.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.question-nav .nav-info {
  font-size: 0.82rem;
  color: var(--slate-500);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--secondary {
  background: white;
  color: var(--navy);
  border-color: var(--slate-200);
}
.btn--secondary:hover { border-color: var(--slate-300); background: var(--slate-50); }

.btn--ghost {
  background: transparent;
  color: var(--slate-500);
  border-color: var(--slate-200);
}
.btn--ghost:hover { border-color: var(--slate-300); color: var(--slate-700); background: var(--slate-50); }

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* ── Intro / profile screens ──────────────────────────────────────────────── */

.intro-wrap {
  max-width: 600px;
  margin: 3rem auto;
  padding: 0 1.25rem 4rem;
}

.intro-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.intro-hero .badge {
  display: inline-block;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.875rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.intro-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.intro-hero p {
  font-size: 1rem;
  color: var(--slate-500);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

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

.info-item {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
}

.info-item .info-label { color: var(--slate-500); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.info-item .info-value { color: var(--slate-900); font-weight: 600; }

/* ── Form fields ──────────────────────────────────────────────────────────── */

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,124,110,0.10); }

.form-group .hint { font-size: 0.8rem; color: var(--slate-500); margin-top: 0.3rem; }

/* ── Profile questions (yes/no toggle) ───────────────────────────────────── */

.profile-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  margin-bottom: 0.625rem;
}

.profile-question .pq-text {
  font-size: 0.9rem;
  color: var(--slate-700);
  line-height: 1.45;
}

.toggle-group {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--slate-200);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.toggle-group button {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: var(--white);
  color: var(--slate-500);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.toggle-group button.active-yes { background: var(--green); color: var(--white); }
.toggle-group button.active-no  { background: var(--slate-200); color: var(--slate-700); }

/* ── Results page ─────────────────────────────────────────────────────────── */

.results-wrap {
  max-width: 800px;
  margin: 2.5rem auto;
  padding: 0 1.25rem 4rem;
}

.score-hero {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 8px solid;
  font-weight: 800;
}

.score-circle .score-num  { font-size: 2.5rem; line-height: 1; }
.score-circle .score-unit { font-size: 0.8rem; opacity: 0.7; }

.score-circle.band-red    { border-color: var(--red);   color: var(--red); }
.score-circle.band-amber  { border-color: var(--amber); color: var(--amber); }
.score-circle.band-green  { border-color: var(--green); color: var(--green); }

.score-hero h2 { font-size: 1.4rem; color: var(--navy); margin-bottom: 0.375rem; }
.score-hero p  { color: var(--slate-500); font-size: 0.95rem; }

.band-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.band-pill.red    { background: var(--red-light);   color: var(--red); }
.band-pill.amber  { background: var(--amber-light); color: var(--amber); }
.band-pill.green  { background: var(--green-light); color: var(--green); }

/* ── Module scorecard table ───────────────────────────────────────────────── */

.scorecard-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.scorecard-table th {
  text-align: left;
  padding: 0.625rem 1rem;
  background: var(--slate-50);
  border-bottom: 2px solid var(--slate-200);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}

.scorecard-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}

.scorecard-table tr:last-child td { border-bottom: none; }

.scorecard-table tr:hover td { background: var(--slate-50); }

.score-bar-wrap { display: flex; align-items: center; gap: 0.625rem; }
.score-bar { flex: 1; height: 6px; background: var(--slate-200); border-radius: 99px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 99px; }
.score-bar-fill.red    { background: var(--red); }
.score-bar-fill.amber  { background: var(--amber); }
.score-bar-fill.green  { background: var(--green); }
.score-bar-num { font-weight: 700; font-size: 0.875rem; min-width: 32px; text-align: right; }
.score-bar-num.red    { color: var(--red); }
.score-bar-num.amber  { color: var(--amber); }
.score-bar-num.green  { color: var(--green); }

.na-badge {
  font-size: 0.75rem;
  color: var(--slate-500);
  background: var(--slate-100);
  border-radius: 99px;
  padding: 0.2rem 0.625rem;
  font-weight: 600;
}

/* ── Gap cards ────────────────────────────────────────────────────────────── */

.gap-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-left: 4px solid;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.gap-card.critical { border-left-color: var(--red); }
.gap-card.high     { border-left-color: var(--amber); }
.gap-card.medium   { border-left-color: var(--green); }

.gap-card .gap-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.gap-card .gap-weight {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}
.gap-weight.critical { background: var(--red-light); color: var(--red); }
.gap-weight.high     { background: var(--amber-light); color: var(--amber); }
.gap-weight.medium   { background: var(--green-light); color: var(--green); }

.gap-card .gap-module { font-size: 0.75rem; color: var(--slate-500); }

.gap-card .gap-question { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--slate-900); }

.gap-card .gap-remediation { font-size: 0.85rem; color: var(--slate-600); line-height: 1.55; }

/* ── CTA block ────────────────────────────────────────────────────────────── */

.cta-block {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.cta-block h3 { color: var(--white); font-size: 1.25rem; margin-bottom: 0.5rem; }
.cta-block p  { color: rgba(255,255,255,0.65); margin-bottom: 1.25rem; font-size: 0.9rem; }

/* ── Review notice ────────────────────────────────────────────────────────── */

.review-notice {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--teal-light);
  border: 1px solid #99d9d4;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.review-notice .notice-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.review-notice .notice-body { font-size: 0.875rem; color: var(--slate-700); line-height: 1.55; }
.review-notice .notice-body strong { color: var(--teal); }

/* ── Section titles ───────────────────────────────────────────────────────── */

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

/* ── Utility ──────────────────────────────────────────────────────────────── */

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ── Entry / error page ───────────────────────────────────────────────────── */

.entry-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
}

.entry-wrap .entry-icon { font-size: 3rem; margin-bottom: 1rem; }
.entry-wrap h1 { font-size: 1.5rem; color: var(--navy); margin-bottom: 0.5rem; }
.entry-wrap p  { color: var(--slate-500); max-width: 420px; margin-bottom: 1.5rem; }
