:root {
  --bg: #0f1419;
  --bg-panel: #171e26;
  --bg-hover: #1e2833;
  --border: #2a3743;
  --text: #d6dee6;
  --text-dim: #8296a8;
  --accent: #4fb3ff;
  --accent-dim: #1a4a6e;
  --ok: #4fd18b;
  --ok-dim: #17402c;
  --warn: #f0b64a;
  --warn-dim: #4a3a17;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
code {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
}
pre {
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; border: none; padding: 0; }
pre .c { color: var(--text-dim); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(23, 30, 38, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
header .wrap { display: flex; align-items: center; gap: 1.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand img { height: 28px; width: auto; }
header nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
header nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.92rem;
}
header nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.repo-link { margin-left: auto; color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.repo-link:hover { color: var(--accent); }

/* hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; align-items: center; }
.hero img { width: clamp(120px, 18vw, 200px); height: auto; filter: drop-shadow(0 0 32px rgba(79, 179, 255, 0.25)); }
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.hero .lead { max-width: 640px; color: var(--text-dim); font-size: 1.15rem; margin: 0 0 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-panel);
}
.button:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.button.primary { background: var(--accent); color: #06111c; border-color: var(--accent); }
.button.primary:hover { background: #79c6ff; color: #06111c; }

/* sections */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--border); }
section h2 { margin: 0 0 0.5rem; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; }
section > .wrap > p.sub { margin: 0 0 2rem; color: var(--text-dim); max-width: 720px; }

/* pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  counter-reset: step;
}
.pipeline article {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}
.pipeline article::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.pipeline h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.pipeline p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* support matrix */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.matrix-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-panel);
}
.matrix { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 0.9rem; }
.matrix th, .matrix td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border); }
.matrix thead th {
  vertical-align: bottom;
  color: var(--text);
  font-size: 0.85rem;
  background: var(--bg-hover);
  white-space: nowrap;
}
.matrix thead th span { display: block; color: var(--text-dim); font-weight: 400; font-size: 0.76rem; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: none; }
.matrix tbody tr:hover { background: var(--bg-hover); }
.matrix tbody th { font-weight: 600; white-space: nowrap; }
.matrix tbody th .vendor { display: block; color: var(--text-dim); font-weight: 400; font-size: 0.8rem; }
.matrix .modes { color: var(--text-dim); white-space: nowrap; }
.matrix .yes { color: var(--ok); white-space: nowrap; }
.matrix .no { color: var(--text-dim); }
.hw {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.02rem 0.35rem;
  border-radius: 10px;
  background: var(--ok-dim);
  color: var(--ok);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.legend { margin: 0.8rem 0 0; color: var(--text-dim); font-size: 0.85rem; }
.legend .hw { margin-left: 0; }
.transports { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.transports article { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; }
.transports h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--accent); }
.transports p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.planned { margin-top: 1.5rem; padding: 1rem 1.2rem; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-dim); font-size: 0.92rem; }
.planned strong { color: var(--text); }

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.features article { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; }
.features h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--text); }
.features p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* community codeplugs (codeplugs/index.html, generated) */
.codeplugs { display: grid; gap: 1.2rem; }
.codeplugs article { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; }
.codeplugs h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--text); }
.codeplugs .matrix { min-width: 420px; }
.meta { margin: 0.5rem 0 0; color: var(--text-dim); font-size: 0.85rem; overflow-wrap: anywhere; }
.codeplugs article > .meta:first-of-type { margin: 0 0 0.9rem; }

/* ecosystem */
.eco { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.eco a.card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.eco a.card:hover { border-color: var(--accent); text-decoration: none; }
.eco a.card h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--accent); }
.eco a.card p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* quick start */
.start { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 1rem; }
.start h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.start pre { margin: 0; font-size: 0.82rem; }

footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--text-dim); font-size: 0.88rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero img { order: -1; width: 110px; }
  header nav { display: none; }
}

/* rf-survey: compact chain + ladder */
.chain {
  list-style: none;
  margin: 2rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.chain li {
  flex: 1 1 200px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  position: relative;
}
.chain li strong { display: block; color: var(--accent); margin-bottom: 0.25rem; }
.chain li span { color: var(--text-dim); font-size: 0.92em; }
.chain li:not(:last-child)::after {
  content: "\2192";
  position: absolute; right: -0.85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--accent); font-weight: bold; z-index: 1;
}
@media (max-width: 720px) { .chain li:not(:last-child)::after { content: none; } }

.ladder { margin-top: 2rem; display: grid; gap: 0.5rem; }
.ladder .rung {
  display: flex; align-items: baseline; gap: 0.9rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  padding: 0.7rem 1rem;
}
.ladder .rung strong { white-space: nowrap; }
.ladder .rung span:last-child { color: var(--text-dim); font-size: 0.95em; }
.ladder .tier {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: bold; font-size: 0.9em;
  padding: 0.1rem 0.5rem; border-radius: 4px;
}
.ladder .r0 { margin-left: clamp(0rem, 12vw, 9rem); }
.ladder .r1 { margin-left: clamp(0rem, 8vw, 6rem); }
.ladder .r2 { margin-left: clamp(0rem, 4vw, 3rem); }
.ladder .r0 .tier { background: var(--bg-hover); color: var(--text-dim); }
.ladder .r1 .tier { background: var(--accent-dim); color: var(--accent); }
.ladder .r2 .tier { background: var(--warn-dim); color: var(--warn); }
.ladder .r3 .tier { background: var(--ok-dim); color: var(--ok); }
.ladder .r1 { border-left-color: var(--accent-dim); }
.ladder .r2 { border-left-color: var(--warn-dim); }
.ladder .r3 { border-left-color: var(--ok); }

.lead-tight { max-width: 62rem; font-size: 1.05em; line-height: 1.65; }
