:root {
  color-scheme: dark;
  --bg: #070a0f;
  --bg-2: #0d1117;
  --panel: rgba(13, 17, 23, 0.82);
  --panel-strong: #10151d;
  --ink: #f2f7fb;
  --muted: #9da9b7;
  --soft: #cad6e2;
  --line: rgba(178, 190, 204, 0.18);
  --line-strong: rgba(178, 190, 204, 0.32);
  --green: #40d982;
  --cyan: #4cc9e8;
  --amber: #f0b84f;
  --red: #ff6b6b;
  --violet: #a78bfa;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(7, 10, 15, 0.3), var(--bg) 48%),
    linear-gradient(115deg, #070a0f 0%, #10151d 45%, #0a1411 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 86px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.grid-plane {
  position: absolute;
  inset: -20% -12%;
  opacity: 0.56;
  background-image:
    linear-gradient(rgba(76, 201, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 217, 130, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0%, rgba(240, 184, 79, 0.08) 52%, transparent 80%);
  background-size:
    52px 52px,
    52px 52px,
    100% 100%;
  transform: translate3d(0, var(--parallax-y, 0px), 0) perspective(900px) rotateX(58deg);
  transform-origin: center top;
  will-change: transform;
}

.scan-stack {
  position: absolute;
  top: 120px;
  right: 24px;
  display: grid;
  gap: 12px;
  width: 360px;
  color: rgba(242, 247, 251, 0.17);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

.scan-stack span {
  display: block;
  overflow: hidden;
  padding: 9px 12px;
  border: 1px solid rgba(178, 190, 204, 0.08);
  background: rgba(7, 10, 15, 0.42);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.78);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(64, 217, 130, 0.5);
  border-radius: 8px;
  background: rgba(64, 217, 130, 0.1);
  color: var(--green);
  font-size: 13px;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 56px;
  align-items: center;
  max-width: 1220px;
  min-height: 680px;
  margin: 0 auto;
  padding: 76px 32px 38px;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 19px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  border: 1px solid rgba(64, 217, 130, 0.72);
  background: #dfffe9;
  color: #07110c;
  box-shadow: 0 16px 40px rgba(64, 217, 130, 0.16);
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(242, 247, 251, 0.06);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-strip span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 21, 29, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  display: grid;
  gap: 16px;
}

.hero-visual::before {
  position: absolute;
  inset: -22px;
  z-index: -1;
  border: 1px solid rgba(76, 201, 232, 0.12);
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(76, 201, 232, 0.14) 50%, transparent 51%),
    linear-gradient(180deg, transparent 0 49%, rgba(64, 217, 130, 0.12) 50%, transparent 51%);
  background-size: 44px 44px;
  content: "";
  opacity: 0.64;
}

.console-shell,
.protocol-board,
.command-panel,
.skill-terminal {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.88);
  box-shadow: 0 26px 80px var(--shadow);
}

.console-shell {
  min-width: 0;
  overflow: hidden;
}

.console-shell pre,
.command-panel pre,
.skill-terminal pre {
  min-width: 0;
}

.console-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.console-top strong {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.traffic {
  display: flex;
  gap: 7px;
}

.traffic span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.traffic span:nth-child(1) {
  background: var(--red);
}

.traffic span:nth-child(2) {
  background: var(--amber);
}

.traffic span:nth-child(3) {
  background: var(--green);
}

.console-shell code,
.command-panel code,
.skill-terminal code {
  display: block;
  color: #dbeafe;
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.console-shell code {
  padding: 22px;
}

.muted {
  color: var(--amber);
}

.protocol-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.board-row {
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: rgba(242, 247, 251, 0.03);
}

.board-row:first-child {
  border-left: 0;
}

.board-row span {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.board-row strong {
  color: var(--ink);
  font-size: 15px;
}

.board-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.board-row.active {
  background: rgba(64, 217, 130, 0.11);
}

.board-row.guarded {
  background: rgba(240, 184, 79, 0.1);
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1220px;
  margin: 0 auto 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.66);
  backdrop-filter: blur(10px);
}

.signal-band div {
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}

.signal-band div:first-child {
  border-left: 0;
}

.signal-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.signal-band strong {
  color: var(--ink);
  font-size: 18px;
}

.section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 82px 32px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.command-panel {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(64, 217, 130, 0.08), transparent 44%),
    rgba(13, 17, 23, 0.88);
}

.command-panel code {
  padding: 26px;
  font-size: 15px;
  line-height: 1.8;
}

.journey-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.journey-card {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 21, 29, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.journey-top span {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--amber);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-top p {
  margin-bottom: 0;
  color: var(--muted);
}

.prompt-box {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(76, 201, 232, 0.08), transparent 42%),
    rgba(7, 10, 15, 0.88);
}

.prompt-box code {
  display: block;
  width: 100%;
  max-height: 340px;
  overflow: auto;
  padding: 20px;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.copy-button {
  cursor: pointer;
}

.workflow {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.flow-grid article,
.doc-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 21, 29, 0.68);
}

.flow-grid article {
  min-height: 230px;
  padding: 22px;
}

.flow-grid article span,
.doc-grid span {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--amber);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flow-grid article p,
.skill-copy p {
  color: var(--muted);
}

.skills {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
  gap: 34px;
  align-items: center;
}

.skill-terminal code {
  padding: 24px;
  color: #e4f4ff;
  line-height: 1.7;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.doc-grid a {
  min-height: 132px;
  padding: 20px;
  text-decoration: none;
}

.doc-grid a:hover {
  border-color: rgba(64, 217, 130, 0.65);
  background: rgba(64, 217, 130, 0.08);
}

.doc-grid strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--green);
  text-decoration: none;
}

.docs-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 70px 32px 40px;
}

.docs-hero {
  max-width: 780px;
  padding: 32px 0 20px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.72);
}

.doc-sidebar a {
  padding: 10px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.doc-sidebar a:hover,
.doc-sidebar a[aria-current="page"] {
  background: rgba(64, 217, 130, 0.1);
  color: var(--green);
}

.doc-index-link {
  color: var(--ink);
}

.doc-article {
  min-width: 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 21, 29, 0.78);
  box-shadow: 0 26px 80px var(--shadow);
}

.markdown {
  color: var(--soft);
}

.markdown h1 {
  margin-bottom: 24px;
  font-size: 48px;
  line-height: 1.05;
}

.markdown h2 {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 30px;
}

.markdown h3 {
  margin-top: 28px;
  font-size: 22px;
}

.markdown h4 {
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 17px;
}

.markdown p,
.markdown li {
  color: var(--soft);
  font-size: 16px;
}

.markdown a {
  color: var(--green);
}

.markdown ul,
.markdown ol {
  padding-left: 24px;
}

.markdown li {
  margin: 8px 0;
}

.markdown pre {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.86);
}

.markdown pre code {
  display: block;
  min-width: max-content;
  padding: 18px;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.65;
}

.markdown :not(pre) > code {
  padding: 2px 6px;
  border: 1px solid rgba(76, 201, 232, 0.24);
  border-radius: 6px;
  background: rgba(76, 201, 232, 0.08);
  color: #dff8ff;
}

.source-link {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.source-link a {
  color: var(--green);
}

@media (max-width: 980px) {
  h1 {
    font-size: 64px;
  }

  h2 {
    font-size: 36px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-top: 56px;
  }

  .protocol-board,
  .flow-grid,
  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-band,
  .skills,
  .doc-layout,
  .journey-grid {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: static;
  }

  .signal-band div,
  .signal-band div:first-child {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .signal-band div:first-child {
    border-top: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    padding: 16px 20px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 30px;
  }

  .quickstart h2 {
    max-width: 12ch;
  }

  .quickstart .section-heading,
  .journey-card {
    max-width: 360px;
  }

  .journey-grid {
    justify-items: center;
  }

  .lede {
    font-size: 17px;
    max-width: 30ch;
  }

  .hero,
  .section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-copy,
  .hero-visual,
  .console-shell,
  .protocol-board {
    max-width: calc(100vw - 40px);
  }

  .hero-visual::before {
    inset: -12px;
  }

  .console-shell code,
  .command-panel code,
  .skill-terminal code {
    font-size: 13px;
  }

  .journey-card {
    padding: 16px;
  }

  .prompt-box code {
    max-height: 260px;
    padding: 16px;
    font-size: 11px;
  }

  .console-top {
    grid-template-columns: auto 1fr;
  }

  .console-top strong {
    display: none;
  }

  .protocol-board,
  .flow-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .board-row {
    min-height: 84px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .board-row:first-child {
    border-top: 0;
  }

  .scan-stack {
    display: none;
  }

  .grid-plane {
    opacity: 0.28;
  }

  .footer {
    flex-direction: column;
    padding: 24px 20px;
  }

  .docs-shell {
    padding: 40px 20px;
  }

  .doc-article {
    padding: 22px;
  }

  .markdown h1 {
    font-size: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button:hover {
    transform: none;
  }
}
