:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5f6b7a;
  --border: #d5dae2;
  --primary: #1d4ed8;
  --primary-text: #ffffff;
  --primary-hover: #1e40af;
  --secondary: #e2e8f0;
  --secondary-text: #1a1a1a;
  --accent: #0f766e;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h2 { margin-top: 0; }

.view { display: none; }
.hidden { display: none !important; }
#intro { display: block; }
#questionnaire:not(.hidden), #results:not(.hidden) { display: block; }
#intro.hidden { display: none !important; }

.lede { font-size: 1.125rem; }
.note { color: var(--muted); font-size: 0.95rem; }

button {
  border: none;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-text);
}
.btn-secondary:hover:not(:disabled) { background: var(--border); }

#intro button, #start-btn { margin-top: 16px; }

.progress-region {
  margin-bottom: 16px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

#progress-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.25s ease;
}

#progress-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

.dimension-banner {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.question-card {
  border: none;
  padding: 0;
  margin: 0 0 20px;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 0;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.option:hover { border-color: var(--primary); }
.option.selected {
  border-color: var(--primary);
  background: rgba(29, 78, 216, 0.06);
}

.option input {
  margin-top: 3px;
  flex-shrink: 0;
}

.option-label {
  line-height: 1.4;
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-header {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.overall-band {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 6px;
}

.overall-score {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.caveat {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

section {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.dimension-score {
  margin-bottom: 14px;
}

.dimension-score:last-child { margin-bottom: 0; }

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.score-name { font-weight: 600; }
.score-value { font-weight: 700; color: var(--accent); }

.score-bar {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
}

.intervention {
  margin-bottom: 16px;
}

.intervention h3 { margin: 0 0 6px; }
.intervention p { margin: 0; color: var(--muted); }

.impact-effort {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.roadmap-phase {
  margin-bottom: 14px;
}
.roadmap-phase:last-child { margin-bottom: 0; }
.roadmap-phase h3 { margin: 0 0 6px; font-size: 1rem; }
.roadmap-phase p { margin: 0; color: var(--muted); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media print {
  body { background: #fff; }
  main { max-width: 100%; padding: 0; }
  #intro, #questionnaire, .actions, .caveat { display: none !important; }
  #results { display: block !important; }
  section, .result-header { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  button { display: none !important; }
}

@media (min-width: 600px) {
  main { padding-top: 40px; }
  .options { gap: 12px; }
}
