/* Crow5 Product Documentation · v6.32.0 */

.nav-links a.active:not(.nav-cta) {
  color: var(--text);
}
.nav-links a.active:not(.nav-cta)::after {
  transform: scaleX(1);
}

.docs-page {
  background:
    radial-gradient(ellipse 760px 360px at 50% 0%, rgba(54,125,255,0.16), transparent 72%),
    var(--bg);
}

.docs-hero {
  position: relative;
  padding: calc(var(--nav-h) + 70px) 0 58px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.docs-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--hero-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask: linear-gradient(to bottom, #000 0%, transparent 92%);
}

.docs-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: end;
}

.docs-hero-inner > * {
  min-width: 0;
}

.docs-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}

.docs-hero p {
  max-width: 720px;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.docs-hero-meta {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.docs-hero-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.docs-hero-meta div:last-child {
  border-bottom: 0;
}

.docs-hero-meta span {
  color: var(--muted);
  font-size: 13px;
}

.docs-hero-meta strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

.docs-main {
  padding: 42px 0 96px;
}

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

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 18px);
  max-height: calc(100vh - var(--nav-h) - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.docs-sidebar-head {
  margin-bottom: 16px;
}

.docs-sidebar-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.docs-sidebar h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}

.docs-nav {
  display: grid;
  gap: 4px;
}

.docs-nav-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 9px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}

.docs-nav-link:hover,
.docs-nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.docs-nav-link span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--brand);
  padding-top: 2px;
}

.docs-nav-link strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.docs-article {
  min-width: 0;
}

.doc-module {
  scroll-margin-top: calc(var(--nav-h) + 24px);
  padding: 42px 0;
  border-bottom: 1px solid var(--border);
}

.doc-module:first-child {
  padding-top: 22px;
}

.doc-module:last-child {
  border-bottom: 0;
}

.doc-module-head {
  margin-bottom: 30px;
}

.doc-module-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: rgba(54,125,255,0.14);
  color: var(--brand-400);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
}

.doc-module-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 14px;
}

.doc-module-head p {
  max-width: 760px;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.8;
}

.doc-module-body {
  max-width: 900px;
}

.doc-module-body p,
.doc-bullet,
.doc-step {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.85;
  margin: 10px 0;
}

.doc-heading {
  color: var(--text);
  letter-spacing: -0.3px;
}

.doc-heading-2 {
  margin: 32px 0 14px;
  font-size: 24px;
}

.doc-heading-3 {
  margin: 24px 0 8px;
  font-size: 18px;
}

.doc-bullet {
  position: relative;
  padding-left: 22px;
}

.doc-bullet::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(54,125,255,0.12);
}

.doc-step {
  padding-left: 18px;
  border-left: 2px solid var(--border-brand);
}

.doc-note {
  padding: 14px 16px;
  border: 1px solid var(--border-brand);
  border-radius: 10px;
  background: rgba(54,125,255,0.08);
  color: var(--text);
}

.doc-caption,
.doc-figure figcaption {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

.doc-figure {
  margin: 22px 0 30px;
}

.doc-figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  box-shadow: var(--shadow-card);
}

.doc-table-wrap {
  margin: 24px 0 34px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.doc-table-wrap table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--surface);
}

.doc-table-wrap th,
.doc-table-wrap td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.55;
}

.doc-table-wrap th {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 700;
}

.doc-table-wrap td {
  color: var(--text-dim);
}

.doc-table-wrap tr:last-child td {
  border-bottom: 0;
}

.docs-empty {
  padding: 42px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-2);
  border-radius: 12px;
}

@media (max-width: 1180px) {
  #nav {
    padding: 0 20px;
  }
  .nav-links {
    gap: 18px;
  }
  .logo-sub {
    display: none;
  }
}

@media (max-width: 1024px) {
  .docs-hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .docs-hero-meta {
    width: 100%;
    max-width: 520px;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }
  .docs-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .docs-hero {
    padding: calc(var(--nav-h) + 46px) 0 40px;
  }
  .docs-hero p {
    font-size: 16px;
    word-break: break-all;
  }
  .docs-hero-meta div {
    flex-direction: column;
    gap: 4px;
  }
  .docs-hero-meta strong {
    text-align: left;
  }
  .docs-main {
    padding-top: 24px;
  }
  .docs-nav {
    grid-template-columns: 1fr;
  }
  .doc-module {
    padding: 34px 0;
  }
  .doc-module-body p,
  .doc-bullet,
  .doc-step {
    font-size: 15px;
  }
}
