:root {
  --ink: #0d1117;
  --body: #303845;
  --muted: #626c7a;
  --line: #e2e6eb;
  --line-strong: #c9d0d8;
  --bg: #ffffff;
  --soft: #f5f8f6;
  --green: #0f7b4f;
  --green-dark: #0a5c3a;
  --green-soft: #e7f4ee;
  --amber: #b45309;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

h1, h2, h3 { color: var(--ink); letter-spacing: 0; line-height: 1.15; }

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

a { color: var(--green-dark); }

.icon { width: 18px; height: 18px; flex: none; }

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border: 2px solid var(--green);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--green);
  border-radius: 50%;
}

.topnav { display: flex; align-items: center; gap: 22px; }

.topnav a {
  color: var(--body);
  text-decoration: none;
  font-size: 14px;
}

.topnav a:hover { color: var(--green-dark); }

.topnav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-weight: 600;
}

/* Hero */

.hero {
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(to right, rgba(13, 17, 23, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 17, 23, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green-dark);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: 68px;
  font-weight: 800;
}

.lede {
  margin: 0 0 28px;
  font-size: 19px;
  max-width: 34em;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }

.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }

.stats {
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-size: 26px; font-weight: 700; color: var(--ink); }

/* Loop diagram */

.hero-loop { min-width: 0; }

.loop {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: block;
  aspect-ratio: 1 / 1;
}

.loop-ring {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
}

.spokes line { stroke: var(--line); stroke-width: 1; }

.loop-center circle {
  fill: #fff;
  stroke: var(--green);
  stroke-width: 2;
}

.loop-center .center-icon {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loop-center text {
  font-family: var(--mono);
  font-size: 20px;
  fill: var(--ink);
  font-weight: 600;
}

.node { cursor: pointer; outline: none; }

.node circle {
  fill: #fff;
  stroke: var(--line-strong);
  stroke-width: 2;
  transition: fill 160ms ease, stroke 160ms ease, r 160ms ease;
}

.node text {
  font-family: var(--sans);
  fill: var(--muted);
  font-size: 18px;
  font-weight: 600;
  transition: fill 160ms ease;
}

.node .node-num {
  font-size: 17px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--ink);
  dominant-baseline: middle;
}

.node:hover circle,
.node:focus-visible circle { stroke: var(--green); }

.node.is-active circle { fill: var(--green); stroke: var(--green); }
.node.is-active .node-num { fill: #fff; }
.node.is-active text { fill: var(--green-dark); }

.loop-status {
  max-width: 560px;
  margin: 8px auto 0;
  padding: 12px 16px;
  border-left: 3px solid var(--green);
  background: var(--soft);
  color: var(--body);
  font-size: 15px;
  min-height: 68px;
}

/* Bands */

.band { border-bottom: 1px solid var(--line); }
.band-soft { background: var(--soft); }

.band-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px;
}

.band h2 { font-size: 34px; margin: 0 0 14px; }

.band-lede { margin: 0 0 40px; font-size: 18px; max-width: 52em; }

/* Boundary */

.boundary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 40px;
}

.boundary-line { background: var(--line-strong); }

.boundary-col h3 { margin: 0 0 18px; font-size: 18px; }

.boundary-col ul { list-style: none; margin: 0; padding: 0; }

.boundary-col li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.boundary-col li strong {
  display: block;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
}

.boundary-col li span { font-size: 15px; color: var(--muted); }

.boundary-note { margin-top: 20px; font-size: 15px; }

/* Install */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 52px;
  border-left: 1px solid var(--line-strong);
  margin-left: 16px;
}

.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}

.steps h3 { margin: 4px 0 10px; font-size: 18px; }

pre {
  margin: 0 0 12px;
  padding: 14px 16px;
  background: var(--ink);
  color: #e8edf2;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}

pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

.goal-note {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
}

.goal-note h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 18px;
}

.goal-note p { margin: 0 0 12px; }
.goal-note .muted { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

/* Why */

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-bottom: 56px;
}

.why-grid article { border-top: 3px solid var(--ink); padding-top: 20px; }

.why-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
}

.why-grid h3 { margin: 10px 0 10px; font-size: 19px; }
.why-grid p { margin: 0; font-size: 15.5px; }

.rules {
  border-left: 3px solid var(--green);
  background: var(--soft);
  padding: 24px 28px;
}

.rules h3 { margin: 0 0 12px; font-size: 17px; }

.rules ul { margin: 0; padding-left: 20px; }
.rules li { margin-bottom: 8px; font-size: 15.5px; }
.rules li:last-child { margin-bottom: 0; }

/* Acknowledgments */

.band-ack { background: var(--ink); border-bottom: none; }
.band-ack h2 { color: #fff; }
.band-ack p { color: #c6cdd6; max-width: 60em; font-size: 16.5px; }
.band-ack .ack-lede { color: #fff; font-size: 19px; }
.band-ack a { color: #7fd1a8; }
.band-ack code { background: rgba(127, 209, 168, 0.14); color: #a9e3c4; }

/* Footer */

.footer { background: var(--ink); border-top: 1px solid #232a34; }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand { color: #fff; font-weight: 700; }
.footer nav { display: flex; gap: 22px; }
.footer a { color: #9aa4b1; text-decoration: none; font-size: 14px; }
.footer a:hover { color: #fff; }

/* Motion */

@keyframes node-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.node.is-active { animation: node-pulse 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .node.is-active { animation: none; }
  .node circle { transition: none; }
}

/* Responsive */

@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 56px; }
  .hero h1 { font-size: 52px; }
  .hero-loop { order: 2; }
  .install-grid { grid-template-columns: minmax(0, 1fr); }
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 720px) {
  .topbar { padding: 12px 18px; }
  .topnav { gap: 14px; }
  .topnav a { font-size: 13px; }
  .topnav a:not(.topnav-cta) { display: none; }
  .hero-inner, .band-inner, .footer-inner { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: 40px; }
  .lede { font-size: 17px; }
  .stats { gap: 26px; }
  .band h2 { font-size: 26px; }
  .band-inner { padding-top: 52px; padding-bottom: 52px; }
  .boundary { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .boundary-line { height: 1px; }
  .steps li { padding-left: 44px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .node text { font-size: 27px; }
  .node .node-num { font-size: 25px; }
  .loop-center text { font-size: 27px; }
}
