:root {
  --bg: #040914;
  --bg-soft: #07111f;
  --surface: rgba(8, 20, 36, 0.82);
  --surface-2: rgba(12, 28, 48, 0.88);
  --border: rgba(69, 120, 174, 0.28);
  --text: #f1f6ff;
  --muted: #9caec4;
  --blue: #1687ff;
  --blue-2: #3ca7ff;
  --green: #35db87;
  --yellow: #f4c950;
  --danger: #ff6474;
  --radius: 14px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { max-width: 100%; display: block; }

.shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header (mirrors index.html) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  background: rgba(4, 9, 20, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  margin-right: 6px;
}
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-2), var(--blue));
  font-size: 14px; font-weight: 800; color: #fff;
}
.desktop-nav { display: flex; gap: 22px; margin-right: auto; flex-wrap: wrap; }
.desktop-nav a { font-size: 13px; font-weight: 600; color: var(--muted); transition: color .15s ease; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--blue-2); }
.header-actions { display: flex; gap: 10px; }
.button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
}
.button-outline { border: 1px solid var(--border); color: var(--text); }
.button-outline:hover { border-color: var(--blue-2); color: var(--blue-2); }
.button-solid { background: var(--blue); color: #fff; }
.button-solid:hover { background: var(--blue-2); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb a { color: var(--blue-2); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* ---------- Page layout ---------- */
.cs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
  margin: 20px auto 60px;
}

/* ---------- Sidebar ---------- */
.cs-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cs-side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}
.cs-side-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.cs-onpage { display: flex; flex-direction: column; gap: 4px; }
.cs-onpage a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.cs-onpage a::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(156, 174, 196, .4);
  flex-shrink: 0;
}
.cs-onpage a:hover { color: var(--text); background: rgba(22, 135, 255, .08); }
.cs-onpage a.active { color: var(--blue-2); background: rgba(22, 135, 255, .12); }
.cs-onpage a.active::before { background: var(--blue-2); box-shadow: 0 0 0 3px rgba(22,135,255,.2); }

.cs-info-list { display: flex; flex-direction: column; gap: 14px; }
.cs-info-item { display: flex; gap: 10px; align-items: flex-start; }
.cs-info-icon {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(22, 135, 255, .12);
  color: var(--blue-2);
  font-size: 13px;
}
.cs-info-item h4 { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cs-info-item p { margin: 0; font-size: 12.5px; color: #dbe6f2; }
.cs-info-item a.gh-link { color: var(--blue-2); font-weight: 600; }
.cs-info-item a.gh-link:hover { text-decoration: underline; }

.cs-download-card {
  border: 1px solid rgba(255, 100, 116, .35);
  background: rgba(255, 100, 116, .06);
}
.cs-download-card p { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.cs-download-btn {
  width: 100%; justify-content: center;
  padding: 11px 14px; border-radius: 8px;
  background: var(--blue); color: #fff;
  font-size: 12.5px; font-weight: 700;
  border: none;
}
.cs-download-btn:hover { background: var(--blue-2); }
.cs-download-meta { margin: 10px 0 0; font-size: 11px; color: var(--muted); }

/* ---------- Main content ---------- */
.cs-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }

.cs-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 30px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
}
.cs-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-2);
  margin-bottom: 10px;
}
.cs-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; }
.cs-hero-subtitle { margin: 0 0 14px; color: var(--blue-2); font-weight: 700; font-size: 15px; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cs-tags span {
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.cs-tags span::before { content: "◆ "; color: var(--blue-2); font-size: 8px; }
.cs-hero p.cs-desc { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 46ch; }

.cs-hero-visual {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.cs-hw-box {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  background: linear-gradient(160deg, rgba(12,26,46,.9), rgba(6,14,26,.9));
}
.cs-hw-box.old { border-color: rgba(156, 174, 196, .3); }
.cs-hw-box.new { border-color: rgba(53, 219, 135, .45); box-shadow: 0 0 30px rgba(53,219,135,.12); }
.cs-hw-box h4 { margin: 0 0 4px; font-size: 14px; }
.cs-hw-box small { color: var(--muted); font-size: 10.5px; }
.cs-hw-icon {
  width: 64px; height: 64px; margin: 14px auto 0;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 26px;
}
.cs-hw-box.old .cs-hw-icon { background: rgba(156,174,196,.12); color: #c7d4e3; }
.cs-hw-box.new .cs-hw-icon { background: rgba(53,219,135,.14); color: var(--green); }
.cs-hw-arrow { flex: 0 0 auto; font-size: 20px; color: var(--green); letter-spacing: -2px; }

/* Section header */
.cs-section-title {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 18px;
  font-size: 13px; font-weight: 800; letter-spacing: .05em;
  color: var(--blue-2); text-transform: uppercase;
}
.cs-section-title b { color: var(--muted); font-weight: 800; }

/* Overview cards */
.cs-overview-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px;
}
.cs-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}
.cs-card-icon {
  width: 34px; height: 34px; margin-bottom: 10px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(22,135,255,.12);
  color: var(--blue-2);
  font-size: 15px;
}
.cs-card h4 { margin: 0 0 6px; font-size: 13.5px; }
.cs-card p { margin: 0; font-size: 12px; color: var(--muted); }

.cs-objective {
  border: 1px solid rgba(53, 219, 135, .3);
  background: rgba(53, 219, 135, .06);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #dbe6f2;
}
.cs-objective b { color: var(--green); }

/* Challenge cards */
.cs-challenge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cs-challenge-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 16px; }
.cs-challenge-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cs-challenge-num {
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(22,135,255,.14); color: var(--blue-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.cs-challenge-icon { font-size: 16px; color: var(--muted); }
.cs-challenge-card h4 { margin: 0 0 6px; font-size: 13.5px; }
.cs-challenge-card p { margin: 0; font-size: 12px; color: var(--muted); }

/* Architecture */
.cs-arch-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.cs-arch-diagram {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 300px;
}
.cs-arch-col { display: flex; flex-direction: column; gap: 22px; }
.cs-arch-node {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600;
}
.cs-arch-node .dot {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(22,135,255,.12); color: var(--blue-2); font-size: 14px;
  flex-shrink: 0;
}
.cs-arch-node small { display: block; color: var(--muted); font-weight: 500; font-size: 10.5px; }
.cs-arch-node .vpn-tag { font-size: 9px; color: var(--muted); margin-left: auto; white-space: nowrap; }

.cs-arch-center { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cs-arch-cloud { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.cs-arch-cloud span.icon { font-size: 22px; }
.cs-arch-core {
  width: 108px; padding: 14px 10px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(53,219,135,.5);
  background: linear-gradient(160deg, rgba(53,219,135,.18), rgba(6,20,14,.6));
  box-shadow: 0 0 26px rgba(53,219,135,.18);
}
.cs-arch-core .icon { font-size: 22px; color: var(--green); }
.cs-arch-core strong { display: block; margin-top: 6px; font-size: 11px; }
.cs-arch-analyzer {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted); text-align: center;
}
.cs-arch-analyzer .icon { font-size: 18px; color: var(--blue-2); }

.cs-arch-highlights {
  border: 1px solid rgba(53,219,135,.3);
  background: rgba(53,219,135,.05);
  border-radius: var(--radius);
  padding: 20px;
}
.cs-arch-highlights h3 { margin: 0 0 14px; font-size: 14px; color: var(--green); }
.cs-arch-highlights ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.cs-arch-highlights li { display: flex; gap: 8px; font-size: 12.5px; color: #dbe6f2; }
.cs-arch-highlights li::before { content: "✓"; color: var(--green); font-weight: 800; flex-shrink: 0; }

/* Migration steps */
.cs-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px 18px 20px;
}
.cs-steps::before {
  content: "";
  position: absolute;
  top: 45px; left: 8%; right: 8%;
  height: 1px;
  background-image: linear-gradient(90deg, rgba(69,120,174,.5) 50%, transparent 0);
  background-size: 10px 1px;
}
.cs-step { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cs-step-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--blue-2);
  z-index: 1;
}
.cs-step h4 { margin: 0; font-size: 12.5px; }
.cs-step p { margin: 0; font-size: 11px; color: var(--muted); }

/* Tech stack + contribution row */
.cs-split-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
.cs-tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-tech-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 12px;
}
.cs-tech-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(53,219,135,.12); color: var(--green); flex-shrink: 0;
}
.cs-tech-item strong { display: block; font-size: 12.5px; }
.cs-tech-item small { color: var(--muted); font-size: 10.5px; }

.cs-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  height: 100%;
}
.cs-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-check-list li { display: flex; gap: 8px; font-size: 12.5px; color: #dbe6f2; }
.cs-check-list li::before { content: "✓"; color: var(--green); font-weight: 800; flex-shrink: 0; }
.cs-arrow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-arrow-list li { display: flex; gap: 8px; font-size: 12.5px; color: #dbe6f2; }
.cs-arrow-list li::before { content: "→"; color: var(--blue-2); font-weight: 800; flex-shrink: 0; }
.cs-illustration { align-self: center; opacity: .8; font-size: 64px; margin-top: auto; }

/* Outcome + takeaways row */
.cs-outcome-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.cs-outcome-item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cs-outcome-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 18px;
  background: rgba(53,219,135,.12); color: var(--green);
}
.cs-outcome-item h4 { margin: 0; font-size: 12px; }
.cs-outcome-item p { margin: 0; font-size: 10.5px; color: var(--muted); }

/* Case nav footer */
.cs-case-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.cs-nav-link {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 12px 16px;
}
.cs-nav-link:hover { border-color: var(--blue-2); }
.cs-nav-link.next { justify-content: flex-end; text-align: right; }
.cs-nav-link .cs-nav-eyebrow { display: block; font-size: 10.5px; color: var(--blue-2); font-weight: 700; margin-bottom: 2px; }
.cs-nav-link strong { display: block; font-size: 13px; }
.cs-nav-link small { color: var(--muted); font-size: 10.5px; }
.cs-nav-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(22,135,255,.12); color: var(--blue-2);
}
.cs-all-link {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted); text-align: center;
}
.cs-all-icon { font-size: 18px; color: var(--blue-2); }
.cs-all-link strong { color: var(--text); font-size: 12px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 30px;
  margin-top: 40px;
}
.site-footer .shell {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.footer-meta { color: var(--muted); font-size: 11.5px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--muted); font-size: 13px;
}
.footer-social a:hover { color: var(--blue-2); border-color: var(--blue-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cs-layout { grid-template-columns: 220px 1fr; }
  .cs-overview-grid, .cs-challenge-grid { grid-template-columns: 1fr 1fr; }
  .cs-steps { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .cs-steps::before { display: none; }
  .cs-outcome-grid { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
}

@media (max-width: 860px) {
  .cs-layout { grid-template-columns: 1fr; }
  .cs-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .cs-sidebar .cs-side-card { flex: 1 1 260px; }
  .cs-hero { grid-template-columns: 1fr; }
  .cs-arch-wrap { grid-template-columns: 1fr; }
  .cs-split-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .desktop-nav { display: none; }
  .cs-overview-grid, .cs-challenge-grid, .cs-tech-grid { grid-template-columns: 1fr; }
  .cs-steps { grid-template-columns: 1fr 1fr; }
  .cs-outcome-grid { grid-template-columns: 1fr 1fr; }
  .cs-case-nav { grid-template-columns: 1fr; text-align: left; }
  .cs-nav-link.next { justify-content: flex-start; text-align: left; }
}
