:root {
  color-scheme: light;
}

body {
  margin: 0;
  background: #e6e6e6;
  color: #151e28;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

.demo-page {
  min-height: 100vh;
  padding: 32px 16px;
}

.rrm-widget {
  --rrm-navy: #022057;
  --rrm-ink: #151e28;
  --rrm-muted: #565a7c;
  --rrm-border: #d7dde9;
  --rrm-panel: #ffffff;
  --rrm-soft: #f6f6ff;
  --rrm-blue: #566cd7;
  --rrm-burgundy: #7e151e;
  --rrm-teal: #2ccab9;
  --rrm-orange: #f79151;
  --rrm-green: #33b679;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--rrm-ink);
}

.rrm-card {
  overflow: hidden;
  background: var(--rrm-panel);
  border: 1px solid var(--rrm-border);
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(2, 32, 87, 0.12);
}

.rrm-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(2, 32, 87, 0.98), rgba(86, 108, 215, 0.72)),
    #022057;
  color: #ffffff;
}

.rrm-brand {
  display: grid;
  gap: 8px;
}

.rrm-kicker {
  margin: 0;
  color: #e6e6e6;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rrm-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.rrm-subtitle {
  max-width: 780px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.55;
}

.rrm-advisor {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 230px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.rrm-advisor img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.rrm-advisor strong,
.rrm-advisor span {
  display: block;
}

.rrm-advisor strong {
  font-size: 0.95rem;
}

.rrm-advisor span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
}

.rrm-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--rrm-border);
  background: #ffffff;
}

.rrm-step {
  position: relative;
  min-height: 64px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--rrm-border);
  background: transparent;
  color: var(--rrm-muted);
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.rrm-step:last-child {
  border-right: 0;
}

.rrm-step span {
  display: block;
  margin-bottom: 4px;
  color: var(--rrm-blue);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rrm-step.is-active {
  color: var(--rrm-navy);
  background: var(--rrm-soft);
}

.rrm-step.is-active::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 4px;
  background: var(--rrm-burgundy);
  border-radius: 4px 4px 0 0;
  content: "";
}

.rrm-content {
  padding: clamp(22px, 4vw, 48px);
}

.rrm-stage {
  display: grid;
  gap: 30px;
}

.rrm-section-heading {
  margin: 0;
  color: var(--rrm-navy);
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.rrm-copy {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--rrm-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.rrm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rrm-field {
  display: grid;
  gap: 8px;
}

.rrm-field.is-wide {
  grid-column: 1 / -1;
}

.rrm-field label,
.rrm-choice-label {
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

.rrm-field input,
.rrm-field select,
.rrm-field textarea {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid #c3cad8;
  border-radius: 6px;
  background: #ffffff;
  color: var(--rrm-ink);
  font: inherit;
  font-size: 1rem;
}

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

.rrm-field small {
  color: var(--rrm-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.rrm-money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid #c3cad8;
  border-radius: 6px;
  background: #ffffff;
}

.rrm-money-input span {
  padding-left: 13px;
  color: var(--rrm-muted);
  font-weight: 800;
}

.rrm-money-input input {
  border: 0;
}

.rrm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.rrm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--rrm-navy);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.rrm-button:hover,
.rrm-button:focus {
  filter: brightness(1.05);
}

.rrm-button.is-secondary {
  border-color: var(--rrm-border);
  background: #ffffff;
  color: var(--rrm-navy);
}

.rrm-button.is-accent {
  background: var(--rrm-burgundy);
}

.rrm-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.rrm-alert {
  display: none;
  padding: 12px 14px;
  border: 1px solid rgba(126, 21, 30, 0.28);
  border-radius: 6px;
  background: #fff5f5;
  color: var(--rrm-burgundy);
  font-weight: 700;
  line-height: 1.45;
}

.rrm-alert.is-visible {
  display: block;
}

.rrm-estimate-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rrm-stat {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--rrm-border);
  border-radius: 8px;
  background: #f8f8f8;
}

.rrm-stat span,
.rrm-stat strong {
  display: block;
}

.rrm-stat span {
  color: var(--rrm-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rrm-stat strong {
  margin-top: 8px;
  color: var(--rrm-navy);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.1;
}

.rrm-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rrm-product {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--rrm-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--rrm-ink);
  text-align: left;
}

.rrm-product.is-selected {
  border-color: var(--rrm-blue);
  box-shadow: 0 0 0 3px rgba(86, 108, 215, 0.14);
}

.rrm-product.is-disabled {
  background: #f2f2f2;
  color: #9ca3af;
}

.rrm-product h3 {
  margin: 0;
  color: var(--rrm-navy);
  font-size: 1.28rem;
}

.rrm-product.is-disabled h3 {
  color: #9ca3af;
}

.rrm-product p {
  margin: 0;
  color: var(--rrm-muted);
  line-height: 1.5;
}

.rrm-product.is-disabled p {
  color: #9ca3af;
}

.rrm-product-meter {
  margin-top: auto;
  padding: 14px;
  border-radius: 6px;
  background: #e7f6ff;
}

.rrm-product.is-disabled .rrm-product-meter {
  background: #e9ecef;
}

.rrm-product-meter span,
.rrm-product-meter strong {
  display: block;
}

.rrm-product-meter span {
  color: #344054;
  font-size: 0.85rem;
  line-height: 1.5;
}

.rrm-product-meter strong {
  margin-top: 8px;
  color: var(--rrm-navy);
  font-size: 1.5rem;
}

.rrm-selected-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  border: 1px solid #c3cad8;
  border-radius: 50%;
}

.rrm-product.is-selected .rrm-selected-dot {
  border-color: var(--rrm-navy);
  background: radial-gradient(circle at center, var(--rrm-navy) 0 45%, transparent 48%);
}

.rrm-preferences {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.rrm-radio-grid {
  display: grid;
  gap: 10px;
}

.rrm-radio-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--rrm-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--rrm-ink);
  font-weight: 700;
}

.rrm-radio-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--rrm-navy);
}

.rrm-chart-panel,
.rrm-summary-panel,
.rrm-disclaimer {
  border: 1px solid var(--rrm-border);
  border-radius: 8px;
  background: #ffffff;
}

.rrm-chart-panel {
  padding: 22px;
}

.rrm-chart-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.rrm-appreciation {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--rrm-border);
  border-radius: 6px;
}

.rrm-appreciation button {
  min-width: 64px;
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--rrm-border);
  background: #ffffff;
  color: var(--rrm-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.rrm-appreciation button:last-child {
  border-right: 0;
}

.rrm-appreciation button.is-active {
  background: var(--rrm-navy);
  color: #ffffff;
}

.rrm-chart-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 20px;
  align-items: center;
}

.rrm-chart {
  display: block;
  width: 100%;
  height: auto;
}

.rrm-chart text {
  fill: #344054;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 12px;
}

.rrm-chart .axis {
  stroke: #c3cad8;
  stroke-width: 1;
}

.rrm-chart .gridline {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.rrm-chart-summary {
  display: grid;
  gap: 14px;
}

.rrm-chart-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.rrm-chart-summary-row span {
  color: var(--rrm-muted);
}

.rrm-chart-summary-row strong {
  color: var(--rrm-navy);
  font-size: 1.05rem;
}

.rrm-chart-summary-row .is-orange {
  color: #bb5504;
}

.rrm-chart-summary-row .is-blue {
  color: var(--rrm-blue);
}

.rrm-chart-summary-row .is-burgundy {
  color: var(--rrm-burgundy);
}

.rrm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  color: var(--rrm-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.rrm-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.rrm-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.rrm-swatch.is-principal {
  background: var(--rrm-blue);
}

.rrm-swatch.is-interest {
  background: var(--rrm-orange);
}

.rrm-swatch.is-equity {
  background: var(--rrm-burgundy);
}

.rrm-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  padding: 22px;
}

.rrm-result-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
}

.rrm-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rrm-border);
}

.rrm-result-row span {
  color: var(--rrm-muted);
}

.rrm-result-row strong {
  color: var(--rrm-navy);
  font-size: 1.05rem;
  text-align: right;
}

.rrm-contact-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border-radius: 8px;
  background: var(--rrm-soft);
}

.rrm-contact-card img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(2, 32, 87, 0.14);
}

.rrm-contact-card h3,
.rrm-contact-card p {
  margin: 0;
}

.rrm-contact-card h3 {
  color: var(--rrm-navy);
  font-size: 1.2rem;
}

.rrm-contact-card p {
  color: var(--rrm-muted);
  line-height: 1.5;
}

.rrm-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--rrm-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.rrm-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--rrm-navy);
}

.rrm-disclaimer {
  padding: 16px;
  color: var(--rrm-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.rrm-disclaimer strong {
  color: var(--rrm-ink);
}

.rrm-status {
  color: var(--rrm-navy);
  font-weight: 800;
}

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

@media (max-width: 900px) {
  .rrm-topbar,
  .rrm-chart-heading,
  .rrm-chart-wrap,
  .rrm-summary-panel {
    grid-template-columns: 1fr;
  }

  .rrm-advisor {
    min-width: 0;
  }

  .rrm-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rrm-step:nth-child(2) {
    border-right: 0;
  }

  .rrm-products,
  .rrm-estimate-strip,
  .rrm-preferences {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .demo-page {
    padding: 0;
  }

  .rrm-card {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .rrm-topbar,
  .rrm-content {
    padding: 20px;
  }

  .rrm-progress {
    grid-template-columns: 1fr;
  }

  .rrm-step {
    border-right: 0;
  }

  .rrm-form-grid {
    grid-template-columns: 1fr;
  }

  .rrm-chart-panel {
    padding: 16px;
  }

  .rrm-appreciation {
    width: 100%;
  }

  .rrm-appreciation button {
    flex: 1;
  }

  .rrm-result-row,
  .rrm-chart-summary-row {
    grid-template-columns: 1fr;
  }

  .rrm-result-row strong,
  .rrm-chart-summary-row strong {
    text-align: left;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .demo-page {
    padding: 0;
  }

  .rrm-topbar,
  .rrm-progress,
  .rrm-actions,
  .rrm-contact-form {
    display: none !important;
  }

  .rrm-card,
  .rrm-summary-panel,
  .rrm-chart-panel,
  .rrm-disclaimer {
    border: 0;
    box-shadow: none;
  }
}
