/* Risk Profiler — SEBI RIA risk profiling. Scoped styles. */

.rp { max-width: 860px; }

.rp-notice {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--muted); font-size: 0.95rem; margin-bottom: 24px;
}

.rp-h2 { font-size: 1.15rem; margin: 0 0 12px; }
.rp-optional { font-weight: 400; font-size: 0.82rem; color: var(--muted-light); }

/* Record details */
.rp-meta { margin-bottom: 28px; }
.rp-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.rp-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.92rem; }
.rp-field input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; background: #fff;
}
.rp-field input:focus { outline: 2px solid var(--warn-line); outline-offset: 1px; }

/* Questions */
.rp-questions { display: grid; gap: 18px; }
.rp-q { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
.rp-q legend { font-weight: 600; padding: 0; display: flex; align-items: baseline; gap: 10px; }
.rp-qnum {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 0.78rem; font-weight: 700;
}
.rp-opts { display: grid; gap: 8px; margin-top: 12px; }
.rp-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.rp-opt:hover { border-color: var(--muted-light); background: #fafafa; }
.rp-opt input { accent-color: #3c6ec8; width: 16px; height: 16px; flex: 0 0 auto; }
.rp-opt:has(input:checked) { border-color: #3c6ec8; background: #eef3fc; }

.rp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.rp-error { color: #c0392b; font-weight: 600; margin-top: 12px; }

/* Result */
.rp-result { margin-top: 28px; }

.rp-band { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); }
.rp-band-eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: 0.72rem; color: var(--muted); margin: 0 0 4px; }
.rp-band-head { font-weight: 800; font-size: 1.5rem; margin: 0 0 8px; }
.rp-band-blurb { margin: 0 0 10px; color: var(--muted); }
.rp-band-alloc { margin: 0; font-size: 0.92rem; }
.rp-band-alloc span { font-weight: 700; }
.rp-band.is-ok     { background: #effaf3; border-color: #b7e4c7; }
.rp-band.is-ok .rp-band-head     { color: #1b7a43; }
.rp-band.is-warn   { background: var(--warn-bg); border-color: var(--warn-line); }
.rp-band.is-warn .rp-band-head   { color: #b9770a; }
.rp-band.is-danger { background: #fdecec; border-color: #f1aeae; }
.rp-band.is-danger .rp-band-head { color: #c0392b; }

.rp-scores { margin-top: 20px; display: grid; gap: 14px; }
.rp-bar-label { font-size: 0.9rem; color: var(--muted); margin-bottom: 4px; }
.rp-bar-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.rp-bar-track { height: 9px; background: #e7e9ee; border-radius: 6px; overflow: hidden; }
.rp-bar-fill { height: 100%; background: #3c6ec8; border-radius: 6px; }

.rp-driver { margin-top: 14px; color: var(--muted); font-size: 0.92rem; }
.rp-meta-line { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }

.rp-export { margin-top: 20px; }

.rp-answers { margin-top: 22px; }
.rp-answers summary { cursor: pointer; font-weight: 600; }
.rp-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.rp-table th, .rp-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; background: none; }
.rp-table th { color: var(--muted); width: 62%; padding-right: 16px; font-weight: 400; }
.rp-table td { color: var(--ink); font-weight: 600; }
.rp-table tr:nth-child(even) td { background: none; }

.rp-foot-note { color: var(--muted-light); font-size: 0.85rem; margin-top: 18px; }

.rp-know { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.rp-know h2 { font-size: 1.3rem; margin: 0 0 12px; }
.rp-know p { color: var(--muted); }

@media (max-width: 560px) {
  .rp-table th { width: auto; display: block; }
  .rp-table td { display: block; padding-top: 0; }
}
