.roc {
  background:
    radial-gradient(ellipse 58% 70% at 0% 0%, rgba(214, 196, 255, 0.55), transparent 62%),
    radial-gradient(ellipse 42% 50% at 100% 100%, rgba(236, 210, 248, 0.4), transparent 64%),
    #f7f4fc;
}

.roc__grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.roc__copy,
.roc__calc,
.roc__result {
  min-width: 0;
}

.roc h2 {
  max-width: 11em;
}

.roc .section__lead {
  max-width: 28em;
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.roc__calc,
.roc__result {
  border-radius: 20px;
}

.roc__calc {
  display: grid;
  gap: 18px;
  padding: 18px 16px;
  border: 1px solid rgba(180, 164, 214, 0.45);
  background: #fffcff;
  box-shadow: 0 14px 32px rgba(70, 40, 120, 0.06);
}

.roc__q {
  min-width: 0;
}

.roc__q + .roc__q {
  padding-top: 16px;
  border-top: 1px solid rgba(28, 20, 33, 0.08);
}

.roc__q-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.roc__q-label {
  margin: 0;
  color: #17141f;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.roc__help,
.roc__note {
  margin: 6px 0 0;
  color: #7a7388;
  font-size: 0.86rem;
  line-height: 1.4;
}

.roc__input {
  flex: 0 0 auto;
  width: 6.6rem;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(180, 164, 214, 0.7);
  border-radius: 12px;
  background: #fff;
  color: #17141f;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: right;
  transition: color 160ms var(--ease);
}

.roc__input.is-sample {
  color: rgba(23, 20, 31, 0.38);
}

.roc__segments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.roc__seg {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(180, 164, 214, 0.7);
  border-radius: 12px;
  background: #fff;
  color: #17141f;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.roc__seg input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.roc__seg:has(input:checked) {
  border-color: #6b3fd4;
  background: #6b3fd4;
  color: #fff;
}

.roc__seg:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.roc__seg.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.roc__result {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 16px;
  border: 1px solid rgba(210, 186, 255, 0.22);
  background:
    radial-gradient(80% 50% at 100% 0%, rgba(124, 58, 237, 0.34), transparent 58%),
    linear-gradient(165deg, #2a1844 0%, #1b102c 52%, #140c22 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(28, 12, 48, 0.16);
}

.roc__result-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.roc__result-label svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.roc.is-sample .roc__figure,
.roc.is-sample .roc__line {
  opacity: 0.42;
}

.roc__figure,
.roc__line {
  transition: opacity 160ms var(--ease);
}

.roc__figure {
  margin: 10px 0 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 8vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.roc__line {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.35;
}

.roc__disclaimer {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.4;
}

.roc__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  color: #17141f;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.roc__cta:hover {
  background: #f4efff;
}

@media (min-width: 1024px) {
  .roc__grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.16fr) minmax(220px, 0.9fr);
    gap: 20px;
    align-items: stretch;
  }

  .roc__copy {
    align-self: center;
  }

  .roc__calc,
  .roc__result {
    padding: 20px 18px;
  }
}

[data-theme="dark"] .roc {
  background:
    radial-gradient(ellipse 52% 60% at 0% 0%, rgba(109, 70, 180, 0.28), transparent 62%),
    radial-gradient(ellipse 40% 48% at 100% 100%, rgba(150, 80, 170, 0.16), transparent 64%),
    #1a1424;
}
