/* =====================================================================
   agent-bridge v3.0.0 — signal-ops aesthetic
   Two machines. One channel. Amber phosphor on ink, cyan on the other side.
   ===================================================================== */

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* -- Fonts (Google) — Space Mono (display/mono) + IBM Plex Sans (body) -- */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* -- Tokens -- */
:root {
  /* Ink & paper */
  --ink: #0a0a0b;
  --ink-raised: #111216;
  --ink-card: #14161b;
  --ink-deep: #050507;
  --line: rgba(255, 246, 220, 0.08);
  --line-strong: rgba(255, 246, 220, 0.18);

  /* Signal colors */
  --amber: #ff7a1a;        /* primary — CRT phosphor / beacon */
  --amber-soft: #ffb37a;
  --amber-glow: rgba(255, 122, 26, 0.25);
  --cyan: #4dd0e1;          /* the other peer */
  --cyan-soft: #a7ebf2;
  --lime: #c6ff3d;          /* syntax / ok */
  --magenta: #ff4da6;       /* breaking / warn */

  /* Text */
  --text: #f4efe4;          /* warm paper */
  --text-dim: #a59e8e;
  --text-faint: #6a655a;

  /* Code palette */
  --code-bg: #08080a;
  --code-text: #e7e1d0;
  --code-comment: #6a655a;
  --code-keyword: #ff7a1a;
  --code-string: #c6ff3d;
  --code-var: #4dd0e1;
  --code-tag: #ff4da6;

  /* Type */
  --display: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: 'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space */
  --radius: 2px;
  --radius-lg: 4px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* -- Base -- */
html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Subtle scanline + grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 246, 220, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 246, 220, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 140% 80% at 50% 0%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 140% 80% at 50% 0%, #000 20%, transparent 80%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 246, 220, 0.012) 0,
    rgba(255, 246, 220, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

#content {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* -- Links & code -- */
a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 122, 26, 0.35);
  transition: color 120ms ease, border-color 120ms ease;
}
a:hover {
  color: var(--amber-soft);
  border-bottom-color: var(--amber-soft);
}
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: rgba(255, 122, 26, 0.08);
  border: 1px solid rgba(255, 122, 26, 0.15);
  color: var(--amber-soft);
  border-radius: var(--radius);
  white-space: nowrap;
}

em { font-style: italic; color: var(--text); }
strong { font-weight: 600; }

/* ============================================================
   NAV
   ============================================================ */
nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

nav.wrap::before {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber) 20%, var(--cyan) 80%, transparent);
  opacity: 0.35;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  color: var(--text);
}
.logo:hover { color: var(--text); }

.logo-mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ink-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.logo-mark svg { width: 26px; height: 26px; }

.logo-copy { display: flex; flex-direction: column; min-width: 0; }
.logo-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.logo-version {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 4px;
  color: var(--amber);
  background: rgba(255, 122, 26, 0.08);
  border: 1px solid rgba(255, 122, 26, 0.3);
  border-radius: var(--radius);
  vertical-align: 1px;
  letter-spacing: 0.02em;
}
.logo-sub {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color 120ms ease, background 120ms ease;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 246, 220, 0.04);
}
.nav-link::before { content: '/ '; color: var(--text-faint); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: clamp(48px, 6vw, 80px);
  position: relative;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.hero-meta .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero-meta span + span::before {
  content: '·';
  margin-right: 14px;
  color: var(--text-faint);
  opacity: 0.6;
}
.hero-meta .ver { color: var(--amber); }

h1.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 7.5vw, 94px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 16ch;
}
h1.hero-title .line { display: block; }
h1.hero-title .peer-a { color: var(--amber); }
h1.hero-title .peer-b { color: var(--cyan); }
h1.hero-title .arrow {
  display: inline-block;
  color: var(--text-faint);
  font-weight: 400;
  margin: 0 0.15em;
  animation: blink 1.6s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0.15; }
}

.hero-lede {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 62ch;
  margin-bottom: 36px;
}
.hero-lede strong { color: var(--text); font-weight: 500; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.btn--primary {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 8px 22px -8px var(--amber-glow);
}
.btn--primary:hover {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255, 122, 26, 0.05);
}

.btn svg { flex: none; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stat {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .k {
  display: block;
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.hero-stat .v {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.hero-stat .v .mark { color: var(--amber); }

/* Peer diagram panel anchored to the right on wide screens */
.hero-peer-panel {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 122, 26, 0.06), transparent 60%),
    var(--ink-card);
  position: relative;
  overflow: hidden;
}
.hero-peer-panel::before {
  content: 'CH. 03 · LIVE';
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.14em;
  opacity: 0.8;
}

.peer-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}
.peer-node {
  border: 1px solid var(--line-strong);
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--ink-deep);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  position: relative;
}
.peer-node::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}
.peer-node--a { border-left: 2px solid var(--amber); }
.peer-node--a::before { background: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.peer-node--b { border-left: 2px solid var(--cyan); }
.peer-node--b::before { background: var(--cyan); box-shadow: 0 0 10px rgba(77, 208, 225, 0.5); }

.peer-node .label {
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}
.peer-node .name { color: var(--text); font-weight: 700; font-size: 14px; }
.peer-node .host { color: var(--text-dim); font-size: 11px; margin-top: 4px; }

.peer-wire {
  font-family: var(--mono);
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  position: relative;
}
.peer-wire .chan {
  color: var(--amber);
  font-weight: 700;
  font-size: 13px;
  display: block;
  margin-bottom: 6px;
}
.peer-wire .wire {
  display: block;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0;
}
.peer-wire .wire .dash-a { color: var(--amber); }
.peer-wire .wire .dash-b { color: var(--cyan); }
.peer-wire .proto { display: block; margin-top: 6px; color: var(--text-faint); font-size: 10px; letter-spacing: 0.16em; }

@media (max-width: 720px) {
  .peer-diagram { grid-template-columns: 1fr; gap: 12px; }
  .peer-wire .wire { transform: rotate(90deg); display: inline-block; padding: 10px 0; }
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
section.wrap {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(32px, 5vw, 64px);
  position: relative;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.kicker::before {
  content: '▍';
  color: var(--amber);
  font-size: 14px;
  line-height: 1;
}
.kicker .num {
  color: var(--text-faint);
  margin-right: 6px;
}

h2.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 22ch;
}
h2.section-title .accent { color: var(--amber); }

.section-sub {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 70ch;
  margin-bottom: 40px;
}

/* ============================================================
   QUICK START
   ============================================================ */
.quickstart {
  padding-top: clamp(56px, 7vw, 96px);
}
.quickstart-inner {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.03), transparent 40%),
    var(--ink-raised);
  position: relative;
  overflow: hidden;
}
.quickstart-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  opacity: 0.6;
}

.prereq {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--ink-deep);
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.6;
}
.prereq .icon {
  flex: none;
  color: var(--cyan);
  margin-top: 1px;
}
.prereq strong { color: var(--text); }
.prereq .os { display: block; margin-top: 6px; color: var(--text-dim); }
.prereq .os::before {
  content: '▸ ';
  color: var(--cyan);
  margin-right: 2px;
}

/* ============================================================
   TERMINAL / CODE BLOCKS
   ============================================================ */
.terminal {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  overflow: hidden;
  font-family: var(--mono);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.terminal + .terminal { margin-top: 20px; }

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0c0c10;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b2b30;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  margin-left: 10px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.terminal-title .prompt { color: var(--amber); }

.terminal-body {
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
}
.terminal-body pre, pre.block {
  font-family: var(--mono);
  color: var(--code-text);
  white-space: pre;
  tab-size: 2;
}

/* Syntax classes */
.t-dim, .t-comment { color: var(--code-comment); font-style: italic; }
.t-kw { color: var(--code-keyword); }
.t-str, .t-green { color: var(--code-string); }
.t-var, .t-cyan { color: var(--code-var); }
.t-tag { color: var(--code-tag); }
.t-bold { color: var(--text); font-weight: 500; }
.t-prompt::before {
  content: '$ ';
  color: var(--amber);
}

/* Numbered code steps (install) */
.step-block {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--code-bg);
}
.step-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #0d0e12;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.step-block-head .n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: rgba(255, 122, 26, 0.12);
  color: var(--amber);
  border: 1px solid rgba(255, 122, 26, 0.35);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
}
.step-block-head .lbl { color: var(--text); font-weight: 500; }
.step-block pre {
  padding: 16px 20px;
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}

/* ============================================================
   WHY / GRID CARDS
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-raised);
}
.card {
  padding: 28px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 200ms ease;
  position: relative;
}
.card:hover { background: rgba(255, 122, 26, 0.03); }
.card::before {
  content: attr(data-tag);
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
}
.card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 10px;
  padding-right: 80px;
}
.card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-dim);
}
.card p em { color: var(--text); font-style: italic; }

@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(2n) { border-right: none; }
  .card:nth-last-child(-n+2):nth-child(2n+1) { border-bottom: none; }
  .card:last-child { border-bottom: none; border-right: none; }
}
@media (max-width: 719px) {
  .card { border-right: none; }
  .card:last-child { border-bottom: none; }
}

/* ============================================================
   INSTALL
   ============================================================ */
.install-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
  margin-top: 20px;
  background: var(--ink-raised);
  position: relative;
}
.install-panel--featured {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.035), transparent 30%),
    var(--ink-raised);
}
.install-panel--featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--amber), transparent 70%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-head h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  padding: 4px 9px;
  border: 1px solid rgba(255, 122, 26, 0.35);
  background: rgba(255, 122, 26, 0.06);
  border-radius: var(--radius);
}
.panel-tag--muted {
  color: var(--text-faint);
  border-color: var(--line-strong);
  background: transparent;
}
.panel-tag--muted::before {
  content: '○';
  font-size: 11px;
  color: var(--text-faint);
}
.panel-tag::before {
  content: '●';
  color: var(--amber);
  font-size: 10px;
}

.panel-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 72ch;
  margin-bottom: 18px;
}
.panel-note {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--ink-deep);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.panel-note strong { color: var(--text); }

.callout {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  background: rgba(255, 77, 166, 0.04);
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
}
.callout strong { color: var(--text); }
.callout--warn { border-left-color: var(--amber); background: rgba(255, 122, 26, 0.04); }

/* ============================================================
   PAIR STEPS
   ============================================================ */
.steps {
  list-style: none;
  counter-reset: steps;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-raised);
}
.steps li {
  padding: 28px 26px;
  border-right: 1px solid var(--line);
  position: relative;
}
.steps li:last-child { border-right: none; }
.steps li::before {
  counter-increment: steps;
  content: counter(steps, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1;
  color: var(--amber);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.steps h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
}
.steps p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: none; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: none; }
}

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-raised);
}
.tool {
  padding: 24px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease;
}
.tool:hover { background: rgba(77, 208, 225, 0.03); }
.tool-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-name::before {
  content: 'fn';
  font-size: 10px;
  padding: 2px 5px;
  background: rgba(77, 208, 225, 0.1);
  border: 1px solid rgba(77, 208, 225, 0.3);
  border-radius: 2px;
  color: var(--cyan-soft);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.tool p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

@media (min-width: 960px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .tool:nth-child(3n) { border-right: none; }
  .tool:nth-last-child(-n+3):nth-child(3n+1),
  .tool:nth-last-child(-n+3):nth-child(3n+1) ~ .tool {
    border-bottom: 1px solid var(--line);
  }
}
@media (min-width: 600px) and (max-width: 959px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .tool:nth-child(2n) { border-right: none; }
}
@media (max-width: 599px) {
  .tool { border-right: none; }
}
.tool:last-child { border-bottom: none; border-right: none; }

/* ============================================================
   COMPAT
   ============================================================ */
.compat-table {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-raised);
}
.compat-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(130px, 0.9fr) 2.5fr;
  align-items: center;
  gap: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: background 160ms ease;
}
.compat-row:last-child { border-bottom: none; }
.compat-row:hover { background: rgba(255, 246, 220, 0.02); }

.compat-row--head {
  background: var(--ink-deep);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 24px;
}

.compat-name {
  font-family: var(--display);
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.compat-name .glyph {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--ink-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--amber);
  flex: none;
}
.compat-name .glyph svg { width: 16px; height: 16px; }

.compat-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.compat-status .pill {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  font-weight: 600;
}
.compat-status .pill--live {
  background: rgba(198, 255, 61, 0.08);
  color: var(--lime);
  border: 1px solid rgba(198, 255, 61, 0.3);
}
.compat-status .pill--scaffold {
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--line-strong);
}

.compat-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

@media (max-width: 780px) {
  .compat-row { grid-template-columns: 1fr; gap: 8px; }
  .compat-row--head { display: none; }
  .compat-status { margin-top: 2px; }
}

/* ============================================================
   SECURITY — list
   ============================================================ */
.sec-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-raised);
}
.sec-list li {
  padding: 24px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec-list h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-list h3::before {
  content: '⎔';
  color: var(--cyan);
  font-size: 16px;
}
.sec-list p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
@media (min-width: 720px) {
  .sec-list { grid-template-columns: repeat(2, 1fr); }
  .sec-list li:nth-child(2n) { border-right: none; }
  .sec-list li:nth-last-child(-n+2):nth-child(2n+1),
  .sec-list li:nth-last-child(-n+2):nth-child(2n+1) ~ li { border-bottom: none; }
}
@media (max-width: 719px) {
  .sec-list li { border-right: none; }
  .sec-list li:last-child { border-bottom: none; }
}

/* ============================================================
   CHANGELOG
   ============================================================ */
.changelog-list {
  list-style: none;
  border-left: 1px solid var(--line-strong);
  margin-left: 12px;
  padding-left: 0;
}
.cl-item {
  position: relative;
  padding: 0 0 28px 32px;
}
.cl-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: var(--ink);
  border: 2px solid var(--amber);
  border-radius: 50%;
}
.cl-item--breaking::before {
  background: var(--magenta);
  border-color: var(--magenta);
  box-shadow: 0 0 10px rgba(255, 77, 166, 0.5);
}
.cl-version {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.01em;
}
.cl-version .breaking-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  background: rgba(255, 77, 166, 0.1);
  color: var(--magenta);
  border: 1px solid rgba(255, 77, 166, 0.4);
  border-radius: 2px;
  font-weight: 600;
  text-transform: uppercase;
}
.cl-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 75ch;
}
.cl-body strong { color: var(--text); font-weight: 500; }
.changelog-link {
  margin-top: 12px;
  padding-left: 32px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding-top: 40px;
  padding-bottom: 40px;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber) 20%, var(--cyan) 80%, transparent);
  opacity: 0.3;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
}
.footer-brand svg { width: 24px; height: 24px; }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 12px;
}
.footer-links a {
  color: var(--text-dim);
  border: none;
  letter-spacing: 0.02em;
}
.footer-links a:hover { color: var(--amber); }

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-align: right;
}

@media (max-width: 820px) {
  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand { justify-content: center; }
  .footer-copy { text-align: center; }
}

/* ============================================================
   RESPONSIVE TUNING
   ============================================================ */
@media (max-width: 620px) {
  :root { --gutter: 20px; }
  .logo-sub { display: none; }
  .nav-right { gap: 2px; }
  .nav-link { padding: 6px 8px; font-size: 12px; }
  .hero-peer-panel::before { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2n) { border-right: none; }
  .hero-stat { border-bottom: 1px solid var(--line); }
  .hero-stat:nth-last-child(-n+2) { border-bottom: none; }
  .hero-meta { font-size: 11px; }
  h1.hero-title { font-size: clamp(36px, 12vw, 64px); letter-spacing: -0.03em; }
  .terminal-body { font-size: 12px; }
  .terminal-title { display: none; }
}

@media (max-width: 400px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--line); }
  .hero-stat:last-child { border-bottom: none; }
}

/* Scroll reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .reveal-1 { animation-delay: 60ms; }
  .reveal-2 { animation-delay: 140ms; }
  .reveal-3 { animation-delay: 220ms; }
  .reveal-4 { animation-delay: 300ms; }
  .reveal-5 { animation-delay: 380ms; }
  @keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Selection */
::selection {
  background: var(--amber);
  color: var(--ink);
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #222428; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }
