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

   In this page's diagrams:
     blue   = placed by the scheduler, running as asked
     orange = a replica that is changing (starting, moving, upgrading)
   ============================================================ */

/* "Microservices" is a long word: a smaller display size than the LB page. */
.hero-title {
  font-size: clamp(2.6rem, 1.5rem + 3.3vw, 4.1rem);
  line-height: 1;
}

.hero-title span {
  font-size: 0.7em;
}

.hero-copy {
  font-size: var(--fs-lead);
}

.hero-copy strong {
  color: #fff;
  font-weight: var(--fw-semibold);
}

/* ------------------------------------------------------------
   Hero diagram: the parts only this page draws
   ------------------------------------------------------------ */
.ms-wire-new path {
  stroke: var(--accent-strong);
}

.ms-wire-lb path {
  stroke: rgba(124, 196, 242, 0.55);
  stroke-width: 1.5;
}

.ms-new rect {
  fill: #2a1d16;
  stroke: var(--accent-strong);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 12px rgba(255, 122, 36, 0.3));
}

.ms-ghost {
  opacity: 0.65;
}

.ms-ghost rect {
  fill: transparent;
  stroke: rgba(148, 163, 182, 0.55);
  stroke-dasharray: 4 4;
}

.ms-host-lost rect {
  fill: rgba(239, 90, 90, 0.05);
  stroke: rgba(239, 90, 90, 0.6);
  stroke-dasharray: 5 5;
}

.ms-host-lost text {
  fill: var(--bad);
}

.ms-host-drain rect {
  stroke: rgba(255, 122, 36, 0.6);
  stroke-dasharray: 5 5;
}

.ms-host-drain text {
  fill: var(--accent-strong);
}

.ms-t-addr {
  fill: var(--text);
  font-size: 13px;
}

.ms-key-new::before {
  border-top: 2px solid var(--accent-strong);
}

/* ------------------------------------------------------------
   Services: the command beside what each part of it means
   ------------------------------------------------------------ */
.ms-spec {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 2.5rem;
}

.ms-spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  align-content: start;
  margin: 0;
}

.ms-spec-list > div {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.ms-spec-list > div:nth-child(-n+2) {
  padding-top: 0;
  border-top: 0;
}

.ms-spec-list dt {
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
}

.ms-spec-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   Small drawings: scale, upgrades, failover
   ------------------------------------------------------------ */
.rk-mode h3 {
  margin-bottom: 0.9rem;
}

.rk-mode h3 + p {
  margin-top: -0.4rem;
}

.ms-m-text {
  fill: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.ms-m-new {
  fill: var(--accent-strong);
}

.ms-m-dim {
  fill: var(--muted);
}

.ms-m-track {
  fill: rgba(148, 163, 182, 0.16);
}

.ms-m-fill {
  fill: var(--accent-hi);
}

.ms-m-grow {
  fill: var(--accent-strong);
}

.ms-m-host {
  fill: rgba(9, 16, 26, 0.6);
  stroke: var(--line-strong);
}

.ms-m-host-lost {
  fill: rgba(239, 90, 90, 0.06);
  stroke: rgba(239, 90, 90, 0.65);
  stroke-dasharray: 4 4;
}

.ms-m-arc {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 1.75;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
}

.ms-more {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.ms-more .btn-secondary {
  color: var(--text);
  background: rgba(124, 196, 242, 0.08);
  border: 1px solid var(--line-strong);
}

.ms-more .btn-secondary:hover {
  background: rgba(124, 196, 242, 0.16);
  border-color: var(--accent-hi);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 991px) {
  .ms-spec {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .ms-spec-list {
    grid-template-columns: 1fr;
  }

  .ms-spec-list > div:nth-child(2) {
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
  }
}
