.rh-plan-grid {
  display: grid;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}
.rh-plan-grid-windows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rh-plan-grid-linux { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.rh-windows-family { margin: 40px 0; }
.rh-windows-family-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 16px;
  padding: 0 0 13px;
  border-bottom: 1px solid #30446a;
}
.rh-windows-family-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border: 1px solid #4865a5;
  border-radius: 9px;
  color: #9bd5ff;
  background: #162949;
}
.rh-windows-family-heading svg { width: 23px; height: 23px; }
.rh-windows-family-heading h3 {
  margin: 0;
  color: #e8f2ff;
  font: 700 clamp(19px, 2.45vw, 29px)/1.2 var(--rh-font);
}
.rh-windows-family-heading h3 span { color: #94ccff; }
.rh-windows-family-kicker { color: #a5c9f6; font-size: 10px; font-weight: 750; letter-spacing: .09em; margin-bottom: 5px; }
.rh-windows-family-heading p { margin: 6px 0 0; color: #b1c3dd; font-size: 13px; }

.rh-plan {
  --plan-accent: #91ecc0;
  --plan-line: #395e54;
  --plan-text: #ebf8ef;
  --plan-muted: #b8d0c2;
  --plan-tile: #122723;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-wrap: anywhere;
  border: 1px solid var(--plan-line);
  border-radius: 12px;
  font-family: var(--rh-font, Inter, system-ui, sans-serif);
  color: var(--plan-text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.rh-plan:is(:hover,:focus-within) {
  border-color: var(--plan-accent);
  box-shadow: 0 8px 30px #02070d88;
}
.rh-plan-windows {
  --plan-accent: #9bd5ff;
  --plan-line: #3b5885;
  --plan-text: #f2f7ff;
  --plan-muted: #bacdea;
  --plan-tile: #132745;
  border-radius: 16px;
  background: #0c182c;
}
.rh-plan-linux { background: linear-gradient(145deg,#152c27,#0c1a19 65%); }

.rh-plan-header {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  padding: 13px 14px;
}
.rh-plan-header h4, .rh-plan-header p { width: 100%; margin: 0; }
.rh-plan-header h4 {
  color: var(--plan-text);
  font: 800 clamp(17px,1.75vw,22px)/1.19 var(--rh-font, Inter, system-ui, sans-serif);
  letter-spacing: -.02em;
}
.rh-plan-header p { color: var(--plan-muted); font-size: 12px; line-height: 1.4; }
.rh-plan-windows .rh-plan-header {
  min-height: 127px;
  align-content: center;
  padding: 16px 17px;
  border-bottom: 1px solid var(--plan-line);
  background-image: linear-gradient(90deg, #0d1d35 15%, #0d1d35f5 48%, #132b5380), url('/img/offer-vps-windows.webp');
  background-position: center, right 47%;
  background-size: cover, 56% auto;
  background-repeat: no-repeat;
}
.rh-plan-windows .rh-plan-header p { max-width: 43ch; }
.rh-plan-linux .rh-plan-header {
  border-top: 2px solid var(--plan-accent);
  background:
    linear-gradient(90deg,#102420 15%,transparent 100%),
    radial-gradient(circle,#72d3a42b 1px,transparent 1px) top right / 9px 9px,
    #152e27;
}

.rh-plan-label, .rh-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--plan-accent);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}
.rh-plan-linux .rh-plan-label { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.rh-plan-badge { border: 1px solid var(--plan-line); border-radius: 5px; padding: 3px 6px; color: var(--plan-text); background: #101c29db; }
.rh-plan-terminal-icon {
  padding: 2px 3px;
  border: 1px solid #547d6b;
  border-radius: 4px;
  font: 700 11px/1 ui-monospace, monospace;
}
.rh-plan-window-icon { display: grid; grid-template-columns: repeat(2, 5px); gap: 2px; }
.rh-plan-window-icon > i { height: 5px; border-radius: 1px; background: currentColor; }

.rh-plan-specs, .rh-plan-details {
  display: grid;
  gap: 5px;
  padding: 0 13px;
}
.rh-plan-specs {
  grid-template-columns: repeat(3, minmax(0,1fr));
  margin: 4px 0 0;
}
.rh-plan-windows .rh-plan-specs { margin-top: 12px; }
.rh-plan-specs > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--plan-line);
  border-radius: 7px;
  background: var(--plan-tile);
}
.rh-plan dt { color: var(--plan-muted); font-size: 10px; font-weight: 700; line-height: 1.15; }
.rh-plan dd { margin: 3px 0 0; color: var(--plan-text); font-size: 13px; font-weight: 750; line-height: 1.2; }
.rh-plan-details { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 9px 0 11px; }
.rh-plan-windows .rh-plan-details { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rh-plan-details > div { min-width: 0; border-left: 1px solid var(--plan-line); padding-left: 6px; }
.rh-plan-details dd { font-size: 11px; }
.rh-plan-linux .rh-plan-specs { margin-top: auto; padding-top: 9px; }
.rh-plan-linux .rh-plan-specs dd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.rh-plan-linux .rh-plan-details > div { border-left-style: dashed; }

.rh-plan-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-top: auto;
  padding: 10px 13px;
  border-top: 1px solid var(--plan-line);
  background: #091a17;
}
.rh-plan-windows .rh-plan-footer { background: #101e34; }
.rh-plan-footer:has(.rh-vps-rate-sale) {
  background: linear-gradient(110deg,#382820,transparent 70%), #101e20;
}
.rh-plan-windows .rh-plan-footer:has(.rh-vps-rate-sale) { background-color: #13233c; }
.rh-plan .rh-vps-rate-current strong { color: var(--plan-text); font-size: clamp(21px, 2.2vw, 29px); }
.rh-plan .rh-vps-rate-sale .rh-vps-rate-current strong { color: #ffbc96; }
.rh-plan .rh-vps-rate-before del { font-size: 18px; }
.rh-plan .rh-vps-rate-current small, .rh-plan .rh-vps-rate-before del { color: #dccfe0; }
.rh-plan-action { display: grid; justify-items: end; min-width: 0; gap: 3px; }
.rh-plan-stock { font-size: 10px; color: #ffd2a5; }
.rh-plan-order, .rh-plan-unavailable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  min-height: 37px;
  border: 1px solid var(--plan-accent);
  border-radius: 7px;
  background: var(--plan-accent);
  color: #0a1715;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.rh-plan-windows .rh-plan-order { background: #bddaff; border-color: #bddaff; color: #101d39; }
.rh-plan-order:hover { background: #e1fff0; }
.rh-plan-windows .rh-plan-order:hover { background: #e4efff; }
.rh-plan-unavailable { border-color: var(--plan-line); color: var(--plan-muted); background: transparent; }
.rh-plan-order .rh-arrow { flex: none; }

.rh-windows-family-ryzen .rh-plan-windows {
  --plan-accent: #ffad73;
  --plan-line: #885335;
  --plan-text: #fff5ee;
  --plan-muted: #e0c2b0;
  --plan-tile: #2f211d;
  background: #211918;
}
.rh-windows-family-ryzen .rh-plan-header {
  background-image: linear-gradient(90deg, #261b18 15%, #2b1c17f5 46%, #54270b45), url('/img/offer-amd-ryzen.webp');
}
.rh-windows-family-ryzen .rh-plan-footer { background: #2b1e18; }
.rh-windows-family-ryzen .rh-plan-footer:has(.rh-vps-rate-sale) {
  background: linear-gradient(110deg, #4b2a1c, transparent 70%), #2b1e18;
}
.rh-windows-family-ryzen .rh-plan-order {
  border-color: var(--plan-accent);
  background: var(--plan-accent);
  color: #281809;
}
.rh-windows-family-ryzen .rh-plan-order:hover { background: #ffd1ad; }

@media (max-width: 1030px) {
  .rh-plan-grid-linux { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 690px) {
  .rh-plan-grid-windows, .rh-plan-grid-linux { grid-template-columns: minmax(0,1fr); }
  .rh-windows-family { margin-block: 28px; }
}
@media (max-width: 420px) {
  .rh-plan-windows .rh-plan-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 365px) {
  .rh-plan-footer { gap: 6px; padding-inline: 8px; }
  .rh-plan-order, .rh-plan-unavailable { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .rh-plan { transition: none; }
}
