:root {
  --navy: #1b2a4a;
  --navy-dark: #101a30;
  --gold: #b8922f;
  --bg: #eef1f6;
  --card-bg: #ffffff;
  --text: #1f2430;
  --text-muted: #5a6272;
  --border: #d8dde6;
  --danger: #b23b3b;
  --radius: 6px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.site-header {
  background: linear-gradient(90deg, var(--navy-dark), var(--navy));
  color: #fff;
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 8px; }

.brand-mark {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.brand-name { font-weight: 600; font-size: 1.05rem; }

.header-meta { color: #c9d2e6; font-size: 0.95rem; }

.page {
  max-width: 900px;
  margin: 32px auto 64px;
  padding: 0 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(16, 26, 48, 0.08);
  padding: 32px;
}

.hidden { display: none !important; }

.gate-banner h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  color: var(--navy-dark);
}

.subtitle { color: var(--text-muted); margin: 0 0 24px; }

.section-lede { font-weight: 600; margin-bottom: 16px; }

.field { margin-bottom: 18px; }

.field label, .field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.93rem;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fffef8;
}

.field textarea { min-height: 90px; resize: vertical; }

.field .hint { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }

.radio-field { border: none; padding: 0; margin: 0 0 18px; }
.radio-field legend { padding: 0; }
.radio-option { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 22px; }
.radio-option input { width: auto; }

.disclaimer-box {
  background: #f7f4ea;
  border: 1px solid #e5dcbd;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 22px 0;
}
.disclaimer-box h2 { margin: 0 0 8px; font-size: 1rem; color: var(--navy-dark); }
.disclaimer-box p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.consent-checkbox {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.88rem;
  margin-bottom: 22px;
}
.consent-checkbox input { margin-top: 3px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 11px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn-secondary:hover { background: #f0f2f7; }
.btn-link { background: none; color: var(--text-muted); text-decoration: underline; padding: 11px 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.field-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; display: none; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

/* Wizard */
.wizard-card { padding-top: 24px; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill { height: 100%; width: 0%; background: var(--gold); transition: width 0.2s ease; }

.step-nav {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 4px;
}
.step-nav span.active { color: var(--navy); font-weight: 700; }

.step-title { font-size: 1.25rem; color: var(--navy-dark); margin: 0 0 4px; }
.step-desc { color: var(--text-muted); margin: 0 0 22px; font-size: 0.9rem; }

.repeatable-list { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.repeatable-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.repeatable-row input { flex: 1; }
.repeatable-row .btn-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; }
.btn-add-row { background: none; border: 1px dashed var(--navy); color: var(--navy); border-radius: var(--radius); padding: 8px 14px; cursor: pointer; font-size: 0.85rem; }

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.conditional-block {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  margin: 12px 0 20px;
}

/* Result */
.result-card h2 { margin-top: 0; color: var(--navy-dark); }
.result-actions { display: flex; gap: 12px; margin: 18px 0 28px; flex-wrap: wrap; }

.report-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  background: #fff;
  max-height: 640px;
  overflow-y: auto;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 0.95rem;
}
.report-preview h1 { text-align: center; font-size: 1.3rem; }
.report-preview h2 { font-size: 1.05rem; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin-top: 28px; }
.report-preview table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.report-preview table td, .report-preview table th { border: 1px solid #999; padding: 6px 10px; font-size: 0.9rem; }
.report-preview p { text-align: justify; }

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 24px;
}

@media print {
  .site-header, .site-footer, #gate, #wizard, .result-actions, h2 { }
  body * { visibility: hidden; }
  .report-preview, .report-preview * { visibility: visible; }
  .report-preview {
    position: absolute; left: 0; top: 0; width: 100%;
    border: none; max-height: none; overflow: visible;
  }
}

@media (max-width: 600px) {
  .card { padding: 20px; }
  .wizard-actions { flex-wrap: wrap; gap: 10px; }
}
