:root {
  color-scheme: dark;
  font-family: "Space Grotesk", Inter, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  --ambient-hue: 200;
  --ambient-saturation: 55%;
  --ambient-intensity: 0.36;
  --bg-base: #0e0f12;
  --bg-app: #131418;
  --bg-surface: #181a1f;
  --bg-row: #1a1c22;
  --border-soft: #24262d;
  --border: #2d3038;
  --border-strong: #3a3e48;
  --text: #e7e9ee;
  --text-muted: #9aa1ae;
  --text-dim: #6c7280;
  --sev-error: #ef5b52;
  --sev-warning: #f2b84b;
  --sev-info: #4eb3d3;
  --sev-debug: #8b94a3;
  --sev-other: #5a6070;
  --hikari-cyan: #5fe1ff;
  --hikari-magenta: #ff5fc8;
  --hikari-violet: #b277ff;
  background: var(--bg-base);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-base);
}

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

.page-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(95, 225, 255, 0.035) 0%, transparent 32%),
    radial-gradient(ellipse 95% 70% at 50% 12%, hsla(var(--ambient-hue), var(--ambient-saturation), 42%, 0.18), transparent 68%),
    radial-gradient(ellipse 90% 80% at 50% 28%, rgba(14, 15, 18, 0) 0%, rgba(14, 15, 18, 0.45) 68%, rgba(14, 15, 18, 0.88) 100%),
    var(--bg-base);
  position: relative;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgba(95, 225, 255, 0.68), transparent 62%),
    radial-gradient(1.5px 1.5px at 78% 32%, rgba(255, 95, 200, 0.55), transparent 62%),
    radial-gradient(2px 2px at 22% 78%, rgba(178, 119, 255, 0.52), transparent 62%),
    radial-gradient(1.5px 1.5px at 88% 64%, rgba(95, 225, 255, 0.5), transparent 62%),
    radial-gradient(2.5px 2.5px at 48% 12%, rgba(255, 255, 255, 0.42), transparent 62%),
    radial-gradient(1px 1px at 36% 56%, rgba(255, 95, 200, 0.55), transparent 62%),
    radial-gradient(1.5px 1.5px at 64% 86%, rgba(95, 225, 255, 0.48), transparent 62%),
    radial-gradient(1px 1px at 8% 44%, rgba(178, 119, 255, 0.48), transparent 62%);
  opacity: 0.78;
  animation: sparkleTwinkle 14s ease-in-out infinite alternate;
  z-index: 0;
}

.site-chrome,
main {
  position: relative;
  z-index: 1;
}

.site-chrome {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(36, 38, 45, 0.7);
  background: linear-gradient(180deg, rgba(19, 20, 24, 0.88), rgba(19, 20, 24, 0.56));
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

.site-chrome::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(95, 225, 255, 0.18) 30%, rgba(255, 95, 200, 0.16) 70%, transparent 100%);
}

.product {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 28%, rgba(95, 225, 255, 0.22), transparent 60%),
    linear-gradient(135deg, #1a2438 0%, #0a0d18 100%);
  border: 1px solid rgba(95, 225, 255, 0.32);
  box-shadow:
    0 0 28px rgba(95, 225, 255, 0.22),
    0 0 0 1px rgba(178, 119, 255, 0.12),
    inset 0 0 14px rgba(95, 225, 255, 0.08);
  animation: markPulse 3.6s ease-in-out infinite;
}

.product strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--hikari-cyan) 0%, #ffffff 16%, var(--hikari-cyan) 32%, var(--hikari-violet) 50%, var(--hikari-magenta) 68%, var(--hikari-violet) 84%, var(--hikari-cyan) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hikariShimmer 9s linear infinite;
}

.product small {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
  border-color: rgba(95, 225, 255, 0.22);
  background: rgba(24, 26, 31, 0.64);
}

.site-nav .nav-cta {
  border-color: hsla(var(--ambient-hue), 50%, 65%, 0.28);
  background: linear-gradient(135deg, hsla(var(--ambient-hue), 34%, 18%, 0.5), hsla(var(--ambient-hue), 20%, 10%, 0.58));
}

.hero {
  min-height: calc(100svh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(56px, 8vh, 96px) 0 64px;
  position: relative;
  overflow-anchor: none;
}

.hero-copy {
  max-width: 640px;
  padding: 28px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: hsl(var(--ambient-hue), 80%, 78%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(60px, 12vw, 132px);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(180deg, #ffffff 0%, hsl(var(--ambient-hue), 36%, 76%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.hero-subtitle {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: 0;
}

.hero-text {
  max-width: 580px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
}

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

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 140ms ease, border-color 180ms ease, filter 180ms ease, background 180ms ease;
}

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

.button.primary {
  border: 1px solid hsla(var(--ambient-hue), 65%, 62%, 0.58);
  background: linear-gradient(180deg, hsl(var(--ambient-hue), 70%, 55%), hsl(var(--ambient-hue), 70%, 42%));
  color: white;
  box-shadow: 0 7px 24px hsla(var(--ambient-hue), 80%, 50%, 0.25);
}

.button.primary:hover {
  filter: brightness(1.08);
}

.button.secondary {
  border: 1px solid rgba(95, 225, 255, 0.24);
  background: rgba(24, 26, 31, 0.54);
  color: var(--text-muted);
}

.button.secondary:hover {
  color: var(--text);
  border-color: rgba(95, 225, 255, 0.42);
}

.log-crawl {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  perspective: 900px;
  perspective-origin: 50% 100%;
  opacity: 0.82;
  z-index: -1;
  overflow-anchor: none;
}

.log-track {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 22vh clamp(10px, 1.4vw, 24px) 18px;
  transform: translateY(36px) rotateX(38deg);
  transform-origin: 50% 100%;
  will-change: contents;
  filter: saturate(1.15) blur(0.35px);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.06) 17%, rgba(0, 0, 0, 0.36) 38%, rgba(0, 0, 0, 0.72) 61%, rgba(0, 0, 0, 0.95) 83%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.06) 17%, rgba(0, 0, 0, 0.36) 38%, rgba(0, 0, 0, 0.72) 61%, rgba(0, 0, 0, 0.95) 83%, rgba(0, 0, 0, 1) 100%);
  overflow-anchor: none;
}

.tail-row {
  display: grid;
  grid-template-columns: 84px 230px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 0 12px 0 8px;
  border-left: 3px solid var(--sev-other);
  background: rgba(24, 26, 31, 0.58);
  color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  flex: 0 0 auto;
  height: 22px;
  opacity: 1;
  overflow-anchor: none;
}

.tail-row.is-new {
  transform-origin: 50% 100%;
  animation: tailRowGrow 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  will-change: height, opacity, transform;
}

@keyframes tailRowGrow {
  from {
    height: 0;
    opacity: 0;
    transform: translateY(5px) scaleY(0.88);
  }
  16% {
    opacity: 1;
  }
  to {
    height: 22px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.tail-row.sev-error {
  border-left-color: var(--sev-error);
  background: rgba(50, 22, 22, 0.55);
}

.tail-row.sev-warning {
  border-left-color: var(--sev-warning);
  background: rgba(46, 36, 18, 0.55);
}

.tail-row.sev-info {
  border-left-color: var(--sev-info);
  background: rgba(20, 36, 44, 0.55);
}

.tail-row.sev-debug {
  border-left-color: var(--sev-debug);
}

.tail-row span {
  color: var(--text-dim);
}

.tail-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.tail-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  font-style: normal;
}

.content-band,
.mcp-band {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 76px 0;
  border-top: 1px solid rgba(45, 48, 56, 0.7);
}

.content-band {
  display: grid;
  gap: 34px;
}

.section-copy {
  max-width: 680px;
}

.section-copy h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
}

.section-copy p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
}

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

.feature-grid article {
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(45, 48, 56, 0.82);
  border-radius: 8px;
  background: rgba(24, 26, 31, 0.48);
}

.feature-grid h3 {
  margin-bottom: 12px;
  font-size: 17px;
}

.feature-grid p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.58;
}

.mcp-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 40px;
  align-items: start;
}

.code-sample {
  margin: 0;
  min-width: 0;
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(95, 225, 255, 0.18);
  border-radius: 8px;
  background: rgba(15, 18, 22, 0.72);
  color: var(--text-muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.docs-shell .code-sample {
  border-color: #2a2d35;
  border-radius: 6px;
  background: #0b0d11;
  color: #d6dae3;
  box-shadow: none;
}

.doc-page,
.docs-shell {
  min-height: 100vh;
  background: #0f1115;
}

.docs-shell::before {
  display: none;
}

.docs-shell .site-chrome {
  height: 56px;
  border-bottom: 1px solid #2a2d35;
  background: #111318;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.docs-shell .site-chrome::after {
  display: none;
}

.docs-shell .mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #181b22;
  border-color: #343946;
  box-shadow: none;
  animation: none;
}

.docs-shell .product strong {
  color: #f2f4f8;
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: none;
  font-size: 15px;
  letter-spacing: 0;
}

.docs-shell .product small {
  color: #8f96a3;
  font-size: 11px;
}

.docs-shell .site-nav a {
  border-radius: 4px;
  background: transparent;
  color: #a6adba;
}

.docs-shell .site-nav a:hover,
.docs-shell .site-nav a[aria-current="page"] {
  border-color: #3a4050;
  background: #181b22;
  color: #f2f4f8;
}

.docs-shell .site-nav .nav-cta {
  border-color: #3a4050;
  background: #181b22;
}

.docs-layout {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 38px;
  padding: 36px 0 90px;
}

.docs-sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-right: 1px solid #2a2d35;
}

.docs-sidebar strong,
.docs-sidebar span {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.docs-sidebar span {
  margin-top: 18px;
  color: var(--text-dim);
}

.docs-sidebar a {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  margin-right: 14px;
  border-left: 2px solid transparent;
  color: #a6adba;
  font-size: 13px;
}

.docs-sidebar a:hover,
.docs-sidebar a[aria-current="page"] {
  color: #f2f4f8;
  border-left-color: #6f7787;
  background: #181b22;
}

.docs-content,
.doc-main {
  min-width: 0;
}

.doc-main {
  width: min(1040px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 74px 0 90px;
}

.docs-header {
  max-width: 820px;
  margin-bottom: 46px;
}

.doc-hero {
  max-width: 780px;
  margin-bottom: 56px;
}

.doc-hero h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.96;
}

.docs-header h1 {
  margin-bottom: 18px;
  color: #f2f4f8;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.12;
  font-weight: 650;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.docs-header p:not(.eyebrow),
.docs-section p,
.docs-section li {
  color: #b2bac7;
  line-height: 1.68;
}

.docs-header .eyebrow {
  color: #8f96a3;
  letter-spacing: 0;
}

.doc-hero p,
.doc-card p,
.doc-section p {
  color: var(--text-muted);
  line-height: 1.65;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 70px;
}

.doc-card,
.tool-list article {
  border: 1px solid rgba(45, 48, 56, 0.82);
  border-radius: 8px;
  background: rgba(24, 26, 31, 0.48);
}

.doc-card {
  padding: 22px;
}

.doc-card h2,
.tool-list h3 {
  margin-bottom: 10px;
}

.doc-section {
  padding: 68px 0 0;
  border-top: 1px solid rgba(45, 48, 56, 0.7);
}

.docs-section {
  padding: 44px 0;
  border-top: 1px solid #2a2d35;
}

.docs-section h2 {
  margin-bottom: 14px;
  color: #f2f4f8;
  font-size: 27px;
  line-height: 1.15;
}

.docs-section .code-sample {
  margin: 20px 0 24px;
}

.docs-section .code-sample + p,
.docs-section .code-sample + ul,
.docs-section .code-sample + ol,
.docs-section .reference-table + p {
  margin-top: 18px;
}

.docs-section ol,
.docs-section ul {
  margin: 0;
  padding-left: 22px;
}

.docs-section li + li {
  margin-top: 9px;
}

.docs-section code,
.reference-table code {
  color: var(--text-mono, #d6dae3);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

.reference-table {
  display: grid;
  margin: 18px 0;
  border: 1px solid #2a2d35;
  border-radius: 6px;
  overflow: hidden;
  background: #111318;
}

.reference-table > div {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  padding: 13px 16px;
  border-top: 1px solid #2a2d35;
}

.reference-table > div > * {
  min-width: 0;
}

.reference-table > div:first-child {
  border-top: 0;
  background: #181b22;
}

.reference-table.compact > div {
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
}

.reference-table span {
  color: #b2bac7;
}

.reference-table span code {
  display: inline;
}

@media (max-width: 1120px) {
  .reference-table > div,
  .reference-table.compact > div {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .reference-table > div:first-child {
    display: none;
  }

  .reference-table code {
    display: block;
    width: fit-content;
    max-width: 100%;
  }

  .reference-table span code {
    display: inline;
  }
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.tool-list article {
  min-height: 150px;
  padding: 20px;
}

.tool-list p {
  margin-bottom: 0;
  font-size: 14px;
}

@keyframes hikariShimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

@keyframes markPulse {
  0%, 100% {
    box-shadow:
      0 0 28px rgba(95, 225, 255, 0.22),
      0 0 0 1px rgba(178, 119, 255, 0.12),
      inset 0 0 14px rgba(95, 225, 255, 0.08);
  }
  50% {
    box-shadow:
      0 0 38px rgba(95, 225, 255, 0.4),
      0 0 0 1px rgba(178, 119, 255, 0.25),
      inset 0 0 20px rgba(95, 225, 255, 0.14);
  }
}

@keyframes sparkleTwinkle {
  0% { opacity: 0.6; }
  100% { opacity: 0.85; }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 46px;
  }

  .hero-copy {
    max-width: none;
    padding-bottom: 0;
  }

  .feature-grid,
  .mcp-band,
  .doc-grid,
  .tool-list,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid rgba(45, 48, 56, 0.72);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 18px;
  }

  .docs-sidebar strong,
  .docs-sidebar span {
    grid-column: 1 / -1;
  }

  .log-track {
    opacity: 0.54;
  }
}

@media (max-width: 640px) {
  .site-chrome {
    height: auto;
    min-height: 56px;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
  }

  .site-nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
  }

  .site-nav a {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .hero,
  .content-band,
  .mcp-band {
    width: min(100vw - 28px, 1180px);
  }

  .hero {
    padding-bottom: 44px;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .tail-row {
    grid-template-columns: 64px 120px minmax(0, 1fr);
    font-size: 11px;
  }

  .content-band,
  .mcp-band,
  .doc-main,
  .docs-layout {
    padding: 54px 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .tail-row {
    height: 22px;
    opacity: 1;
    animation-delay: 0ms !important;
  }
}
