/* ============================================================
   Prairie Wealth — Risk Assessment Questionnaire
   Styles for the multi-step questionnaire in
   risk-assessment-questionnaire.html
   ============================================================ */

:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8faf9;
  --card: #ffffff;
  --brand-green: #0f2f24;
  --green-dark: #0a2119;
  --green-light: #eaf3ef;
  --gold: #c5a059;
  --gold-light: #faf5ea;
  --gold-hover: #b38e47;
  --ok: #15803d;
  --err: #b91c1c;
  --radius: 8px;
}

/* ---------------- intro + progress ---------------- */
/* The lede and the advisor strip read as one block, so the rule
   underneath them sits on .pw-meta rather than on both. */
.pw-lede {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 16px;
}

.pw-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin: 0 0 26px;
}

.pw-meta b { color: var(--brand-green); font-weight: 600; }

.pw-progress-wrap { margin: 0 0 28px; }

.pw-progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.pw-progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--brand-green), var(--gold));
  border-radius: 999px;
  transition: width .35s ease;
}

.pw-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

#pw-step-name { color: var(--brand-green); }

/* ---------------- steps ---------------- */
.pw-step { display: none; }
.pw-step.pw-active { display: block; animation: pw-fade .25s ease; }

@keyframes pw-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.pw-step-head { margin-bottom: 22px; }

.pw-step-head h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand-green);
  margin: 0;
}

.pw-step-head .pw-sub {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-top: 3px;
}

/* ---------------- questions ---------------- */
.pw-q {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.pw-q:first-of-type { border-top: 0; padding-top: 0; }

.pw-q-label {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.pw-q-num {
  display: inline-block;
  min-width: 24px;
  color: var(--gold);
  font-weight: 700;
}

.pw-req { color: var(--err); margin-left: 3px; }

.pw-optional {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--brand-green);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.pw-q-help {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 12px 24px;
  line-height: 1.55;
}

/* ---------------- inputs ---------------- */
.pw-input {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.pw-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .18);
}

.pw-input.pw-invalid { border-color: var(--err); background: #fef2f2; }

/* ---------------- options ---------------- */
.pw-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: 24px;
}

.pw-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.pw-opt:hover { border-color: var(--gold); background: var(--gold-light); }

.pw-opt input[type="radio"],
.pw-opt input[type="checkbox"] {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--brand-green);
  flex: 0 0 auto;
  cursor: pointer;
}

.pw-opt.pw-sel {
  border-color: var(--brand-green);
  background: var(--green-light);
  box-shadow: inset 0 0 0 1px var(--brand-green);
}

.pw-opt-text {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.pw-opt.pw-sel .pw-opt-text { color: var(--brand-green); font-weight: 500; }

.pw-opt-text small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

.pw-shariah-q .pw-options,
.pw-consent-q { margin-left: 24px; }

.pw-shariah-q .pw-options { flex-direction: row; flex-wrap: wrap; }
.pw-shariah-q .pw-opt { min-width: 120px; }

.pw-consent-q { padding-top: 20px; }
.pw-consent-q .pw-opt { background: var(--gold-light); border-color: rgba(197, 160, 89, .45); }

/* ---------------- errors ---------------- */
.pw-error {
  display: none;
  margin: 8px 0 0 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--err);
}
.pw-error.pw-show { display: block; }

.pw-submit-error {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--err);
  font-size: 14px;
  font-weight: 600;
}
.pw-submit-error.pw-show { display: block; }

/* ---------------- honeypot ---------------- */
.pw-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------- navigation ---------------- */
.pw-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pw-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.pw-btn:disabled { cursor: not-allowed; opacity: .7; }

.pw-btn-primary {
  background: var(--brand-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 47, 36, .18);
}
.pw-btn-primary:hover:not(:disabled) { background: var(--green-dark); }

.pw-btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line);
}
.pw-btn-ghost:hover:not(:disabled) { background: var(--bg); border-color: var(--muted); }

.pw-btn-action { display: inline-flex; align-items: center; justify-content: center; }

.pw-disclaimer {
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------------- completion panel ---------------- */
.pw-done { display: none; text-align: center; }
.pw-done.pw-show { display: block; animation: pw-fade .3s ease; }

.pw-check {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--ok);
  font-size: 30px;
  line-height: 58px;
  font-weight: 700;
}

.pw-done h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--brand-green);
  margin: 0 0 8px;
}

.pw-done-sub {
  max-width: 560px;
  margin: 0 auto 26px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ---------------- results summary ---------------- */
.pw-summary-box { text-align: left; }

.pw-result-head {
  background: var(--brand-green);
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 22px 24px;
  text-align: center;
}

.pw-result-head .pw-result-kicker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.pw-result-head .pw-result-name {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 27px;
  font-weight: 600;
  margin: 6px 0 4px;
}

.pw-result-head .pw-result-alloc {
  font-size: 14px;
  color: rgba(255, 255, 255, .85);
}

.pw-result-body {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 22px 24px;
  background: #fff;
}

.pw-alloc-bar {
  display: flex;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}

.pw-alloc-stocks { background: var(--brand-green); }
.pw-alloc-bonds { background: var(--gold); }

.pw-alloc-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.pw-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.pw-score {
  flex: 1 1 150px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.pw-score-label {
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.pw-score-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-green);
  margin-top: 2px;
}

.pw-score-note { font-size: 12px; color: var(--muted); margin-top: 1px; }

.pw-note {
  padding: 13px 16px;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  background: var(--gold-light);
  font-size: 13.5px;
  color: #5c4824;
  line-height: 1.55;
  margin-bottom: 12px;
}

.pw-note strong { color: #4a3b1a; }

.pw-answers { margin-top: 6px; }

.pw-answers h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-green);
  margin: 18px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.pw-answers dl {
  display: grid;
  grid-template-columns: minmax(140px, 40%) 1fr;
  gap: 0;
  margin: 0;
  font-size: 13.5px;
}

.pw-answers dt {
  padding: 7px 12px 7px 0;
  color: var(--muted);
  border-bottom: 1px solid #f1f3f2;
}

.pw-answers dd {
  padding: 7px 0 7px 12px;
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid #f1f3f2;
}

/* ---------------- responsive ---------------- */
@media (max-width: 640px) {
  .pw-q-help,
  .pw-options,
  .pw-error,
  .pw-shariah-q .pw-options,
  .pw-consent-q { margin-left: 0; }

  .pw-nav { flex-direction: column-reverse; align-items: stretch; }
  .pw-btn { width: 100%; }
  .pw-answers dl { grid-template-columns: 1fr; }
  .pw-answers dt { border-bottom: 0; padding-bottom: 0; }
  .pw-answers dd { padding-left: 0; padding-top: 2px; }
  .pw-result-head .pw-result-name { font-size: 22px; }
}

/* ---------------- print ---------------- */
@media print {
  .brand-bar,
  .pw-nav,
  .pw-actions-wrap { display: none !important; }
  .wrap { margin: 0; padding: 0; }
  .card-container { box-shadow: none; border: 0; padding: 0; }
}
