/* Retirement Readiness — all classes namespaced rr- */
.rr-wrap {
  max-width: 880px;
  margin: 1.5em auto;
  font-size: 16px;
  line-height: 1.5;
  color: inherit;
}
.rr-tabs {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
  border-bottom: 2px solid #d8dee6;
}
.rr-tab {
  appearance: none;
  border: 1px solid #d8dee6;
  border-bottom: none;
  background: #f4f6f9;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  color: inherit;
}
.rr-tab-active {
  background: #fff;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
  color: #1a56db;
}
.rr-panel-hidden { display: none; }
.rr-h { margin: 0 0 0.4em; font-size: 1.35em; }
.rr-sub { margin: 0 0 1em; color: #5b6472; }
.rr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8em 1.2em;
  margin-bottom: 1.2em;
}
.rr-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92em;
  margin-bottom: 0.25em;
}
.rr-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5em 0.6em;
  font-size: 1em;
  border: 1px solid #c3ccd8;
  border-radius: 6px;
}
.rr-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5em 0.6em;
  font-size: 1em;
  border: 1px solid #c3ccd8;
  border-radius: 6px;
  background: #fff;
}
.rr-chart {
  width: 100%;
  height: auto;
  display: block;
  margin: 0.4em 0 1em;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
max-height: 480px; /* backstop: never run off-screen */
}
@media (max-width: 640px) {
.rr-chart { max-height: 320px; }
}}
.rr-hint {
  display: block;
  font-weight: 400;
  font-size: 0.82em;
  color: #5b6472;
  margin-top: 0.25em;
}
.rr-section-title {
  font-size: 1.05em;
  font-weight: 700;
  margin: 1.4em 0 0.6em;
  padding-top: 0.8em;
  border-top: 1px solid #e3e8ef;
}
.rr-budget-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
.rr-budget-table th,
.rr-budget-table td {
  padding: 0.45em 0.6em;
  border-bottom: 1px solid #e3e8ef;
  text-align: left;
}
.rr-budget-table thead th {
  background: #f4f6f9;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rr-budget-table td:last-child,
.rr-budget-table th:last-child { text-align: right; width: 180px; }
.rr-budget-table input {
  width: 140px;
  max-width: 100%;
  padding: 0.35em 0.5em;
  font-size: 1em;
  border: 1px solid #c3ccd8;
  border-radius: 6px;
  text-align: right;
}
.rr-budget-table tfoot th { font-size: 1.05em; }
.rr-need-box {
  background: #eef4ff;
  border: 1px solid #c9dcff;
  border-radius: 8px;
  padding: 1em 1.2em;
  margin-bottom: 1em;
}
.rr-need-label { font-weight: 600; }
.rr-need-value {
  font-size: 1.6em;
  font-weight: 700;
  color: #1a56db;
  margin: 0.15em 0 0.6em;
}
.rr-btn {
  appearance: none;
  border: none;
  background: #1a56db;
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  padding: 0.6em 1.2em;
  border-radius: 6px;
  cursor: pointer;
}
.rr-btn:hover { background: #1443ad; }
.rr-results {
  background: #f8fafc;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 1em 1.2em;
  margin-bottom: 1em;
}
.rr-result-row {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  padding: 0.35em 0;
  border-bottom: 1px solid #eef1f5;
}
.rr-result-row:last-child { border-bottom: none; }
.rr-result-row span:last-child { font-weight: 700; text-align: right; }
.rr-neg { color: #b42318; }
.rr-pos { color: #1c7a3d; }
.rr-note {
  font-size: 0.92em;
  color: #8a5a00;
  background: #fff8e6;
  border: 1px solid #f0d98c;
  border-radius: 6px;
  padding: 0.6em 0.9em;
  margin-bottom: 1em;
}
.rr-note:empty { display: none; }
.rr-verdict {
  border-radius: 8px;
  padding: 1em 1.2em;
  margin-bottom: 1em;
}
.rr-verdict p { margin: 0.3em 0; }
.rr-verdict p:first-child { margin-top: 0; }
.rr-verdict p:last-child { margin-bottom: 0; }
.rr-ok { background: #e9f7ef; border: 1px solid #a9dcc0; }
.rr-warn { background: #fdeeee; border: 1px solid #f3b8b0; }
.rr-bars { margin: 0.4em 0 1em; }
.rr-bar-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 0.5em;
}
.rr-bar-label { width: 150px; flex-shrink: 0; font-size: 0.92em; }
.rr-bar-track {
  flex-grow: 1;
  height: 14px;
  background: #e9edf2;
  border-radius: 7px;
  overflow: hidden;
}
.rr-bar { height: 100%; border-radius: 7px; transition: width 0.25s ease; }
.rr-bar-income { background: #1a56db; }
.rr-bar-need { background: #9aa5b5; }
.rr-bar-val { width: 130px; flex-shrink: 0; text-align: right; font-weight: 600; font-size: 0.92em; }
.rr-footnotes { font-size: 0.86em; color: #5b6472; margin-bottom: 1.2em; }
.rr-footnotes p { margin: 0.35em 0; }
.rr-report-actions { margin-bottom: 1.2em; }
.rr-report-actions .rr-hint { margin-left: 0.7em; }
.rr-lead {
  background: #f8fafc;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 1em 1.2em;
  margin-bottom: 1em;
}
.rr-lead-h { margin: 0 0 0.4em; font-size: 1.1em; }
.rr-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.rr-consent {
  display: block;
  margin: 0.8em 0;
  font-size: 0.95em;
  cursor: pointer;
}
.rr-consent input { margin-right: 0.5em; }
.rr-lead-actions { margin-bottom: 0.6em; }
.rr-lead-msg { font-weight: 600; min-height: 1.4em; }
.rr-footer {
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 1px solid #e3e8ef;
  font-size: 0.85em;
  color: #5b6472;
}
.rr-footer p { margin: 0.4em 0; }
@media (max-width: 600px) {
  .rr-bar-label { width: 110px; }
  .rr-bar-val { width: 100px; }
  .rr-budget-table td:last-child,
  .rr-budget-table th:last-child { width: auto; }
}

/* On-screen copyright footer. */
.rr-wrap .rr-copyright { border-top: 1px solid #e2e8f0; margin: 1.5em 0 0; padding-top: 0.75em; text-align: center; color: #9ca3af; font-size: 0.8em; }

/* Share link + QR code. */
.rr-wrap .rr-share { display: flex; align-items: center; gap: 1em; flex-wrap: wrap; margin: 1em 0; padding: 1em 1.25em; border: 1px solid #e2e8f0; border-radius: 10px; background: #fbfdff; }
.rr-wrap .rr-qr { width: 132px; height: 132px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.rr-wrap .rr-share-msg { font-weight: 600; color: #15803d; margin: 0; flex-basis: 100%; }
.rr-wrap .rr-share-url { flex: 1 1 100%; font-size: 0.8em; padding: 0.5em 0.6em; border: 1px solid #c3ccd8; border-radius: 6px; box-sizing: border-box; }
.rr-wrap .rr-ts-line { color: #6b7280; font-size: 0.8em; margin: 0.3em 0 0; }
