@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #14201a;
  --paper: #f2f1ec;
  --paper-raised: #ffffff;
  --forest: #133a2b;
  --forest-deep: #0c261c;
  --gold: #b8892b;
  --gold-soft: #e4c98a;
  --line: #d9d6cb;
  --danger: #a4372b;
  --radius: 3px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.masthead {
  background: var(--forest);
  color: var(--paper);
  padding: 2.4rem 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.masthead::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,137,43,0.35), transparent 70%);
}

.masthead-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.masthead .eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--gold-soft);
  margin: 0 0 .6rem;
}

.masthead h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 .5rem;
}

.masthead p.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-soft);
  margin: 0;
  font-size: 1.05rem;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.progress-wrap {
  position: sticky;
  top: 0;
  background: var(--paper);
  padding: 1rem 0 .6rem;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}

.progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--forest));
  width: 0%;
  transition: width .3s ease;
}

.progress-label {
  font-size: .78rem;
  color: #55584f;
  margin-top: .4rem;
  display: flex;
  justify-content: space-between;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--forest-deep);
  margin: 0 0 .3rem;
}

.section-intro {
  white-space: pre-line;
  color: #3a3d36;
  font-size: .96rem;
}

.question {
  margin: 1.7rem 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.question:last-child { border-bottom: none; }

.question .qnum {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--gold);
  margin-right: .4rem;
}

.question .qtext {
  font-weight: 500;
  font-size: 1.02rem;
  margin: 0 0 .8rem;
}

.likert-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.likert-option {
  flex: 1;
  min-width: 90px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .6rem .4rem;
  cursor: pointer;
  font-size: .82rem;
  transition: all .15s ease;
  background: var(--paper);
}
.likert-option:hover { border-color: var(--gold); }
.likert-option.selected {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  font-weight: 600;
}
.likert-option .num { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }

.choice-list, .multi-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.choice-option, .multi-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  cursor: pointer;
  transition: border-color .15s ease;
}
.choice-option:hover, .multi-option:hover { border-color: var(--gold); }
.choice-option.selected, .multi-option.selected {
  border-color: var(--forest);
  background: #eef3ef;
}
.choice-option input, .multi-option input { accent-color: var(--forest); }

textarea, input[type=text] {
  width: 100%;
  font-family: var(--sans);
  font-size: .95rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  resize: vertical;
}
textarea:focus, input[type=text]:focus, .choice-option:focus-within, .multi-option:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.scale10-wrap { display: flex; align-items: center; gap: 1rem; }
input[type=range] { flex: 1; accent-color: var(--forest); }
.scale10-value {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--forest);
  min-width: 3.5rem;
  text-align: center;
}

.matrix-block { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; background: #fbfaf7; }
.matrix-entity-name { width: 100%; margin-bottom: .8rem; }
.matrix-criteria { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.matrix-criterion label { font-size: .85rem; font-weight: 500; display: block; margin-bottom: .3rem; }
.matrix-remove { color: var(--danger); background: none; border: none; cursor: pointer; font-size: .82rem; margin-top: .5rem; }
.btn-add-entity { background: none; border: 1px dashed var(--gold); color: var(--forest-deep); padding: .6rem 1rem; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: .85rem; }

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .92rem;
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-deep); }
.btn-secondary { background: transparent; color: var(--forest); border: 1px solid var(--line); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.final-screen {
  text-align: center;
  padding: 3rem 1rem;
}
.final-screen h2 {
  font-family: var(--serif);
  color: var(--forest-deep);
  font-size: 1.8rem;
}

.error-banner {
  background: #fbeceb;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: .8rem 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: .88rem;
}

footer.site-footer {
  text-align: center;
  color: #7a7d72;
  font-size: .78rem;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .matrix-criteria { grid-template-columns: 1fr 1fr; }
}
