/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #08111f; /* midnight network blue */
  --panel: #0f1b2e;
  --panel2: #14243d;
  --ink: #e6eef8;
  --muted: #9fb0c6;
  --line: #1f3350;
  --signal: #00e5b0; /* connected, online */
  --blue: #3d8bff; /* data */
  --amber: #ffb020; /* important points */
  --red: #ff5c5c;
}
/* ===== 2. BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.75 "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: #fff;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 5px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--signal), var(--blue));
}
h3 {
  font-size: 1.12rem;
  font-weight: 700;
}
.sub {
  margin-top: 46px;
  color: var(--signal);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 700;
}
.sub::before {
  content: "# ";
  color: var(--blue);
}
p {
  margin: 0 0 1em;
  max-width: 72ch;
}
a {
  color: var(--signal);
}
mark {
  background: rgba(255, 176, 32, 0.18);
  color: #ffd27a;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 600;
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.hl {
  background: linear-gradient(90deg, var(--signal), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.code-tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--signal);
  background: rgba(0, 229, 176, 0.1);
  border: 1px solid rgba(0, 229, 176, 0.4);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
/* ===== 3. TOP NAV ===== */
nav.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  background: #050b15;
  padding: 14px max(24px, calc((100% - 1040px) / 2));
}
.brand {
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}
.brand b {
  color: var(--signal);
}
.sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.sig i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--signal);
  animation: bars 1.6s infinite;
}
.sig i:nth-child(1) {
  height: 7px;
}
.sig i:nth-child(2) {
  height: 12px;
  animation-delay: 0.2s;
}
.sig i:nth-child(3) {
  height: 18px;
  animation-delay: 0.4s;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
nav.top a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 999px;
}
nav.top a:hover {
  color: #fff;
  background: rgba(0, 229, 176, 0.12);
}
/* ===== 4. HERO (centered) + NETWORK DIAGRAM ===== */
.hero {
  padding: 56px max(24px, calc((100% - 1040px) / 2)) 80px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(61, 139, 255, 0.16),
    transparent 60%
  );
}
.hero p {
  margin-left: auto;
  margin-right: auto;
}
.lead {
  font-size: 1.18rem;
  color: var(--muted);
}
.net {
  display: block;
  width: min(420px, 92%);
  margin: 0 auto 24px;
  overflow: visible;
}
.net .lines line {
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: flow 1.2s linear infinite;
  opacity: 0.8;
}
.net .hub {
  fill: var(--panel2);
  stroke: var(--signal);
  stroke-width: 3;
}
.net .hubt {
  fill: var(--signal);
  font:
    800 14px "JetBrains Mono",
    monospace;
}
.net .nd {
  fill: var(--panel);
  stroke: var(--blue);
  stroke-width: 2;
}
.net .nd.n2 {
  stroke: var(--signal);
}
.net .nd.n3 {
  stroke: var(--amber);
}
.net .nd.n4 {
  stroke: var(--blue);
}
.net .lb {
  fill: var(--ink);
  font:
    700 8px "JetBrains Mono",
    monospace;
}
.net .ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: ripple 3s ease-out infinite;
  opacity: 0;
}
.net .ring.r2 {
  animation-delay: 1.5s;
}
.btn {
  display: inline-block;
  background: var(--signal);
  color: #031a14;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
}
.btn:hover {
  background: #3af2c6;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--blue);
  margin-left: 12px;
}
.btn.ghost:hover {
  background: rgba(61, 139, 255, 0.18);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 46px auto 0;
  max-width: 900px;
  text-align: left;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.93rem;
  position: relative;
}
.stat::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: blinkdot 2s infinite;
}
.stat b {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  color: #fff;
}
/* ===== 5. SECTIONS ===== */
section {
  padding: 72px max(24px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
}
section:nth-of-type(even) {
  background: #0a1526;
}
/* ===== 6. CARDS ===== */
.grid,
.two {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}
.card:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
}
.card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
.card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.card li {
  margin-bottom: 0.5em;
}
.tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
  background: rgba(61, 139, 255, 0.14);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
/* highlighted important points */
.key {
  background: linear-gradient(
    90deg,
    rgba(255, 176, 32, 0.16),
    rgba(255, 176, 32, 0.04)
  );
  border: 1px solid rgba(255, 176, 32, 0.5);
  border-left: 8px solid var(--amber);
  border-radius: 12px;
  padding: 18px 24px;
  margin: 28px 0;
}
.key b {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: #1a1000;
  background: var(--amber);
  padding: 2px 10px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.key p {
  margin: 0;
  color: var(--ink);
}
.key.warn {
  background: linear-gradient(
    90deg,
    rgba(255, 92, 92, 0.16),
    rgba(255, 92, 92, 0.04)
  );
  border-color: rgba(255, 92, 92, 0.55);
  border-left-color: var(--red);
}
.key.warn b {
  background: var(--red);
  color: #fff;
}
.essay {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 34px;
  margin-top: 20px;
  border-left: 6px solid var(--signal);
}
.essay p {
  max-width: none;
  color: var(--muted);
  text-align: justify;
}
.essay p:last-child {
  margin-bottom: 0;
}
/* ===== 7. PIPELINE + STEPS ===== */
ol.pipe {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 26px 0;
}
ol.pipe li {
  counter-increment: p;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
ol.pipe li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -15px;
  width: 14px;
  border-top: 2px dashed var(--blue);
}
ol.pipe li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--signal);
  color: #031a14;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
ol.pipe b {
  display: block;
  font-size: 1rem;
  color: #fff;
}
ol.pipe span {
  font-size: 0.92rem;
  color: var(--muted);
}
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 12px;
}
ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
}
ol.steps li::before {
  content: counter(s);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 5px rgba(61, 139, 255, 0.2);
}
ol.steps p {
  margin: 0;
  color: var(--muted);
}
ol.steps h3 {
  margin-bottom: 0.3em;
}
/* ===== 8. TABLE, CODE, DL, FAQ ===== */
.scroll {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #0b1829;
  color: var(--signal);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
td:first-child {
  color: #fff;
  font-weight: 700;
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: var(--panel2);
}
pre.code {
  background: #040a13;
  border: 1px solid var(--line);
  border-left: 6px solid var(--signal);
  border-radius: 12px;
  padding: 22px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  color: #b8f5e4;
  margin: 22px 0;
}
dl {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  margin: 22px 0 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
dt,
dd {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
dt {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  color: var(--signal);
}
dd {
  color: var(--muted);
}
dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}
details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  padding: 15px 22px;
  margin-bottom: 12px;
}
details[open] {
  border-left-color: var(--signal);
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}
details p {
  margin: 12px 0 0;
  color: var(--muted);
}
/* ===== 9. FOOTER ===== */
footer {
  background: #050b15;
  color: var(--muted);
  text-align: center;
  padding: 34px 20px 46px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  border-top: 3px solid var(--signal);
}
/* ===== 10. ANIMATION + RESPONSIVE ===== */
@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}
@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
@keyframes bars {
  50% {
    opacity: 0.35;
  }
}
@keyframes blinkdot {
  50% {
    opacity: 0.3;
  }
}
@media (max-width: 900px) {
  ol.pipe li::after {
    display: none;
  }
}
@media (max-width: 600px) {
  dl {
    grid-template-columns: 1fr;
  }
  dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .btn.ghost {
    margin: 12px 0 0;
  }
  .essay {
    padding: 22px;
  }
  .essay p {
    text-align: left;
  }
  ol.steps li {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
