.hp-roles {
  border-block-end: 1px solid var(--line);
  background: #f8fafc;
}

.hp-roles .section-heading { margin-block-end: 1.45rem; }
.hp-roles-picker { min-width: 0; padding: 0; border: 0; margin: 0 0 .75rem; }
.hp-roles-picker legend { padding: 0; margin-block-end: .5rem; font-size: .9rem; color: var(--muted); font-weight: 650; }
.hp-roles-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.hp-roles-options label { position: relative; display: inline-flex; cursor: pointer; }
.hp-roles-options input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.hp-roles-options span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 650; }
.hp-roles-options label:hover span { border-color: #99a8ba; }
.hp-roles-options input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.hp-roles-options input:focus-visible + span { outline: 3px solid #2668b2; outline-offset: 3px; }
.hp-roles-summary { max-width: 48rem; margin-block-end: 1.25rem; color: var(--muted); }

.hp-roles-plan {
  display: grid;
  grid-template-columns: minmax(0, .52fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.85rem, 2.5vw, 1.75rem);
  max-width: 49rem;
  margin: 1.6rem 0 0;
  padding: clamp(.85rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.hp-roles-plan-label { margin: 0 0 .25rem; color: var(--muted); font-weight: 650; }
.hp-roles-plan strong { display: block; margin-block-end: .8rem; font-size: clamp(1.2rem, 2vw, 1.5rem); }
.hp-roles-plan img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 5px; }

.hp-roles-devices {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 25%);
  align-items: start;
  gap: clamp(1rem, 3vw, 2.4rem);
  scroll-margin-block-start: 6rem;
}

.hp-roles-devices figure { min-width: 0; }
.hp-roles-devices figcaption { margin-block-end: .55rem; color: var(--muted); font-size: .9rem; font-weight: 650; }
.hp-roles-screen { display: block; overflow: hidden; border-radius: 12px; background: #fff; border: 1px solid #cdd7e4; box-shadow: 0 15px 38px #10203813; }
.hp-roles-screen:hover { border-color: #647d9d; }
.hp-roles-screen img { width: 100%; height: auto; }
.hp-roles-phone .hp-roles-screen { border: 6px solid var(--navy-deep); border-radius: 25px; }

@media (max-width: 680px) {
  .hp-roles-plan { grid-template-columns: minmax(0, 1fr); }
  .hp-roles-devices { grid-template-columns: minmax(0, 1fr); }
  .hp-roles-phone { grid-row: 1; width: min(100%, 22.5rem); justify-self: center; }
}
