:root {
  --forest: #1E3A2B;
  --forest-dark: #142A1F;
  --sage: #7A9E7E;
  --sage-light: #E7EEE7;
  --clay: #B5623A;
  --clay-dark: #944D2C;
  --ink: #232520;
  --ink-muted: #5B6058;
  --paper: #FFFFFF;
  --line: #E1E4DE;
  --danger: #A3402F;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Calibri, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 { font-family: Cambria, "Times New Roman", serif; margin: 0; }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-size: 26px;
  color: var(--sage);
}
.brand-title { font-family: Cambria, serif; font-weight: bold; font-size: 17px; color: var(--forest); }
.brand-sub { font-size: 12px; color: var(--ink-muted); }

.progress-wrap { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progress-track {
  height: 6px;
  border-radius: 4px;
  background: var(--sage-light);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--forest);
  transition: width .3s ease;
}
.progress-label { font-size: 12px; color: var(--ink-muted); text-align: right; }

main#main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.section-title { font-size: 24px; color: var(--forest); margin-bottom: 4px; }
.section-instructions { color: var(--ink-muted); font-size: 13px; margin-bottom: 28px; font-style: italic; }

.question-block {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.question-block:last-child { border-bottom: none; }

.question-text { font-size: 15px; font-weight: bold; margin-bottom: 12px; color: var(--ink); }
.question-mandatory { color: var(--clay); font-weight: normal; }

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

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option-row:hover { border-color: var(--sage); background: var(--sage-light); }
.option-row.selected { border-color: var(--forest); background: var(--sage-light); }
.option-row input { accent-color: var(--forest); }
.option-row label { cursor: pointer; flex: 1; }

.scale-row { display: flex; align-items: center; gap: 12px; }
.scale-endpoint { font-size: 12px; color: var(--ink-muted); width: 110px; }
.scale-endpoint.right { text-align: right; }
.scale-options { display: flex; gap: 8px; flex: 1; justify-content: space-between; }
.scale-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-weight: bold;
  color: var(--ink-muted);
}
.scale-btn:hover { border-color: var(--sage); }
.scale-btn.selected {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}

textarea.text-input {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.select-hint { font-size: 12px; color: var(--ink-muted); margin-top: -6px; margin-bottom: 10px; }

footer.navbar {
  border-top: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--paper);
  position: sticky;
  bottom: 0;
}

.btn {
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-primary:hover { background: var(--forest-dark); }
.btn-primary:disabled { background: var(--sage-light); color: var(--ink-muted); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink-muted); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--sage); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.step-error { color: var(--danger); font-size: 13px; }

.eu-footer {
  padding: 14px 32px 20px;
  text-align: center;
  background: var(--paper);
}
.eu-footer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.eu-footer .eu-project-number {
  margin-top: 4px;
  font-weight: bold;
}

/* ---- Results screen ---- */
.results-hero {
  text-align: center;
  padding: 8px 0 28px;
}
.results-hero .kicker { color: var(--clay); font-size: 13px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.results-hero h1 { font-size: 30px; color: var(--forest); margin: 8px 0 6px; }
.results-hero .match { font-size: 46px; color: var(--clay); font-family: Cambria, serif; }

.pathway-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.pathway-card .pathway-name { font-weight: bold; color: var(--forest); }
.pathway-card .pathway-bar-track { height: 8px; background: var(--sage-light); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.pathway-card .pathway-bar-fill { height: 100%; background: var(--forest); }

.report-text {
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: var(--sage-light);
  border-radius: 8px;
  padding: 20px;
  line-height: 1.6;
  color: var(--ink);
}

.stopped-message {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-muted);
}
