:root {
  color-scheme: dark;
  --bg: #07101f;
  --bg-soft: #0c1830;
  --panel: rgba(16, 30, 56, 0.78);
  --panel-strong: rgba(18, 36, 68, 0.94);
  --text: #eef5ff;
  --muted: #a8bad4;
  --line: rgba(154, 181, 225, 0.18);
  --blue: #62d0ff;
  --violet: #9d7cff;
  --green: #69f0ae;
  --orange: #ffca7a;
  --pink: #ff7ab6;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  background:
    radial-gradient(circle at 14% 8%, rgba(98, 208, 255, 0.25), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(157, 124, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 74% 56%, rgba(105, 240, 174, 0.12), transparent 32rem),
    linear-gradient(145deg, var(--bg) 0%, #0a1020 46%, #120b22 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

p,
li,
td {
  color: var(--muted);
}

code {
  font-family: var(--mono);
  color: #d9f2ff;
}

abbr[data-tooltip] {
  cursor: help;
  text-decoration: underline dotted rgba(98, 208, 255, 0.72);
  text-underline-offset: 0.18em;
}

a.term-link {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(98, 208, 255, 0.45);
  text-underline-offset: 0.18em;
}

.site-tooltip {
  position: absolute;
  z-index: 20;
  max-width: min(340px, calc(100vw - 24px));
  padding: 9px 11px;
  border: 1px solid rgba(154, 181, 225, 0.24);
  border-radius: 12px;
  color: #eaf5ff;
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(5, 13, 28, 0.97);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 90ms ease, transform 90ms ease;
}

.site-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 31, 0.76);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(98, 208, 255, 0.5);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(98, 208, 255, 0.25), rgba(157, 124, 255, 0.2)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 32px rgba(98, 208, 255, 0.22);
}

.brand-mark::before {
  content: "🧬";
  font-size: 1.05rem;
  filter: drop-shadow(0 0 10px rgba(98, 208, 255, 0.35));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  gap: 42px;
  align-items: center;
}

.page-hero .lede {
  max-width: 850px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(98, 208, 255, 0.28);
  border-radius: 999px;
  color: #cceeff;
  font-size: 0.88rem;
  font-weight: 800;
  background: rgba(98, 208, 255, 0.08);
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(105, 240, 174, 0.12), 0 0 24px var(--green);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 980px;
  font-size: clamp(3.2rem, 8vw, 7.2rem);
}

h2 {
  font-size: clamp(2.05rem, 5vw, 4rem);
}

h3 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, #fff 0%, var(--blue) 38%, var(--violet) 72%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
}

.lede {
  max-width: 710px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.9vw, 1.35rem);
}

.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  font-weight: 850;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(98, 208, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.btn.primary {
  border-color: rgba(98, 208, 255, 0.58);
  background: linear-gradient(135deg, rgba(98, 208, 255, 0.95), rgba(157, 124, 255, 0.9));
  color: #07111d;
}

.hero-card,
.code-panel,
.screenshot {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card,
.code-panel {
  border-radius: calc(var(--radius) + 8px);
}

.terminal {
  margin: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(3, 8, 18, 0.9);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--pink);
}

.dot:nth-child(2) {
  background: var(--orange);
}

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

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal pre,
.code-panel pre {
  padding: 24px;
  overflow: auto;
  color: #e9f4ff;
  font-size: 0.94rem;
}

.prompt {
  color: var(--green);
}

.cmd {
  color: var(--blue);
}

.comment {
  color: #8195b5;
}

.config-key {
  color: var(--orange);
}

.config-value {
  color: #d9f2ff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 16px 16px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.stat strong {
  display: block;
  color: var(--text);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

section {
  padding: 68px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.section-head p {
  max-width: 640px;
  margin: 0;
  font-size: 1.06rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.card,
.guide-panel {
  position: relative;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.card::after {
  position: absolute;
  right: -48px;
  bottom: -64px;
  width: 140px;
  height: 140px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(98, 208, 255, 0.14), transparent 68%);
}

.card p:last-child,
.guide-panel p:last-child {
  margin-bottom: 0;
}

.kicker {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  margin: 5px 5px 0 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #d9e9ff;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.06);
}

.code-panel {
  background: rgba(2, 7, 18, 0.9);
}

.code-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  padding: 9px calc(var(--radius) + 8px) 9px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.code-panel-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  padding: 2px 8px;
  border: 1px solid rgba(98, 208, 255, 0.28);
  border-radius: 999px;
  color: #dff5ff;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.2;
  background: rgba(98, 208, 255, 0.1);
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: rgba(98, 208, 255, 0.58);
  color: var(--text);
  outline: none;
  background: rgba(98, 208, 255, 0.16);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.step {
  position: relative;
  padding: 20px 20px 20px 72px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 13px;
  color: #06101d;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.step h3 {
  margin-bottom: 6px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.showcase {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 24px;
  align-items: center;
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.node {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.node strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #e8f7ff;
  background: rgba(255, 255, 255, 0.07);
}

tr:last-child td {
  border-bottom: 0;
}

.callout {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 202, 122, 0.3);
  border-radius: 24px;
  color: #ffe4b7;
  background: rgba(255, 202, 122, 0.08);
}

.callout strong {
  color: #fff1cf;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.toc a {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.toc a:hover {
  color: var(--text);
  border-color: rgba(98, 208, 255, 0.4);
}

.footer {
  padding: 52px 0 70px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer a,
.inline-link {
  color: var(--blue);
}

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .showcase {
    grid-template-columns: 1fr;
  }

  .grid.three,
  .grid.four,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 14px;
  }
}

@media (max-width: 720px) {
  .nav {
    position: static;
  }

  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .page-hero {
    padding-top: 56px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .timeline,
  .stats {
    grid-template-columns: 1fr;
  }

  .card,
  .guide-panel {
    padding: 20px;
  }

  .footer .wrap {
    display: block;
  }
}
