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

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #2c2a26;
  --muted: #6b6560;
  --border: #e2ddd4;
  --accent: #5c6b4a;
  --accent-hover: #4a5739;
  --accent-light: #eef2e8;
  --chart-grid: #e8e4dc;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(44, 42, 38, 0.06);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  height: 100%;
}

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav { display: flex; gap: 20px; }

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active { color: var(--accent); }

/* Hero */
.hero {
  padding: 56px 0 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.hero .container {
  max-width: 36rem;
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 12px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Content */
.content-section { padding: 40px 0 64px; }

.prose h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  margin: 32px 0 12px;
}

.prose h2:first-child { margin-top: 0; }

.prose p { margin-bottom: 16px; color: var(--text); }

.callout {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.callout p { margin: 0; }

.callout-warning {
  background: #fdf6e8;
  border-left-color: #c9a227;
}

.steps-list {
  margin: 0 0 16px 20px;
}

.steps-list li {
  margin-bottom: 10px;
}

.prose ul {
  margin: 0 0 16px 20px;
}

.prose ul li {
  margin-bottom: 8px;
}

.demographic-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
}

.demographic-list li {
  margin: 0;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.prose-tip {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 16px;
}

.source-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Survey */
.survey-header {
  padding: 40px 0 24px;
}

.survey-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.survey-header p { color: var(--muted); }

.progress-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  margin: 24px 0 8px;
  overflow: hidden;
}

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

.progress-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.survey-scale-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 28px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.survey-section-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.2rem;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.question-text {
  font-size: 0.95rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.likert-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.likert-option {
  flex: 1;
  min-width: 72px;
}

.likert-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.likert-option label {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.3;
}

.likert-option input:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.likert-option label:hover {
  border-color: var(--accent);
}

.survey-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 32px 0 64px;
}

/* Score entry */
.score-entry-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.score-entry-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.score-entry-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.score-entry-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.score-entry-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.score-entry-actions .btn {
  width: auto;
}

.score-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.score-input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.score-input-group input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
}

.score-input-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.score-entry-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 18px auto 0;
  max-width: 720px;
  line-height: 1.5;
}

/* Results */
.results-header {
  padding: 40px 0 16px;
}

.results-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.results-header p { color: var(--muted); }

.score-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0 32px;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.score-card .label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.score-card .value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.score-card-my .value {
  color: #6b7a52;
}

#visitor-score-card:not(.has-data) .value {
  color: var(--muted);
  font-size: 1.5rem;
}

.score-pair {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 8px 0;
}

.score-dim {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.score-card .range {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
}

.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.chart-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.chart-section .subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.chart-wrap {
  position: relative;
  height: 420px;
}

.chart-source-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
  font-style: italic;
}

.compare-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 48px;
  box-shadow: var(--shadow);
}

.compare-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.compare-intro {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.demographic-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  align-items: start;
}

.demographic-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mass-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mass-preset-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.demographic-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.demographic-category h3 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.checkbox-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 5px 0;
  line-height: 1.35;
}

.checkbox-list label:hover {
  color: var(--accent);
}

.checkbox-list input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.combo-toggle {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.combo-toggle:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.combo-panel {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.combo-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.combo-columns-quad {
  grid-template-columns: 1fr 1fr;
}

.combo-column-header {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
}

.combo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.combo-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  line-height: 1.3;
}

.combo-item-btn {
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.72rem;
  color: inherit;
  text-align: left;
  cursor: pointer;
  line-height: 1.3;
}

.combo-item-btn:hover,
.combo-item-btn.active {
  color: var(--accent);
}

.combo-item-btn.active {
  font-weight: 600;
}

.combo-item-label {
  flex: 1;
  min-width: 0;
}

.combo-item.missing,
.combo-item.no_data,
.combo-item.not_enough {
  color: var(--muted);
  padding: 2px 0;
}

.combo-item-status {
  font-style: italic;
  font-size: 0.68rem;
  white-space: nowrap;
}

.combo-item.no_data .combo-item-status {
  color: #9a7a5a;
}

.combo-item.not_enough .combo-item-status {
  color: #8a7a9a;
}

.selection-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-style: italic;
}

.filtered-result {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--accent-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}

.filtered-result.visible { display: block; }

/* Footer */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  background: var(--bg);
}

@media (max-width: 640px) {
  .container,
  .container-wide { padding: 0 16px; }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }

  .logo {
    text-align: center;
    font-size: 1.05rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
  }

  .nav-link { font-size: 0.8rem; }

  .hero {
    padding: 24px 0 28px;
    min-height: calc(100svh - 5.5rem);
    display: flex;
    align-items: center;
  }

  .hero h1 {
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
  }

  .lead {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  .score-entry-section { padding: 22px 16px; }

  .score-entry-fields {
    grid-template-columns: 1fr;
  }

  .demographic-groups {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .score-summary { grid-template-columns: 1fr; }
  .chart-wrap { height: 340px; }
  .likert-option { min-width: 100%; }
  .survey-actions { flex-direction: column; }
  .survey-actions .btn { width: 100%; }
}

/* ===== ASRS additions ===== */
.score-entry-fields-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.verdict {
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  display: none;
}
.verdict.visible { display: block; }
.verdict h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.verdict.positive { border-left: 4px solid #b5642f; background: #fbf2ea; }
.verdict.negative { border-left: 4px solid var(--accent); background: var(--accent-light); }
.verdict .verdict-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.verdict.positive .verdict-tag { background: #b5642f; color: #fff; }
.verdict.negative .verdict-tag { background: var(--accent); color: #fff; }
.verdict p { margin-bottom: 10px; }
.verdict p:last-child { margin-bottom: 0; }

.severity-bands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0 4px;
}
.severity-band {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.85rem;
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s;
}
.severity-band.active {
  opacity: 1;
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow);
}
.severity-band .band-name {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.severity-band .band-range { color: var(--muted); font-size: 0.78rem; }

.disclaimer-box {
  background: #fdf6e8;
  border-left: 3px solid #c9a227;
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 8px 0 32px;
  font-size: 0.9rem;
}
.disclaimer-box strong { color: #8a6d12; }

.subscale-section { margin-top: 12px; }
.subscale-section[hidden] { display: none; }

.computed-total {
  margin: 4px 0 18px;
  font-size: 0.95rem;
  color: var(--muted);
}
.computed-total strong { color: var(--text); font-size: 1.05rem; }

/* ===== DIVA additions ===== */
.score-input-wide { max-width: 320px; }
.form-subhead { font-size: 0.9rem; color: var(--muted); margin: 6px 0 10px; }
.score-entry-fields-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .score-entry-fields-3 { grid-template-columns: 1fr; } }

/* Download cards */
.download-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 8px; }
@media (max-width: 640px) { .download-row { grid-template-columns: 1fr; } }
.download-card {
  align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); transition: transform 0.12s, border-color 0.12s;
}
.download-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.download-icon { font-size: 1.6rem; line-height: 1; }
.download-text { display: flex; flex-direction: column; }
.download-text strong { font-size: 0.98rem; }
.download-text span { font-size: 0.82rem; color: var(--muted); }

/* Summary grid */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.summary-cell { padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.summary-k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.summary-v { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.5rem; margin: 2px 0; }
.summary-s { font-size: 0.78rem; color: var(--muted); }

/* Responses table */
.resp-group { margin-bottom: 18px; }
.resp-group-head { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 8px; }
.resp-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.resp-q { font-size: 0.9rem; }
.resp-a { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.resp-lvl-0 { background: #eef0ec; color: #6b7280; }
.resp-lvl-1 { background: #e7efe3; color: #5a7a4a; }
.resp-lvl-2 { background: #f3ecd6; color: #8a6d12; }
.resp-lvl-3 { background: #f6ddc8; color: #b5642f; }
.resp-lvl-4 { background: #efc9b3; color: #8a3f12; }

/* Walkthrough cards */
.wt-item { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; }
.wt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.wt-code { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; background: var(--accent); color: #fff; padding: 3px 9px; border-radius: 99px; }
.wt-cat { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.wt-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.06rem; margin-bottom: 8px; }
.wt-note { font-size: 0.92rem; line-height: 1.6; margin-bottom: 8px; }
.wt-note:last-child { margin-bottom: 0; }

/* ===== batch 3 additions ===== */

/* Hero rabbit emblem (like the reference animal hero) */
.hero-emblem {
  width: 150px; height: 150px; margin: 0 auto 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #5b6b45 0%, #4a5739 58%, #3d4a2f 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(60,70,40,0.28);
  border: 4px solid var(--surface);
}
.hero-emblem img { width: 78%; height: 78%; object-fit: contain; }
@media (max-width: 640px) { .hero-emblem { width: 120px; height: 120px; } }

/* Footer */
.footer-disclaimer { max-width: 760px; margin: 0 auto; }
.footer-meta { margin-top: 22px; font-size: 0.85rem; color: var(--muted); }
.footer-meta a { color: var(--muted); text-decoration: underline; }
.footer-meta a:hover { color: var(--accent); }
.footer-meta .dot { margin: 0 8px; opacity: 0.7; }

/* Centered single download */
.download-row-center { display: flex; justify-content: center; }
.download-row-center .download-card { width: 360px; max-width: 100%; }

/* Recolour the 18 responses: Very Often = green (success) … Rarely = red */
.resp-lvl-0 { background: #eceae6; color: #8a8a8a; }   /* Never */
.resp-lvl-1 { background: #e05a4d; color: #ffffff; }   /* Rarely */
.resp-lvl-2 { background: #e6a93a; color: #3d2c00; }   /* Sometimes */
.resp-lvl-3 { background: #9cc06a; color: #2c3d18; }   /* Often */
.resp-lvl-4 { background: #4f9d52; color: #ffffff; }   /* Very Often */

/* ===== Full completed DIVA ===== */
.diva-legend {
  font-size: 0.82rem; color: var(--muted); margin: 4px 0 18px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.diva-legend .legend-sep { opacity: 0.5; margin: 0 4px; }
.tick-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #4f9d52; color: #fff; border-radius: 4px; font-size: 0.72rem;
  width: 18px; height: 18px;
}
.ac-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; color: #fff;
}
.ac-a { background: #4a6fa5; }
.ac-c { background: #8b9a6b; }

.dv-part {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem; font-weight: 600; color: var(--accent);
  border-bottom: 2px solid var(--accent); padding-bottom: 8px;
  margin: 34px 0 18px;
}
.dv-part:first-child { margin-top: 6px; }

.dv-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 16px;
}
.dv-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.dv-code {
  flex: none; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.03em;
  background: var(--accent); color: #fff; padding: 4px 9px; border-radius: 99px; white-space: nowrap;
}
.dv-code-domain { background: #6b7280; }
.dv-q { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.02rem; line-height: 1.4; }

.dv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 680px) { .dv-cols { grid-template-columns: 1fr; gap: 16px; } }
.dv-col-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 8px;
}
.dv-list { list-style: none; margin: 0 0 10px; padding: 0; }
.dv-list li {
  font-size: 0.88rem; line-height: 1.4; padding: 4px 0 4px 24px; position: relative; color: var(--text);
}
.dv-list li.off { color: #b3b0a8; }
.dv-list li .tick { position: absolute; left: 0; top: 4px; color: #4f9d52; font-weight: 700; }
.dv-list li .tick-empty {
  position: absolute; left: 2px; top: 8px; width: 11px; height: 11px;
  border: 1.5px solid #d8d4cc; border-radius: 3px;
}
.dv-empty { color: var(--muted); margin: 0 0 10px; }
.dv-comment {
  background: var(--accent-light); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 11px 14px; margin: 10px 0 0;
  font-size: 0.9rem; line-height: 1.6; font-style: italic; color: var(--text);
}
.dv-notes { margin-top: 12px; font-size: 0.8rem; color: var(--muted); font-style: italic; }

.dv-figure { margin: 14px 0 0; }
.dv-figure figcaption { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.dv-figure img {
  display: block; width: 100%; height: auto; border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 10px; background: #fff;
}

/* ===== batch 4 additions ===== */

/* Self-check summary box colours: Total = base, Threshold = green, categories = blue */
.summary-grid .summary-cell:nth-child(2) {      /* Threshold */
  background: #e8f2e7; border-color: #9cc69a;
}
.summary-grid .summary-cell:nth-child(2) .summary-v { color: #2f7d33; }
.summary-grid .summary-cell:nth-child(3),
.summary-grid .summary-cell:nth-child(4),
.summary-grid .summary-cell:nth-child(5) {      /* Inattention / Hyperactivity / Impulsivity */
  background: #e9eef6; border-color: #9fb2d2;
}
.summary-grid .summary-cell:nth-child(3) .summary-v,
.summary-grid .summary-cell:nth-child(4) .summary-v,
.summary-grid .summary-cell:nth-child(5) .summary-v { color: #3c5a86; }

/* Multi-paragraph comments */
.dv-comment p { margin: 0 0 9px; }
.dv-comment p:last-child { margin-bottom: 0; }

/* Lightbox */
.dv-lightbox-img { cursor: zoom-in; transition: filter 0.12s; }
.dv-lightbox-img:hover { filter: brightness(0.94); }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: rgba(20,18,14,0.82); padding: 4vw; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw; max-height: 92vh; width: auto; height: auto;
  border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  background: #fff; cursor: default;
}
.lightbox-close {
  position: absolute; top: 18px; right: 24px;
  background: none; border: none; color: #fff; font-size: 2.4rem; line-height: 1;
  cursor: pointer; opacity: 0.85;
}
.lightbox-close:hover { opacity: 1; }

/* Blurred document teaser (e.g. driving record) */
.doc-preview {
  position: relative;
  width: 100%;
  height: 150px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  /* faux "obscured document" look — faint text-rows on paper, no image needed */
  background:
    repeating-linear-gradient(0deg, rgba(90,95,80,0.16) 0 2px, transparent 2px 15px),
    linear-gradient(135deg, #eef0ea 0%, #dde1d6 100%);
}
.doc-preview-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(7px);
  transform: scale(1.12);   /* hide soft blurred edges */
}
.doc-preview-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(30,35,22,0.45);
  text-align: center; padding: 12px;
}
.doc-preview-label {
  color: #fff; font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.03em; text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}
.doc-preview-btn {
  background: var(--surface); color: var(--accent);
  text-decoration: none; font-weight: 600; font-size: 0.85rem;
  padding: 7px 16px; border-radius: 99px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.doc-preview-btn:hover { filter: brightness(1.04); }
