.rm-hsc {
  --rm-bg: #ffffff;
  --rm-ink: #111827;
  --rm-muted: #6b7280;
  --rm-line: #e5e7eb;
  --rm-soft: #f8fafc;
  --rm-soft-2: #f1f5f9;
  --rm-primary: #111827;
  --rm-primary-hover: #000000;
  --rm-good: #16a34a;
  --rm-warn: #d97706;
  --rm-bad: #dc2626;
  --rm-radius: 24px;
  --rm-shadow: 0 24px 80px rgba(15, 23, 42, .10);
  color: var(--rm-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.rm-hsc *, .rm-hsc *::before, .rm-hsc *::after { box-sizing: border-box; }

.rm-hsc__shell {
  width: min(100%, 980px);
  margin: 0 auto;
  background: var(--rm-bg);
  border: 1px solid var(--rm-line);
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow);
  overflow: hidden;
}

.rm-hsc__header {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--rm-line);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.rm-hsc__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--rm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rm-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rm-hsc h2, .rm-hsc h3, .rm-hsc h4, .rm-hsc p { margin-top: 0; }
.rm-hsc h2 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.02; letter-spacing: -.04em; }
.rm-hsc h3 { margin-bottom: 8px; font-size: clamp(24px, 3vw, 34px); line-height: 1.08; letter-spacing: -.03em; }
.rm-hsc h4 { margin-bottom: 10px; font-size: 18px; letter-spacing: -.02em; }
.rm-hsc p { color: var(--rm-muted); font-size: 16px; }

.rm-hsc__progress-wrap { align-self: end; }
.rm-hsc__progress-text { display: block; margin-bottom: 10px; color: var(--rm-muted); font-size: 14px; }
.rm-hsc__progress { height: 10px; background: var(--rm-soft-2); border-radius: 999px; overflow: hidden; }
.rm-hsc__progress span { display: block; width: 0%; height: 100%; background: var(--rm-primary); border-radius: inherit; transition: width .25s ease; }

.rm-hsc__form, .rm-hsc__result { padding: clamp(24px, 4vw, 44px); }
.rm-hsc__step { display: none; animation: rmFade .2s ease; }
.rm-hsc__step.is-active { display: block; }
@keyframes rmFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.rm-hsc__step-head { margin-bottom: 24px; }
.rm-hsc__step-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--rm-primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.rm-hsc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rm-hsc__field { display: grid; gap: 8px; }
.rm-hsc__field--full { grid-column: 1 / -1; }
.rm-hsc__field span { color: var(--rm-ink); font-size: 14px; font-weight: 700; }
.rm-hsc input, .rm-hsc select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--rm-line);
  border-radius: 16px;
  padding: 0 16px;
  background: #fff;
  color: var(--rm-ink);
  font: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.rm-hsc input:focus, .rm-hsc select:focus { border-color: var(--rm-primary); box-shadow: 0 0 0 4px rgba(17, 24, 39, .08); }

.rm-hsc__questions { display: grid; gap: 18px; }
.rm-hsc__question { margin: 0; padding: 18px; border: 1px solid var(--rm-line); border-radius: 20px; background: var(--rm-soft); }
.rm-hsc__question legend { padding: 0 4px; color: var(--rm-ink); font-weight: 800; }
.rm-hsc__options { display: grid; gap: 10px; margin-top: 14px; }
.rm-hsc__option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 14px;
  border: 1px solid var(--rm-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.rm-hsc__option:hover { transform: translateY(-1px); border-color: #cbd5e1; }
.rm-hsc__option input { width: 18px; min-height: 18px; accent-color: var(--rm-primary); }
.rm-hsc__option:has(input:checked) { border-color: var(--rm-primary); background: #f8fafc; }
.rm-hsc__option span { font-weight: 650; color: #1f2937; }

.rm-hsc__nav, .rm-hsc__result-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.rm-hsc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid var(--rm-primary);
  border-radius: 999px;
  padding: 0 22px;
  background: var(--rm-primary);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.rm-hsc__btn:hover { transform: translateY(-1px); background: var(--rm-primary-hover); border-color: var(--rm-primary-hover); }
.rm-hsc__btn--ghost { background: #fff; color: var(--rm-ink); border-color: var(--rm-line); }
.rm-hsc__btn--ghost:hover { background: var(--rm-soft); border-color: #cbd5e1; }
.rm-hsc__btn[hidden] { display: none; }

.rm-hsc__result-hero {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.rm-hsc__score-circle {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--rm-primary) calc(var(--score, 0) * 1%), #eef2f7 0);
  position: relative;
}
.rm-hsc__score-circle::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: #fff;
}
.rm-hsc__score-circle strong, .rm-hsc__score-circle span { position: relative; z-index: 1; }
.rm-hsc__score-circle strong { font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.rm-hsc__score-circle span { color: var(--rm-muted); margin-top: -38px; }

.rm-hsc__score-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.rm-hsc__score-card { padding: 16px; border: 1px solid var(--rm-line); border-radius: 18px; background: var(--rm-soft); }
.rm-hsc__score-card span { display: block; color: var(--rm-muted); font-size: 13px; font-weight: 700; }
.rm-hsc__score-card strong { display: block; margin-top: 8px; font-size: 28px; letter-spacing: -.04em; }
.rm-hsc__score-card em { display: inline-flex; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 800; }
.rm-hsc__score-card.is-good em { color: var(--rm-good); }
.rm-hsc__score-card.is-warn em { color: var(--rm-warn); }
.rm-hsc__score-card.is-bad em { color: var(--rm-bad); }

.rm-hsc__insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.rm-hsc__panel, .rm-hsc__recommendations, .rm-hsc__lead {
  padding: 22px;
  border: 1px solid var(--rm-line);
  border-radius: 20px;
  background: #fff;
}
.rm-hsc__recommendations ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.rm-hsc__recommendations li { padding-left: 26px; position: relative; color: #374151; }
.rm-hsc__recommendations li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 900; }

.rm-hsc__lead { margin-top: 18px; background: var(--rm-soft); }
.rm-hsc__lead-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 8px; }
.rm-hsc__lead small { color: var(--rm-muted); }
.rm-hsc[data-show-lead-form="no"] .rm-hsc__lead { display: none; }

@media (max-width: 860px) {
  .rm-hsc__header, .rm-hsc__result-hero, .rm-hsc__insights { grid-template-columns: 1fr; }
  .rm-hsc__score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-hsc__lead-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .rm-hsc__shell { border-radius: 18px; }
  .rm-hsc__grid, .rm-hsc__score-grid { grid-template-columns: 1fr; }
  .rm-hsc__nav { flex-direction: column-reverse; }
  .rm-hsc__btn { width: 100%; }
  .rm-hsc__score-circle { width: 132px; height: 132px; }
}

.rm-hsc__lead-form { margin: 0; }
.rm-hsc__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.rm-hsc__lead-message {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 750;
}
.rm-hsc__lead-message[data-type="success"] { color: var(--rm-good); }
.rm-hsc__lead-message[data-type="error"] { color: var(--rm-bad); }
.rm-hsc__lead-message[data-type="loading"] { color: var(--rm-muted); }
.rm-hsc__btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
