:root {
  /* Palette pulled from the mascot: toxic green core, construction yellow, warning red, gunmetal */
  --bg:        #06080a;
  --bg-2:      #0d1014;
  --bg-3:      #131720;
  --steel:     #1c2129;
  --steel-2:   #2a313c;
  --line:      #232a35;
  --line-2:    #3a434f;
  --fg:        #ecf1f7;
  --fg-dim:    #a4adba;
  --muted:     #6a7382;

  --green:     #38ff4f;   /* spark core */
  --green-2:   #82ff95;
  --green-dk:  #1aa12a;
  --yellow:    #ffb000;   /* caterpillar */
  --yellow-2:  #ffd35e;
  --red:       #e62a30;   /* warning */
  --red-2:     #ff5a5f;
  --rust:      #8a3a1a;

  --code-bg:   #050709;
  --radius:    4px;
  --radius-lg: 10px;
  --maxw:      1180px;
  --mono:      "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hazard:    repeating-linear-gradient(
                 -45deg,
                 var(--yellow) 0 14px,
                 #111111 14px 28px
               );
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* No body grid — keep the canvas calm so accents stay legible. */

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

::selection { background: var(--green); color: #000; }

code, pre {
  font-family: var(--mono);
  font-size: 0.92em;
}

p code, li code, h2 code, h3 code, h4 code, .lede code, .tile p code, .tile li code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 0.05em 0.45em;
  border-radius: var(--radius);
  font-size: 0.88em;
  color: var(--fg);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 0.8rem;
  line-height: 1.55;
  position: relative;
}

pre code {
  color: #d6deeb;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.85em;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--green); color: #000; padding: 0.5rem 0.8rem; z-index: 100; font-weight: 700; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* ============= TOPBAR ============= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(6, 8, 10, 0.85);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(56, 255, 79, 0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; color: var(--green); }
.brand img {
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  filter: drop-shadow(0 0 6px rgba(56, 255, 79, 0.25));
}
.brand-name {
  font-family: var(--mono);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.brand-tag {
  font-family: var(--mono);
  color: var(--yellow);
  font-weight: 700;
  font-size: 0.7rem;
  border: 1px solid var(--yellow);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.82rem;
}
.nav a {
  color: var(--fg-dim);
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav a:hover { color: var(--green); text-decoration: none; }
.nav a.github {
  color: var(--green);
  border: 1px solid var(--green);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
}
.nav a.github:hover { background: var(--green); color: #000; }

/* ============= HERO ============= */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(56, 255, 79, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(255, 176, 0, 0.06), transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(230, 42, 48, 0.05), transparent 60%),
    var(--bg);
}
.hero::before {
  /* hazard stripe on the bottom edge */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: var(--hazard);
  opacity: 0.85;
}
.hero::after {
  /* faint scanline overlay */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.014) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 0.98;
  margin: 0.6rem 0 1.4rem;
  letter-spacing: -0.03em;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--fg);
  text-shadow: 0 0 30px rgba(56, 255, 79, 0.15);
}
.hero h1 .accent {
  color: var(--green);
  text-shadow: 0 0 24px rgba(56, 255, 79, 0.55);
}
.kicker {
  font-family: var(--mono);
  color: var(--yellow);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  background: rgba(255, 176, 0, 0.06);
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 20px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.9); }
}
.lede {
  font-size: 1.18rem;
  color: var(--fg-dim);
  margin: 0 0 1.8rem;
  max-width: 60ch;
}
.lede strong { color: var(--fg); font-weight: 700; }

.cta { display: flex; gap: 0.8rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  font-weight: 800;
  font-size: 0.9rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.08s ease, background 0.1s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translate(-1px, -1px); }
.btn.primary {
  background: var(--green);
  color: #000;
  box-shadow: 4px 4px 0 var(--green-dk);
}
.btn.primary:hover {
  background: var(--green-2);
  box-shadow: 6px 6px 0 var(--green-dk);
}
.btn.ghost {
  border-color: var(--yellow);
  color: var(--yellow);
  background: transparent;
}
.btn.ghost:hover {
  background: var(--yellow);
  color: #000;
  box-shadow: 4px 4px 0 var(--rust);
}
.badges {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.badges li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.badges li::before {
  content: "▸ ";
  color: var(--green);
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(56, 255, 79, 0.18), transparent 60%);
  filter: blur(20px);
  z-index: 0;
}
.hero-art img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  width: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  filter: drop-shadow(0 0 30px rgba(56, 255, 79, 0.35));
}

/* ============= BANDS ============= */
.band {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.band.alt {
  background: var(--bg-2);
}
.band h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.band h2::before {
  content: "//";
  color: var(--green-dk);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85em;
}
.lede-sm {
  color: var(--fg-dim);
  margin: 0 0 2rem;
  max-width: 65ch;
  font-size: 1.05rem;
}

/* ============= TWO COL ============= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.two-col.tight { gap: 2.4rem; margin-top: 1.5rem; }
.two-col h2 { margin-bottom: 0.4rem; }

.col-h {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 0.4rem;
  padding-left: 0.7rem;
  border-left: 2px solid var(--line-2);
  color: var(--fg);
}
.col-h.good { border-left-color: var(--green); }
.col-h.bad  { border-left-color: var(--red); }

/* ============= LISTS ============= */
ul.check, ul.cross {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
ul.check li, ul.cross li {
  padding: 0.55rem 0 0.55rem 2rem;
  position: relative;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}
ul.check li:last-child, ul.cross li:last-child { border-bottom: none; }
ul.check li::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0.55rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.8rem;
}
ul.cross li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0.55rem;
  color: var(--red);
  font-family: var(--mono);
  font-weight: 700;
}
ul.tight li { padding: 0.3rem 0 0.3rem 1.6rem; border: none; }

/* ============= CARDS ============= */
.cards {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.cards.two   { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.card:hover {
  border-color: var(--green);
}
.band.alt .card { background: var(--bg-3); }
.card h3 {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  font-weight: 700;
  padding-left: 0.7rem;
  border-left: 2px solid var(--yellow);
}
.card pre { margin-bottom: 0.6rem; }
.card.pinned {
  border-color: var(--green);
  background: linear-gradient(180deg, rgba(56, 255, 79, 0.08), transparent);
  box-shadow: 0 0 0 1px var(--green) inset;
}

.center { text-align: center; }
.muted { color: var(--muted); font-size: 0.92rem; }

/* ============= GRID TILES ============= */
.grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four  { grid-template-columns: repeat(4, 1fr); }

.tile {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.3rem;
  position: relative;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.tile::before {
  /* corner notch */
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 12px; height: 12px;
  background: var(--bg);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  border-left: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.band.alt .tile { background: var(--bg-3); }
.band.alt .tile::before { background: var(--bg-2); }
.tile h4 {
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--fg);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding-left: 0.7rem;
  border-left: 2px solid var(--yellow);
}
.tile ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.tile ul li {
  padding: 0.3rem 0;
  color: var(--fg-dim);
  border-bottom: 1px dashed var(--line);
}
.tile ul li:last-child { border-bottom: none; }
.tile p {
  font-size: 0.92rem;
  color: var(--fg-dim);
  margin: 0 0 0.6rem;
}
.tile.linkcard {
  display: block;
  color: var(--fg);
}
.tile.linkcard:hover {
  text-decoration: none;
  border-color: var(--green);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--bg-3);
}
.tile.linkcard:hover h4 { border-left-color: var(--green); }

/* ============= PIPELINE DIAGRAM ============= */
.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.6rem;
  align-items: stretch;
  margin: 1.8rem 0 1.2rem;
}
.node {
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 1.6rem 1rem 1.3rem;
  text-align: center;
  position: relative;
}
.band.alt .node { background: var(--bg); }
.node.primary {
  border-color: var(--green);
  background: linear-gradient(180deg, rgba(56, 255, 79, 0.06), transparent 70%), var(--bg-3);
  box-shadow: 0 0 0 1px var(--green) inset, 0 0 30px rgba(56, 255, 79, 0.08);
}
.band.alt .node.primary {
  background: linear-gradient(180deg, rgba(56, 255, 79, 0.08), transparent 70%), var(--bg);
}
.node-tag {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #000;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.node-name {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}
.node.primary .node-name { color: var(--green); }
.node-role {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--yellow);
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.node-desc {
  font-size: 0.82rem;
  color: var(--fg-dim);
  font-family: var(--mono);
  line-height: 1.5;
}
/* Node rendered as a link out to a sibling project's site. */
.node-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.node-link:hover {
  border-color: var(--green);
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--green) inset, 0 0 24px rgba(56, 255, 79, 0.12);
}
.node-link:hover .node-name { color: var(--green); }
.connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 80px;
}
.connector::before {
  content: "";
  position: absolute;
  left: 6px; right: 6px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), var(--green-dk), var(--line-2));
}
.connector::after {
  content: "▸";
  font-family: var(--mono);
  background: var(--bg-2);
  color: var(--green);
  position: relative;
  z-index: 1;
  padding: 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}
.dep {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-2);
  padding: 0.1rem 0.4rem;
  position: absolute;
  top: calc(50% - 1.2rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--fg-dim);
  margin: 0 0 2.5rem;
}
.caption strong.ok { color: var(--fg); font-weight: 600; }

/* ============= LAYER STACK ============= */
h3.sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 2.2rem 0 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.layers {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 0.5rem;
}
.layer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.4rem;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  align-items: center;
}
.band.alt .layer { background: var(--bg); }
.layer.primary {
  border-color: var(--green);
  background: linear-gradient(90deg, rgba(56, 255, 79, 0.05), transparent 50%), var(--bg-3);
}
.band.alt .layer.primary {
  background: linear-gradient(90deg, rgba(56, 255, 79, 0.06), transparent 50%), var(--bg);
}
.layer-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 900;
  color: var(--steel-2);
  line-height: 1;
  letter-spacing: -0.02em;
  min-width: 2.6rem;
}
.layer.primary .layer-num { color: var(--green); }
.layer-body h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fg);
}
.layer-body p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.94rem;
  line-height: 1.55;
}
.layer-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-2);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.layer.primary .layer-tag {
  color: var(--green);
  border-color: var(--green-dk);
}

/* ============= RULE BOX ============= */
.rule {
  margin-top: 2.5rem;
  border: 1px solid var(--yellow);
  padding: 1.2rem 1.4rem;
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.06), transparent);
  border-radius: var(--radius);
  position: relative;
}
.rule::before {
  content: "RULE";
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  background: var(--bg);
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 0 0.5rem;
}
.rule h3 {
  margin-top: 0;
  font-family: var(--mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
}
.rule ol { padding-left: 1.4rem; color: var(--fg-dim); }
.rule ol li { margin: 0.35rem 0; }

/* ============= FOOTER ============= */
.foot {
  border-top: 4px solid transparent;
  border-image: var(--hazard) 1;
  padding: 2.4rem 0 2rem;
  background: var(--bg-2);
  font-size: 0.88rem;
  color: var(--muted);
  font-family: var(--mono);
}
.foot strong {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.foot-links { display: flex; gap: 1.4rem; }
.foot-links a {
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}
.foot-links a:hover { color: var(--green); }

/* ============= RESPONSIVE ============= */
@media (max-width: 960px) {
  .nav a:not(.github) { display: none; }
  .hero { padding: 4rem 0 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-art img { width: 240px; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .cards.two, .cards.three { grid-template-columns: 1fr; }
  .grid.three, .grid.four  { grid-template-columns: 1fr 1fr; }

  .pipeline {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .connector {
    min-height: 50px;
    min-width: 0;
    transform: rotate(90deg);
  }
  .connector::before {
    left: 50%;
    right: auto;
    top: 6px;
    bottom: 6px;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--line-2), var(--green-dk), var(--line-2));
  }
  .layer { grid-template-columns: auto 1fr; }
  .layer-tag { display: none; }
}

@media (max-width: 540px) {
  .grid.three, .grid.four { grid-template-columns: 1fr; }
  .band { padding: 3.5rem 0; }
  .ascii pre { font-size: 0.7rem; }
}
