:root {
  color-scheme: light;
  --bg: #fbfcfd;
  --surface: #ffffff;
  --surface-muted: #f3f7f7;
  --surface-tint: #edf6f4;
  --text: #182023;
  --muted: #59686d;
  --line: #d8e1e4;
  --teal: #147d7e;
  --teal-dark: #0d5f60;
  --teal-soft: #d8eeeb;
  --coral: #d95f4f;
  --coral-soft: #f8dfd9;
  --charcoal: #1f2c31;
  --code: #071014;
  --code-panel: #0d1a20;
  --code-line: #21353d;
  --terminal-green: #77e3b4;
  --terminal-blue: #8cc8ff;
  --terminal-yellow: #ffd166;
  --terminal-red: #ff7a66;
  --terminal-purple: #c7a7ff;
  --shadow: 0 18px 48px rgba(20, 41, 45, 0.13);
  --shadow-soft: 0 10px 28px rgba(20, 41, 45, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 238, 235, 0.7), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(216, 225, 228, 0.82);
  background: rgba(251, 252, 253, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--charcoal);
}

.brand-mark,
.icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  font-weight: 800;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.94rem;
}

.nav a,
.repo-link {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
}

.nav a:hover,
.repo-link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.repo-link {
  border: 1px solid var(--line);
  color: var(--charcoal);
}

.hero {
  position: relative;
  min-height: min(660px, calc(100vh - 72px));
  overflow: hidden;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, rgba(251, 252, 253, 0.98) 0%, rgba(251, 252, 253, 0.94) 48%, rgba(237, 246, 244, 0.92) 100%),
    radial-gradient(circle at 82% 28%, rgba(216, 238, 235, 0.78), transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(248, 223, 217, 0.55), transparent 28%),
    repeating-linear-gradient(
      90deg,
      rgba(216, 225, 228, 0.48) 0,
      rgba(216, 225, 228, 0.48) 1px,
      transparent 1px,
      transparent 72px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(216, 225, 228, 0.45) 0,
      rgba(216, 225, 228, 0.45) 1px,
      transparent 1px,
      transparent 72px
    );
}

.hero-diagram {
  position: absolute;
  right: max(24px, 8vw);
  top: 50%;
  width: min(420px, 34vw);
  aspect-ratio: 1.2;
  transform: translateY(-50%);
  border: 1px solid rgba(216, 225, 228, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 253, 253, 0.86));
  box-shadow: var(--shadow);
}

.hero-diagram::before {
  content: "";
  position: absolute;
  inset: 13px 13px auto;
  height: 10px;
  border-radius: 99px;
  background:
    linear-gradient(90deg, var(--coral) 0 10px, transparent 10px 18px),
    linear-gradient(90deg, var(--teal) 0 10px, transparent 10px 18px),
    linear-gradient(90deg, #8b989d 0 10px, transparent 10px 18px);
  background-position:
    0 0,
    18px 0,
    36px 0;
  background-repeat: no-repeat;
}

.diagram-panel {
  position: absolute;
  inset: 26px;
  display: grid;
  align-content: end;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 18px;
}

.diagram-panel span {
  display: block;
  border-radius: 4px 4px 0 0;
  background: var(--teal);
}

.diagram-panel span:nth-child(1) {
  height: 38%;
}

.diagram-panel span:nth-child(2) {
  height: 68%;
  background: var(--coral);
}

.diagram-panel span:nth-child(3) {
  height: 52%;
  background: var(--charcoal);
}

.diagram-lines {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, transparent 48%, rgba(20, 125, 126, 0.36) 49%, transparent 51%),
    linear-gradient(25deg, transparent 48%, rgba(217, 95, 79, 0.24) 49%, transparent 51%);
  opacity: 0.75;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 92px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  color: var(--charcoal);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  color: var(--charcoal);
  font-size: 1.04rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 650px;
  margin: 20px 0 0;
  color: #324349;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.button.primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  box-shadow: 0 10px 22px rgba(20, 125, 126, 0.22);
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--charcoal);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
  margin-top: 30px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(216, 225, 228, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(20, 41, 45, 0.04);
}

.hero-stats strong {
  margin-right: 6px;
  color: var(--charcoal);
}

.band,
.docs-section {
  padding: 82px 0;
}

.muted {
  background:
    linear-gradient(180deg, var(--surface-muted), #f8fbfb);
}

.section-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.section-heading {
  max-width: 670px;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.04rem;
}

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

.feature-grid,
.mode-grid,
.benchmark-grid,
.doc-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

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

.feature-card,
.mode-card,
.metric-card,
.api-list article,
.doc-link-grid a {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.feature-card:hover,
.mode-card:hover,
.metric-card:hover,
.api-list article:hover,
.doc-link-grid a:hover {
  border-color: rgba(20, 125, 126, 0.34);
  box-shadow: 0 16px 34px rgba(20, 41, 45, 0.11);
  transform: translateY(-2px);
}

.feature-card p,
.mode-card p,
.metric-card p,
.api-list p {
  margin: 0;
  color: var(--muted);
}

.doc-link-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.doc-link-grid a {
  display: flex;
  min-height: 62px;
  align-items: center;
  color: var(--charcoal);
  font-weight: 800;
}

.doc-link-grid a:hover {
  border-color: rgba(20, 125, 126, 0.45);
  color: var(--teal-dark);
}

.feature-card .icon {
  margin-bottom: 18px;
}

.search-band {
  padding: 34px 0;
  background:
    linear-gradient(135deg, var(--charcoal), #163f42);
  color: white;
}

.search-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: center;
}

.search-layout h2 {
  color: white;
  font-size: 1.75rem;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0 16px;
  font: inherit;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 46px;
  align-items: start;
}

.plain-list {
  padding-left: 20px;
  color: var(--muted);
}

.code-stack {
  display: grid;
  gap: 14px;
}

.code-block {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(103, 132, 140, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 0%, rgba(119, 227, 180, 0.13), transparent 32%),
    linear-gradient(180deg, var(--code-panel), var(--code));
  box-shadow:
    0 22px 50px rgba(7, 16, 20, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-block.tall pre {
  max-height: 540px;
}

.code-title {
  min-height: 42px;
  padding: 12px 16px 12px 78px;
  border-bottom: 1px solid var(--code-line);
  background: rgba(255, 255, 255, 0.025);
  color: #c8dde2;
  font-size: 0.86rem;
  font-weight: 800;
}

.code-title::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 16px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--terminal-red);
  box-shadow:
    18px 0 0 var(--terminal-yellow),
    36px 0 0 var(--terminal-green);
}

pre {
  margin: 0;
  padding: 20px 20px 22px;
  overflow: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 50%, transparent 50%) 0 0 / 100% 3.3em,
    linear-gradient(90deg, rgba(119, 227, 180, 0.04), transparent 22%);
  color: #dceff2;
  font-size: 0.88rem;
  line-height: 1.65;
}

pre code {
  display: block;
  min-width: max-content;
}

.token-comment {
  color: #7f969d;
}

.token-keyword {
  color: var(--terminal-purple);
  font-weight: 700;
}

.token-string {
  color: var(--terminal-green);
}

.token-number {
  color: var(--terminal-yellow);
}

.token-function {
  color: var(--terminal-blue);
}

.token-operator {
  color: #ff9f8e;
}

.token-command {
  color: var(--terminal-green);
  font-weight: 800;
}

.api-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

th {
  color: var(--charcoal);
  font-size: 0.85rem;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

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

.metric {
  display: block;
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
}

.contact {
  background:
    linear-gradient(135deg, var(--charcoal), #123f41);
  color: white;
}

.contact h2,
.contact h3 {
  color: white;
}

.contact p {
  color: rgba(255, 255, 255, 0.74);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.hidden-by-search {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero {
    min-height: 620px;
  }

  .hero::after {
    display: none;
  }

  .hero-diagram {
    right: 18px;
    top: auto;
    bottom: 24px;
    width: min(320px, calc(100% - 36px));
    opacity: 0.42;
    transform: none;
  }

  .search-layout,
  .two-column,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .mode-grid,
  .benchmark-grid,
  .api-list,
  .doc-link-grid {
    grid-template-columns: 1fr;
  }

  .band,
  .docs-section {
    padding: 58px 0;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 10px 16px 0;
    gap: 10px;
  }

  .repo-link {
    min-height: 38px;
    padding: 8px 10px;
  }

  .hero-overlay,
  .section-inner {
    width: min(100% - 28px, 1120px);
  }

  .hero-actions,
  .contact-actions,
  .footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  pre {
    font-size: 0.8rem;
    padding: 14px;
  }
}
