/* ═══════════════════════════════════════════════
   FNB Walsall Knife Awareness Survey — Styles
   survey.fnbmentoringandcoaching.com
═══════════════════════════════════════════════ */

:root {
  --bg:           #2a2a35;
  --surface:      #32323e;
  --surface2:     #3a3a48;
  --border:       #4a4a5a;
  --border-hover: #5d5d70;
  --accent:       #e63946;
  --accent2:      #f4a261;
  --accent3:      #2a9d8f;
  --text:         #f0f2f6;       /* slightly brighter white */
  --text-muted:   #b8c0d0;       /* was #7a8399 — now 8.5:1 contrast ✓ WCAG AA */
  --text-dim:     #8a94a8;       /* was #4a5468 — now 5:1 contrast ✓ WCAG AA */
  --disabled:     #2a3045;
  --radius:       10px;
  --transition:   0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Grain overlay ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 999;
}

/* ── Progress bar ── */
#progress-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 3px;
  background: var(--surface2);
}
#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0%;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

/* ── Top bar ── */
#topbar {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 199;
  background: rgba(42,42,53,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 28px;
}
#topbar-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 2px;
  color: var(--accent);
}
#topbar-step {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* ── Wrap ── */
#survey-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 20px 110px;
}

/* ── Question card ── */
.q-card {
  display: none;
  will-change: transform, opacity;
}
.q-card.active {
  display: block;
}
.q-card.slide-in-forward {
  animation: slideInForward 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.q-card.slide-in-back {
  animation: slideInBack 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.q-card.slide-out-forward {
  animation: slideOutForward 0.22s ease-in forwards;
}
.q-card.slide-out-back {
  animation: slideOutBack 0.22s ease-in forwards;
}
@keyframes slideInForward {
  from { opacity: 0; transform: rotate(4deg) scale(0.88); }
  to   { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes slideInBack {
  from { opacity: 0; transform: rotate(-4deg) scale(0.88); }
  to   { opacity: 1; transform: rotate(0deg)  scale(1); }
}
@keyframes slideOutForward {
  from { opacity: 1; transform: rotate(0deg) scale(1); }
  to   { opacity: 0; transform: rotate(-3deg) scale(0.9); }
}
@keyframes slideOutBack {
  from { opacity: 1; transform: rotate(0deg) scale(1); }
  to   { opacity: 0; transform: rotate(3deg) scale(0.9); }
}

.q-number {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.q-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1.05; letter-spacing: 1px;
  margin-bottom: 28px;
}

/* ── Options grid ── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}
.opt-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex; align-items: center; gap: 11px;
  width: 100%;
}
.opt-btn:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.03); }
.opt-btn.selected { border-color: var(--accent); background: rgba(230,57,70,0.09); }
.opt-btn .check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; transition: all var(--transition);
}
.opt-btn.selected .check { border-color: var(--accent); background: var(--accent); color: #fff; }
.opt-btn.selected .check::after { content: '✓'; }

/* Multi-select checkboxes */
.opt-btn.multi .check { border-radius: 4px; }

/* ── Scale ── */
.scale-wrap { margin-bottom: 8px; }
.scale-row {
  display: flex; gap: 7px;
}
.scale-btn {
  flex: 1;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 6px;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  font-size: 17px;
  cursor: pointer; text-align: center;
  transition: all var(--transition);
}
.scale-btn:hover { border-color: var(--accent3); color: var(--text); }
.scale-btn.selected { border-color: var(--accent3); background: rgba(42,157,143,0.14); color: var(--accent3); }
.scale-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-dim);
  padding: 6px 2px 20px;
}
.scale-labels-lg {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px 22px;
}

/* ── Text inputs ── */
.text-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 10px;
  display: block;
}
.text-input:focus { border-color: var(--accent); }
.text-input.error { border-color: var(--accent); }
.input-hint { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }

/* ── Validation error message ── */
.val-error {
  display: none;
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 14px;
}
.val-error.show { display: block; }

/* ── Nav buttons ── */
.nav-row {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px;
}
.btn-back {
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 22px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  cursor: pointer; transition: all var(--transition);
}
.btn-back:hover { border-color: var(--text-muted); color: var(--text); }

.btn-next {
  background: var(--accent); border: none;
  border-radius: var(--radius);
  padding: 12px 30px;
  color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
  opacity: 0.45; pointer-events: none;
}
.btn-next.ready { opacity: 1; pointer-events: all; }
.btn-next.ready:hover { background: #c62f3b; transform: translateY(-1px); }
.btn-next.submit-btn { background: var(--accent3); }
.btn-next.submit-btn:hover { background: #228b7e; }

/* ── Reveal panel (shown after answering) ── */
.reveal-panel {
  display: none;
  margin-bottom: 24px;
  animation: fadeUp 0.4s ease forwards;
}
.reveal-panel.show { display: block; }

/* Info banner */
.info-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 0;
}
.info-banner .icon { font-size: 17px; flex-shrink: 0; margin-top: 2px; }

/* Stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 0;
}
.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px; text-align: center;
}
.stat-card .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px; color: var(--accent2);
  line-height: 1;
}
.stat-card .lbl { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* Video placeholder */
.video-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}
.video-inner {
  aspect-ratio: 16/7;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  position: relative; overflow: hidden;
}
.video-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(230,57,70,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(42,157,143,0.05) 0%, transparent 60%);
}
.video-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; position: relative; z-index: 1;
  box-shadow: 0 0 36px rgba(230,57,70,0.12);
}
.video-label {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.72); border: 1px solid var(--border);
  border-radius: 5px; padding: 5px 11px;
  font-size: 10px; font-family: 'DM Mono', monospace;
  letter-spacing: 0.8px; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.8); }
}
.video-caption {
  padding: 13px 17px;
  font-size: 14px; color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-style: italic; line-height: 1.65;
}

/* ── Video speaker name/title ── */
.video-speaker {
  padding: 10px 17px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.video-speaker strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px; letter-spacing: 0.8px;
  color: var(--accent2);
}
.video-speaker span {
  font-size: 12px; color: var(--text-dim);
  line-height: 1.4;
}

/* ── Video sound toggle ── */
.video-sound-btn {
  position: absolute;
  bottom: 12px; right: 12px;
  background: var(--accent);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition), transform var(--transition);
  z-index: 10;
  animation: pulse-sound 1.8s ease-in-out infinite;
}
.video-sound-btn:hover { background: #c0252f; transform: scale(1.05); }
.video-sound-btn.sound-on {
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.2);
  animation: none;
  font-weight: 600;
}
@keyframes pulse-sound {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230,57,70,0.5); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(230,57,70,0); }
}

/* ── Incident bar chart ── */
.incident-chart { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.incident-bar-row { display: flex; align-items: center; gap: 10px; }
.incident-label { font-size: 12px; color: var(--text-muted); width: 120px; flex-shrink: 0; text-align: right; }
.incident-track { flex: 1; height: 20px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.incident-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.incident-val { font-size: 12px; color: var(--text-dim); width: 32px; text-align: right; font-family: 'DM Mono', monospace; }

/* Actual video element */
.video-inner video {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
/* Hide broken video icon if file missing */
.video-inner video:not([src]),
.video-inner video[src=""] {
  display: none;
}

/* Image placeholder */
.img-placeholder {
  aspect-ratio: 16/5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 40px; margin-bottom: 0;
}
.img-placeholder span { font-size: 11px; color: var(--text-dim); font-family: 'DM Mono', monospace; }

/* Graphic block */
.graphic-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; margin-bottom: 0;
}
.graphic-block h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 1px;
  color: var(--accent2); margin-bottom: 14px;
}

/* Hotspot bar */
.hotspot-row { margin-bottom: 12px; }
.hotspot-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.hotspot-track { height: 7px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.hotspot-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0; transition: width 1s cubic-bezier(.4,0,.2,1) 0.2s;
}

/* Popup trigger */
.popup-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; padding: 5px 11px;
  font-size: 11px; color: var(--accent2);
  cursor: pointer; transition: all var(--transition);
  margin-top: 10px; font-family: 'DM Sans', sans-serif;
}
.popup-trigger:hover { border-color: var(--accent2); background: rgba(244,162,97,0.08); }

/* ── Popup overlay ── */
.popup-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.78); backdrop-filter: blur(5px);
  align-items: center; justify-content: center; padding: 20px;
}
.popup-overlay.show { display: flex; }
.popup-box {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 12px; max-width: 460px; width: 100%;
  padding: 26px; animation: popIn 0.22s ease;
}
@keyframes popIn {
  from { opacity:0; transform:scale(0.94); }
  to   { opacity:1; transform:scale(1); }
}
.popup-box h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 1px;
  color: var(--accent); margin-bottom: 11px;
}
.popup-box p { font-size: 14.5px; color: var(--text-muted); line-height: 1.75; }
.popup-close {
  margin-top: 18px; background: var(--accent); color: #fff;
  border: none; border-radius: 6px;
  padding: 9px 20px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px;
}

/* ── Map block ── */
.map-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 0;
}
.map-tabs { display: flex; border-bottom: 1px solid var(--border); }
.map-tab {
  flex: 1; padding: 11px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  text-align: center; cursor: pointer;
  color: var(--text-muted); background: transparent; border: none;
  transition: all var(--transition);
}
.map-tab.active { color: var(--text); border-bottom: 2px solid var(--accent); margin-bottom: -1px; }
.map-content { display: none; padding: 18px; }
.map-content.active { display: block; }
.map-visual {
  background: var(--surface2); border: 1px dashed var(--border);
  border-radius: 8px; height: 240px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 7px; color: var(--text-dim);
  font-size: 12px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.map-visual .map-icon { font-size: 32px; }
.map-note { font-size: 10px; color: var(--text-dim); font-family: 'DM Mono', monospace; }

.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
.location-item {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 9px 11px;
  font-size: 13px; color: var(--text-muted);
  display: flex; gap: 7px; align-items: flex-start; line-height: 1.4;
}

/* ── Completion ── */
#qDone { text-align: center; padding: 60px 0; }
.done-icon { font-size: 60px; margin-bottom: 20px; }
#qDone h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 50px; letter-spacing: 2px;
  color: var(--accent3); margin-bottom: 12px;
}
#qDone p { color: var(--text-muted); font-size: 16px; line-height: 1.7; max-width: 420px; margin: 0 auto; }
#qDone img { max-width: 240px; opacity: 1; margin-top: 30px; }

/* ── Sub-question label ── */
.sub-label {
  font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 18px 0 10px;
}

/* ── Floating bg icons ── */
.float-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.float-bg span {
  position: absolute; font-size: 26px; opacity: 0.07;
  animation: floatAnim 9s ease-in-out infinite;
}
@keyframes floatAnim {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(4deg); }
}

/* ── Leaflet dark theme overrides ── */
.leaflet-container {
  background: var(--surface2) !important;
  font-family: 'DM Sans', sans-serif !important;
}
.leaflet-popup-content-wrapper {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: var(--surface) !important; }
.leaflet-popup-close-button { color: var(--text-muted) !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface2) !important; }
.leaflet-control-attribution {
  background: rgba(42,42,53,0.7) !important;
  color: var(--text-dim) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .options-grid { grid-template-columns: 1fr; }
  .scale-row { gap: 4px; }
  .scale-btn { padding: 13px 4px; font-size: 15px; }
  .location-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
  #topbar { padding: 12px 16px; }
}

/* ══════════════════════════════════════════════
   ENHANCEMENTS
══════════════════════════════════════════════ */

/* ── Time remaining in topbar ── */
#time-remaining {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1px;
  color: var(--text-dim);
  margin-left: 12px;
}

/* ── Q4 safety score colour shift ── */
#q4 { transition: background 0.6s ease; border-radius: var(--radius); }
#q4.score-1 { background: rgba(200,30,30,0.08); }
#q4.score-2 { background: rgba(230,100,30,0.07); }
#q4.score-3 { background: rgba(200,180,30,0.05); }
#q4.score-4 { background: rgba(30,160,100,0.06); }
#q4.score-5 { background: rgba(42,157,143,0.08); }

/* ── Animated stat counters ── */
[data-count] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── Live results bars ── */
.live-results {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 14px;
}
.live-results.show { display: block; }
.live-results-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.live-bar-row {
  display: grid;
  grid-template-columns: 1fr 3fr 36px;
  gap: 8px; align-items: center;
  margin-bottom: 9px;
}
.live-bar-label { font-size: 13px; color: var(--text-muted); }
.live-bar-track { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.live-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent3), var(--accent2));
  width: 0; transition: width 0.8s cubic-bezier(.4,0,.2,1) 0.1s;
}
.live-bar-pct { font-size: 12px; color: var(--text-dim); font-family: 'DM Mono', monospace; text-align: right; }

/* ── Completion screen ── */
#qDone { text-align: left; padding: 40px 0; }
.done-check {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(42,157,143,0.15);
  border: 2px solid var(--accent3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--accent3);
  margin-bottom: 18px; font-weight: 700;
}
#qDone h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px; letter-spacing: 2px;
  color: var(--accent3); margin-bottom: 10px;
}
.done-intro { color: var(--text-muted); font-size: 16px; line-height: 1.7; margin-bottom: 24px; }

.done-safety-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent3);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; gap: 20px; align-items: center;
  margin-bottom: 20px;
}
.done-safety-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px; line-height: 1; color: var(--accent3);
  flex-shrink: 0;
}
.done-safety-score span { font-size: 22px; color: var(--text-dim); }
.done-safety-text { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

.done-section { margin-bottom: 20px; }
.done-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 10px;
}
.done-initiative {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 7px;
  font-size: 13px; color: var(--text-muted); line-height: 1.55;
}
.done-init-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.done-partners {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.done-partner-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px; color: var(--text-muted);
}

.done-heading {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 14px; line-height: 1.5;
}
.done-logos {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.done-logos img {
  height: 80px; border-radius: var(--radius);
  object-fit: contain; background: #fff; padding: 8px;
}
/* ── Support resources on done screen ── */
.done-resources { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.done-resource {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; display: flex; flex-direction: column; gap: 2px;
}
.done-resource strong { font-size: 14px; color: var(--text); }
.done-resource span { font-size: 12px; color: var(--text-muted); }

.done-location-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.done-location-item {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px;
}
@media (max-width: 500px) { .done-location-grid { grid-template-columns: 1fr; } }

.done-team-img { margin-top: 6px; }
.done-team-img img {
  width: 100%; max-width: 480px; border-radius: var(--radius);
  object-fit: cover;
}

.done-share { margin-bottom: 20px; }
.done-whatsapp-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff;
  border-radius: var(--radius);
  padding: 13px 22px;
  font-size: 15px; font-weight: 700;
  text-decoration: none; margin-top: 10px;
  transition: background 0.2s;
}
.done-whatsapp-btn:hover { background: #1da851; }

.done-video-challenge {
  background: linear-gradient(135deg, rgba(230,57,70,0.12), rgba(244,162,97,0.08));
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.done-challenge-text {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 10px;
}
.done-challenge-quote {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent2);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.done-challenge-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.done-challenge-steps li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.done-privacy {
  margin-top: 16px; margin-bottom: 8px;
  font-size: 13px;
}
.done-privacy a { color: var(--text-dim); text-decoration: none; }
.done-privacy a:hover { color: var(--text-muted); }

/* ── Privacy popup ── */
#popup-privacy .popup-box { border-top-color: var(--accent3); }

/* ── Responsive done screen ── */
@media (max-width: 520px) {
  .done-safety-card { flex-direction: column; gap: 10px; }
  .live-bar-row { grid-template-columns: 1fr 2fr 30px; }
}

/* ══════════════════════════════════════════════
   TEXT SIZE / LANGUAGE / TOPBAR ENHANCEMENTS
══════════════════════════════════════════════ */

/* ── Text size variants ── */
[data-text-size="large"] body  { font-size: 18px; }
[data-text-size="large"] .q-title { font-size: clamp(30px, 5.5vw, 50px); }
[data-text-size="large"] .opt-btn { font-size: 17px; padding: 15px 18px; }
[data-text-size="xlarge"] body  { font-size: 21px; }
[data-text-size="xlarge"] .q-title { font-size: clamp(34px, 6vw, 54px); }
[data-text-size="xlarge"] .opt-btn { font-size: 19px; padding: 17px 20px; }

/* ── Topbar right group ── */
#topbar-right {
  display: flex; align-items: center; gap: 12px;
}

/* ── GLOSS credit ── */
#gloss-credit {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
  padding: 6px 0 52px; /* 52px bottom clears the fixed footer bar */
  font-family: 'DM Mono', monospace;
}
#gloss-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#gloss-credit a:hover { opacity: 1; }

/* ── Survey footer ── */
#survey-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 190;
  background: rgba(42,42,53,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 8px 20px;
}
#footer-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
}

/* ── Text size toggle ── */
#text-size-toggle {
  display: flex; gap: 3px;
}
.size-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-dim);
  padding: 4px 9px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}
.size-btn:hover { border-color: var(--text-muted); color: var(--text-muted); }
.size-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(230,57,70,0.08); }

/* ── RTL support removed — language options not implemented ── */

/* ── Partner logos on completion screen ── */
.done-partner-logos {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 10px;
}
.done-partner-logo {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-align: center;
}

/* ── Lazy loaded images — prevent layout shift ── */
img[data-lazy-src] {
  background: var(--surface2);
  min-height: 40px;
}

/* ── Responsive topbar at small screens ── */
@media (max-width: 600px) {
  #lang-select .lang-btn { padding: 3px 5px; font-size: 10px; }
  #topbar-right { gap: 7px; }
}

/* ══════════════════════════════════════════════
   INTRO / LANDING SCREEN
══════════════════════════════════════════════ */
#intro-screen {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 30px;
  transition: opacity 0.6s ease;
}
#intro-screen.hidden {
  opacity: 0; pointer-events: none;
}
#intro-carousel {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
#intro-carousel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
#intro-carousel img.active { opacity: 1; }
#intro-carousel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(42,42,53,0.55) 0%,
    rgba(42,42,53,0.85) 60%,
    rgba(42,42,53,0.97) 100%
  );
  z-index: 1;
}
#intro-content {
  position: relative; z-index: 2;
  max-width: 520px;
}
#intro-content img.intro-logo {
  max-width: 180px; margin-bottom: 24px;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}
#intro-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(30px, 6vw, 52px);
  letter-spacing: 2px; line-height: 1.05;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.intro-title-sub,
.intro-title-sub2 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--accent2);
  text-shadow: none;
}
.intro-video-block {
  width: 100%; max-width: 440px;
  margin: 16px auto 20px;
}
.intro-video-inner {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.intro-tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 4.5vw, 36px);
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 16px 0 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.intro-body {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 20px;
  max-width: 440px; margin-left: auto; margin-right: auto;
}
.intro-note {
  font-size: 13px; color: var(--text-dim);
  margin-top: 14px; letter-spacing: 0.3px;
  font-style: italic;
}
.intro-checklist {
  text-align: left;
  display: inline-block;
  margin: 10px auto 18px;
}
.intro-check-title {
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.intro-check-item {
  font-size: 14px; color: var(--accent3);
  padding: 3px 0;
  font-weight: 500;
}
#intro-start-btn,
#intro-go-btn {
  background: var(--accent);
  border: none; border-radius: var(--radius);
  padding: 16px 42px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 17px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(230,57,70,0.3);
}
#intro-start-btn:hover,
#intro-go-btn:hover {
  background: #c62f3b;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(230,57,70,0.4);
}
#intro-screen2 {
  animation: introFadeUp 0.5s ease forwards;
}
@keyframes introFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   INTERSTITIAL CARD (Mark Brindley etc.)
══════════════════════════════════════════════ */
.interstitial-card {
  text-align: center;
  padding: 20px 0;
}
.interstitial-caption {
  text-align: center;
  font-style: normal;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.interstitial-caption strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--accent2);
}

/* ── Infographic gallery (Mark / Phil) ── */
.infographic-gallery {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 20px;
}
.infographic-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.06);
  transition: transform 0.2s ease;
}
.infographic-card:hover { transform: scale(1.01); }
.infographic-card img {
  width: 100%; display: block;
  border-radius: 0;
  max-width: none; margin: 0; opacity: 1;
}

/* ══════════════════════════════════════════════
   DIFFERENT COLOUR INFO BOXES (popup/additional)
══════════════════════════════════════════════ */
.info-banner-alt {
  background: rgba(42,157,143,0.08);
  border: 1px solid rgba(42,157,143,0.25);
  border-left: 3px solid var(--accent3);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 0;
}
.info-banner-alt .icon { font-size: 17px; flex-shrink: 0; margin-top: 2px; }

/* ══════════════════════════════════════════════
   SELF-HARM POPUP (Q6) — sensitive styling
══════════════════════════════════════════════ */
#popup-selfharm .popup-box,
#popup-knives .popup-box {
  border-top-color: var(--accent3);
}
.sh-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.sh-stat {
  background: rgba(42,157,143,0.08);
  border: 1px solid rgba(42,157,143,0.2);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
}
.sh-stat .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--accent3);
  line-height: 1;
}
.sh-stat .lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}
.sh-support {
  background: rgba(244,162,97,0.08);
  border: 1px solid rgba(244,162,97,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.6;
}
.sh-support strong {
  color: var(--text);
}
@media (max-width: 520px) {
  .sh-stats { grid-template-columns: 1fr; }
}
