@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #080808;
  --bg-soft: #0c0c0c;
  --card: rgba(12, 12, 12, 0.92);
  --card-strong: rgba(16, 16, 16, 0.95);
  --card-soft: rgba(14, 14, 14, 0.75);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 92, 26, 0.45);
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --faint: #666666;
  --accent: #ff5c1a;
  --accent-2: #ff8c42;
  --accent-3: #ffb020;
  --accent-soft: rgba(255, 92, 26, 0.12);
  --ok: #3dd68c;
  --warn: #ffb020;
  --danger: #ff4d5a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --radius: 4px;
  --radius-sm: 3px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Barlow Condensed', 'Segoe UI', BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.68;
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72), transparent 82%);
}

a {
  color: var(--accent);
}

strong {
  color: var(--text);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}


.top-inner {
  width: min(1280px, 100% - 2rem);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(255, 92, 26, 0.28), inset 0 1px 0 rgba(255,255,255,0.26);
}

.top-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-soft);
}

.chip-link {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.48rem 0.78rem;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

.chip-link:hover {
  color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.chip-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(255, 92, 26, 0.24);
}

.shell {
  width: min(1280px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

.sidebar,
.hero,
.card,
.foot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 180px at 20% 0%, rgba(255, 92, 26, 0.13), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.014)),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 96px;
  padding: 0.95rem;
}

.sidebar-title {
  margin: 0 0 0.8rem;
  padding: 0 0.35rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar a {
  display: block;
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 0.62rem 0.72rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}

.sidebar a.active,
.sidebar a:hover {
  color: var(--text);
  border-color: rgba(255, 92, 26, 0.36);
  background: var(--accent-soft);
  transform: translateX(3px);
}

.side-divider {
  border: 0;
  height: 1px;
  margin: 0.85rem 0;
  background: var(--border);
}

.main {
  min-width: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.hero > * {
  position: relative;
}

.hero h1 {
  margin: 0.9rem 0 0.75rem;
  max-width: 900px;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 84ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.pill-row,
.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill,
.page-toc a,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.72rem;
  background: var(--card-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: docs-pulse 2s infinite;
}

.page-toc {
  margin-bottom: 1rem;
  padding: 0.9rem;
}

.page-toc a.active,
.page-toc a:hover {
  color: var(--text);
  border-color: rgba(255, 92, 26, 0.42);
  background: var(--accent-soft);
}

.section-stack {
  display: grid;
  gap: 1rem;
}

.card,
.foot {
  position: relative;
  overflow: hidden;
  padding: clamp(1.15rem, 2.5vw, 1.75rem);
}

.card > *,
.foot > * {
  position: relative;
}

.card h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -0.03em;
}

.card h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
}

.card p,
.card li,
.foot {
  color: var(--muted);
}

.card ul,
.card ol {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.grid-2,
.grid-3,
.module-matrix,
.flow-steps,
.command-grid,
.integration-grid {
  display: grid;
  gap: 1rem;
}

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

.grid-3,
.flow-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-matrix,
.integration-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mini-card,
.module-group,
.flow-step,
.integration-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.95rem;
  background: var(--card-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.mini-card h3,
.module-group h3,
.flow-step h3,
.integration-card h3 {
  margin-top: 0;
}

.module-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.module-list span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.58rem;
  background: rgba(6, 11, 24, 0.42);
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.72rem;
}

.callout {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: var(--card-soft);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.callout.info { border-left: 3px solid var(--accent); }
.callout.ok { border-left: 3px solid var(--ok); }
.callout.warn { border-left: 3px solid var(--warn); }
.callout.danger { border-left: 3px solid var(--danger); }

.metric-row {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}

.metric {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.95rem;
  text-align: center;
  background: var(--card-soft);
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 1.12rem;
}

.metric span {
  color: var(--faint);
  font-size: 0.82rem;
}

.code-shell {
  position: relative;
  margin-top: 0.8rem;
}

pre {
  margin: 0;
  overflow: auto;
  border: 1px solid rgba(255, 92, 26, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 92, 26, 0.06), transparent),
    #070d1c;
  color: #dce6ff;
  padding: 1rem;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}


code {
  font-family: "JetBrains Mono", Consolas, monospace;
}

.copy-button {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  background: rgba(18, 27, 47, 0.9);
  color: #d8e4ff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-button.copied {
  background: rgba(69, 224, 178, 0.2);
  color: #9ff0d8;
}

.foot {
  margin: 1rem 0 0;
}

.foot a {
  text-decoration: none;
}

.docs-reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  animation: docs-reveal 560ms var(--ease) forwards;
  animation-delay: var(--docs-delay, 0ms);
}

@keyframes docs-reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes docs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 92, 26, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(255, 92, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 92, 26, 0); }
}

@media (max-width: 1060px) {
  .layout,
  .grid-2,
  .grid-3,
  .module-matrix,
  .flow-steps,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .top-inner {
    min-height: auto;
    padding: 1rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-links {
    width: 100%;
    border-radius: 20px;
  }

  .chip-link {
    flex: 1 1 auto;
    justify-content: center;
  }
}

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

  .docs-reveal,
  .sidebar a:hover,
  .chip-link:hover {
    opacity: 1 !important;
    transform: none !important;
  }
}
