/* ============================================================
   load-balancer.html — page styles. The shared look (colours,
   hero, sections, diagram parts, cards) is in theme.css.
   ============================================================ */

/* ------------------------------------------------------------
   How it works: one packet, step by step
   ------------------------------------------------------------ */
.rk-steps {
  counter-reset: rk-step;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.rk-step {
  counter-increment: rk-step;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 1.5rem 3rem;
  padding: 0 0 2.5rem 4.25rem;
}

.rk-step:last-child {
  padding-bottom: 0;
}

/* the numbered marker and the line joining the steps */
.rk-step::before {
  content: counter(rk-step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1.5px solid var(--accent-hi);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--accent-hi);
  font-weight: var(--fw-bold);
  box-shadow: 0 0 1.5rem rgba(124, 196, 242, 0.25);
}

.rk-step::after {
  content: "";
  position: absolute;
  left: calc(1.3rem - 1px);
  top: 3rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(124, 196, 242, 0.5), rgba(124, 196, 242, 0.12));
}

.rk-step:last-child::after {
  display: none;
}

.rk-step-reply::before {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  box-shadow: 0 0 1.5rem rgba(255, 122, 36, 0.3);
}

.rk-step h3 {
  margin: 0.3rem 0 0.5rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: var(--fw-bold);
  line-height: var(--lh-h3);
}

.rk-step p {
  margin: 0;
  color: var(--muted);
  line-height: var(--lh-body);
}

/* a packet, drawn as its address headers */
.rk-packet {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 9, 15, 0.6);
}

.rk-hdr {
  display: flex;
  flex: 1 1 8.5rem;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  white-space: nowrap;
}

.rk-hdr small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: var(--fw-semibold);
}

.rk-hdr-vip {
  border-color: rgba(124, 196, 242, 0.55);
  background: #12283d;
}

.rk-hdr-outer {
  flex-basis: 100%;
  border-style: dashed;
  border-color: rgba(124, 196, 242, 0.5);
  background: transparent;
  color: var(--accent-hi);
}

.rk-step-reply .rk-hdr-vip {
  border-color: rgba(255, 122, 36, 0.6);
  background: rgba(255, 122, 36, 0.1);
}

.rk-packet-note {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  color: var(--ok);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
}

.rk-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  max-width: 62rem;
  margin: 4rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.rk-facts dt {
  margin-bottom: 0.4rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
}

.rk-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   Staying up: the health-check timeline
   ------------------------------------------------------------ */
.rk-check {
  max-width: 46rem;
  margin: 0 auto 3rem;
}

.rk-check-track {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.4rem;
}

.rk-tick {
  height: 2.25rem;
  border-radius: 6px;
}

.rk-tick-ok {
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.85), rgba(62, 207, 142, 0.5));
}

.rk-tick-bad {
  background: linear-gradient(180deg, rgba(239, 90, 90, 0.9), rgba(239, 90, 90, 0.55));
}

.rk-tick-out {
  border: 1px dashed rgba(148, 163, 182, 0.5);
}

.rk-check-labels {
  display: grid;
  grid-template-columns: 3fr 5fr 4fr;
  gap: 0.4rem;
  margin-top: 0.7rem;
  color: var(--text-soft);
  font-size: var(--fs-small);
}

/* ------------------------------------------------------------
   Management: the CLI beside the three ways in
   ------------------------------------------------------------ */
.rk-manage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 2rem;
}

.rk-manage-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1199px) {
  .rk-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .rk-step,
  .rk-manage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .rk-step {
    padding-left: 3.4rem;
  }

  .rk-facts {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .rk-check-labels {
    grid-template-columns: 1fr;
  }
}
