:root {
  --hiw-ref-ink: #071b49;
  --hiw-ref-copy: #5d6f91;
  --hiw-ref-blue: #1769f7;
  --hiw-ref-blue-deep: #0958e8;
  --hiw-ref-soft: #edf5ff;
  --hiw-ref-border: #dce8f8;
}

body.how-it-works-premium-page {
  background: #fff;
  color: var(--hiw-ref-ink);
}

body.how-it-works-premium-page .main-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hiw-ref-page {
  background: #fff;
}

.hiw-ref {
  position: relative;
  overflow: hidden;
  background: #fff;
  color: var(--hiw-ref-ink);
}

.hiw-ref-shell {
  width: min(calc(100% - 64px), 1660px);
  margin-inline: auto;
  padding: clamp(76px, 7vw, 118px) 0 clamp(84px, 7.5vw, 126px);
}

.hiw-ref-header {
  max-width: 950px;
  margin: 0 auto clamp(50px, 5vw, 78px);
  text-align: center;
}

.hiw-ref-badge {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 21px;
  border: 1px solid #b9d8ff;
  border-radius: 999px;
  background: #f5f9ff;
  color: var(--hiw-ref-blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hiw-ref-header h1,
.hiw-ref-header h2 {
  margin: 24px 0 14px;
  color: var(--hiw-ref-ink);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: clamp(2.65rem, 4.15vw, 4.65rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.03;
}

.hiw-ref-header p {
  max-width: 830px;
  margin: 0 auto;
  color: var(--hiw-ref-copy);
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  line-height: 1.65;
}

.hiw-ref-panel {
  overflow: hidden;
  border: 1px solid var(--hiw-ref-border);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 68px rgba(21, 77, 150, .075), 0 4px 14px rgba(21, 77, 150, .035);
}

.hiw-ref-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.hiw-ref-step {
  position: relative;
  display: flex;
  min-height: 555px;
  flex-direction: column;
  padding: 54px clamp(26px, 2.6vw, 48px) 42px;
  background: #fff;
}

.hiw-ref-step + .hiw-ref-step::before {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 0;
  border-left: 1px dashed #c8dbf5;
  content: "";
}

.hiw-ref-number {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, #2c78ff, var(--hiw-ref-blue-deep));
  box-shadow: 0 15px 30px rgba(23, 105, 247, .2);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.hiw-ref-icon {
  display: grid;
  width: 100%;
  height: 72px;
  margin: 28px 0 20px;
  place-items: center;
  border-radius: 3px;
  background: var(--hiw-ref-soft);
  color: var(--hiw-ref-blue);
  font-size: 2.35rem;
}

.hiw-ref-step h2,
.hiw-ref-step h3 {
  margin: 0 0 14px;
  color: var(--hiw-ref-ink);
  font-size: clamp(1.2rem, 1.55vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.hiw-ref-step > p {
  margin: 0;
  color: var(--hiw-ref-copy);
  font-size: clamp(.92rem, 1vw, 1.06rem);
  line-height: 1.65;
}

.hiw-ref-step ul {
  display: grid;
  gap: 11px;
  margin: auto 0 0;
  padding: 28px 0 0;
  list-style: none;
}

.hiw-ref-step li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hiw-ref-blue);
  font-size: .95rem;
}

.hiw-ref-step li i {
  font-size: .92rem;
}

@media (hover: hover) {
  .hiw-ref-step {
    transition: background-color .22s ease, transform .22s ease;
  }

  .hiw-ref-step:hover {
    z-index: 1;
    background: #fbfdff;
    transform: translateY(-5px);
  }
}

@media (max-width: 1080px) {
  .hiw-ref-shell { width: min(calc(100% - 44px), 920px); }
  .hiw-ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hiw-ref-step:nth-child(3)::before { display: none; }
  .hiw-ref-step:nth-child(n + 3) { border-top: 1px dashed #c8dbf5; }
}

@media (max-width: 640px) {
  .hiw-ref-shell { width: min(calc(100% - 28px), 520px); padding-block: 58px 72px; }
  .hiw-ref-header { margin-bottom: 38px; }
  .hiw-ref-header h1,
  .hiw-ref-header h2 { font-size: clamp(2.25rem, 11vw, 3.1rem); }
  .hiw-ref-header p { font-size: .97rem; }
  .hiw-ref-grid { grid-template-columns: 1fr; }
  .hiw-ref-step { min-height: 0; padding: 34px 25px 30px; }
  .hiw-ref-step + .hiw-ref-step::before { display: none; }
  .hiw-ref-step:nth-child(n + 2) { border-top: 1px dashed #c8dbf5; }
  .hiw-ref-step ul { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-ref-step { transition: none !important; transform: none !important; }
}
