:root {
  --coral: #ea7e72;
  --coral-hover: #d65f00;
  --olive: #75962b;
  --brown: #351e1a;
  --cream: #fef1e4;
  --offwhite: #f7f5f1;
  --taupe: #e5d7d1;
  --ink: #222222;
  --danger: #b3261e;

  --font-heading: "Lora", Georgia, serif;
  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 10px;
  --shadow: 0 2px 10px rgba(53, 30, 26, 0.08);
}

* { box-sizing: border-box; }

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

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--brown);
  margin: 0 0 0.5em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--taupe);
  padding: 1rem 1.5rem;
}
.site-header__inner {
  max-width: 860px;
  margin: 0 auto;
}
.site-logo { display: block; height: auto; }

.form-shell {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  width: 100%;
}

.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.is-hidden { display: none !important; }

.intro-copy { color: #4a3a35; }

.resume-hint { margin-top: 1.5rem; font-size: 0.92rem; color: #6b5a54; }

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 6px;
  padding: 0.7em 1.6em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--coral);
  color: var(--offwhite);
  border-color: var(--coral);
}
.btn-primary:hover:not(:disabled) { background: var(--coral-hover); border-color: var(--coral-hover); }
.btn-secondary {
  background: #fff;
  color: var(--brown);
  border-color: var(--taupe);
}
.btn-secondary:hover:not(:disabled) { background: var(--taupe); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.link-btn {
  background: none;
  border: none;
  color: var(--olive);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5em;
}
.link-btn:hover { color: var(--coral-hover); }

/* Progress */
.progress-wrap { margin-bottom: 1.75rem; }
.progress-bar {
  height: 8px;
  background: var(--taupe);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--coral);
  width: 0%;
  transition: width 0.25s ease;
}
.progress-label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b5a54;
  font-weight: 600;
}

/* Steps */
.step-container { min-height: 200px; }

.section-block { margin: 1.75rem 0 1.25rem; }
.section-block:first-child { margin-top: 0; }
.section-block h2 { border-bottom: 2px solid var(--taupe); padding-bottom: 0.35em; }
.section-desc { font-size: 0.92rem; color: #4a3a35; background: var(--cream); border-radius: 8px; padding: 0.85em 1em; }
.section-desc p { margin: 0 0 0.4em; }
.section-desc p:last-child { margin-bottom: 0; }

.field {
  margin-bottom: 1.4rem;
}
.field-label {
  display: block;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 0.4em;
  font-size: 0.97rem;
}
.field-help { font-size: 0.85rem; color: #7a6a64; margin-top: 0.3em; }
.field-required { color: var(--danger); margin-left: 0.15em; }

.text-input,
select.text-input,
textarea.text-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65em 0.8em;
  border: 1px solid var(--taupe);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.text-input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
}
textarea.text-input { min-height: 5em; resize: vertical; }

.field.has-error .text-input,
.field.has-error select { border-color: var(--danger); }
.field-error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 0.3em; display: none; }
.field.has-error .field-error-msg { display: block; }

/* group rows: name / address */
.field-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

/* radio scale questions */
.radio-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7em 0;
  border-bottom: 1px solid #f0e9e5;
}
.radio-scale:last-child { border-bottom: none; }
.radio-scale__label {
  font-weight: 600;
  color: var(--brown);
  font-size: 0.95rem;
  flex: 1;
}
.radio-scale__options {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.radio-scale__opt {
  position: relative;
}
.radio-scale__opt input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.radio-scale__opt label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  border: 1.5px solid var(--taupe);
  color: var(--brown);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: #fff;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.radio-scale__opt input:checked + label {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}
.radio-scale__opt input:focus-visible + label {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}
.field.has-error .radio-scale__opt label { border-color: var(--danger); }

@media (max-width: 560px) {
  .radio-scale { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .radio-scale__options { align-self: flex-start; }
}

/* checkbox group (select_multiple) */
.checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.55rem; }
.checkbox-row input { width: 1.1em; height: 1.1em; }
.checkbox-row label { font-size: 0.95rem; }

/* nav */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--taupe);
  flex-wrap: wrap;
}

/* modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(53, 30, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.modal .text-input { margin-bottom: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.modal-status { font-size: 0.88rem; margin-top: 0.8rem; margin-bottom: 0; min-height: 1.2em; }
.modal-status.is-error { color: var(--danger); }
.modal-status.is-success { color: var(--olive); }

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #8a7a74;
}
