/* Docs. Header and footer stay on shared.css. Credit: @paparichens */

.page-docs {
  overflow-x: clip;
}

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

/* Hero unchanged */
.page-docs .pg-splash {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  color: #f3f3ef;
}

.page-docs .pg-splash-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-docs .pg-splash-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 78% 46%;
}

.page-docs .pg-splash-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #0a0a0a 0%, transparent 36%),
    linear-gradient(90deg, #0a0a0a 0%, rgba(10, 10, 10, 0.86) 38%, rgba(10, 10, 10, 0.2) 64%, transparent 82%);
}

.page-docs .pg-splash .container {
  position: relative;
  z-index: 1;
  padding-top: 40px;
  padding-bottom: 48px;
}

.page-docs .pg-splash .eyebrow {
  color: #8d8d86;
}

.page-docs .pg-splash .eyebrow-mark {
  background: #cfcfc8;
}

.page-docs .pg-splash h1 {
  max-width: 16em;
  margin: 0 0 12px;
  color: #f3f3ef;
  font-size: clamp(2.25rem, 5.4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.page-docs .pg-splash .lead {
  max-width: 38rem;
  margin: 0 0 24px;
  color: #a3a39c;
  font-size: 1rem;
  line-height: 1.55;
}

.page-docs .pg-splash .btn-primary {
  background: #f3f3ef;
  border-color: #f3f3ef;
  color: #111111;
}

.page-docs .pg-splash .btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #111111;
}

.page-docs .pg-splash .btn-ghost {
  color: #a3a39c;
  border-color: transparent;
}

.page-docs .pg-splash .btn-ghost:hover {
  color: #f3f3ef;
}

.page-docs .pg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

@media (min-width: 900px) {
  .page-docs .pg-splash .container {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .page-docs .pg-splash-stage img {
    object-position: 62% 48%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-docs .pg-splash-stage img {
    transform: none;
  }
}

/* Corporate docs body */
.page-docs .breadcrumbs-wrap {
  padding-top: 16px;
  padding-bottom: 0;
}

.page-docs .entity-def-wrap {
  padding-top: 24px;
  padding-bottom: 0;
}

.page-docs .entity-def-wrap .callout {
  margin: 0;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 0;
  box-shadow: none;
}

.page-docs .entity-def-wrap .callout h2 {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.page-docs .entity-def-wrap .callout p {
  margin: 0;
  max-width: 52rem;
  color: var(--color-text);
  font-size: 0.9875rem;
  line-height: 1.6;
  font-weight: 400;
}

.page-docs .docs-layout {
  padding: 32px 0 64px;
  background: var(--color-bg);
}

.page-docs .docs-layout-inner {
  display: grid;
  gap: 32px;
  align-items: start;
}

.page-docs .docs-rail {
  margin: 0;
}

.page-docs .docs-toc {
  margin: 0;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

.page-docs .docs-toc h2 {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.page-docs .docs-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  columns: 2;
  column-gap: 24px;
}

.page-docs .docs-toc li {
  break-inside: avoid;
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

.page-docs .docs-toc a {
  display: block;
  padding: 8px 0;
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.page-docs .docs-toc a:hover {
  color: var(--color-accent);
}

.page-docs .docs-main {
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.page-docs .docs-section {
  margin: 0;
  padding: 32px 24px;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}

.page-docs .docs-section:last-child {
  border-bottom: 0;
}

.page-docs .docs-section.section-muted,
.page-docs .docs-section.section {
  background: transparent;
  border-top: 0;
  border-bottom: 1px solid var(--color-border);
  padding: 32px 24px;
}

.page-docs .docs-section > .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

.page-docs .docs-prose h2,
.page-docs .docs-section .section-head h2 {
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-text);
}

.page-docs .docs-section .section-head {
  margin: 0 0 24px;
  max-width: none;
  padding-left: 0;
  border-left: 0;
}

.page-docs .docs-section .section-head p {
  margin: 12px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.page-docs .docs-prose h3 {
  margin: 28px 0 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-text);
}

.page-docs .docs-prose p {
  margin: 0 0 14px;
  max-width: 48rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.page-docs .docs-prose p:last-child {
  margin-bottom: 0;
}

.page-docs .docs-prose ul,
.page-docs .docs-prose ol {
  margin: 0 0 14px;
  padding-left: 18px;
  max-width: 48rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.page-docs .docs-prose li + li {
  margin-top: 6px;
}

.page-docs .docs-prose a,
.page-docs .docs-note a,
.page-docs .docs-row a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-docs .docs-prose a:hover,
.page-docs .docs-note a:hover,
.page-docs .docs-row a:hover {
  color: var(--color-accent-hover);
}

.page-docs .docs-prose code,
.page-docs .docs-note code,
.page-docs .docs-row code,
.page-docs .docs-section code {
  padding: 1px 5px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125em;
  font-weight: 500;
}

.page-docs .docs-code code,
.page-docs pre.docs-code code {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: 400;
}

.page-docs .docs-code,
.page-docs pre.docs-code {
  display: block;
  margin: 0 0 16px;
  padding: 16px 20px;
  overflow-x: auto;
  background: #f3f2ef;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 0;
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78125rem;
  line-height: 1.6;
  white-space: pre;
  box-shadow: none;
}

.page-docs .docs-note {
  margin: 16px 0 0;
  padding: 12px 16px;
  max-width: 48rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.page-docs .table-wrap {
  margin: 16px 0;
  border: 1px solid var(--color-border);
  border-radius: 0;
  overflow-x: auto;
}

.page-docs .compare-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.8125rem;
}

.page-docs .compare-table th,
.page-docs .compare-table td {
  padding: 10px 14px;
  vertical-align: top;
  line-height: 1.45;
}

.page-docs .compare-table th {
  background: #f3f2ef;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.page-docs .compare-table td {
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.page-docs .compare-table tr:last-child td {
  border-bottom: 0;
}

.page-docs .compare-table td:first-child {
  white-space: normal;
  font-weight: 600;
  color: var(--color-text);
  width: 28%;
}

.page-docs .compare-table code {
  font-size: 0.78em;
}

.page-docs .docs-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-border);
}

.page-docs .docs-row {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.page-docs .docs-row h2,
.page-docs .docs-row h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-text);
}

.page-docs .docs-row p {
  margin: 0;
  max-width: 44rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.page-docs .pg-list {
  border-top: 1px solid var(--color-border);
}

.page-docs .pg-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.page-docs .pg-row h2 {
  font-size: 0.875rem;
}

.page-docs .pg-row p {
  font-size: 0.875rem;
  max-width: 44rem;
}

.page-docs .faq-section {
  padding: 32px 24px;
  background: transparent;
  border-top: 0;
  border-bottom: 0;
}

.page-docs .faq-section.section-muted,
.page-docs .docs-section.faq-section {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
}

.page-docs .faq-section .section-head {
  margin-bottom: 20px;
  padding-left: 0;
  border-left: 0;
}

.page-docs .faq-section .section-head h2 {
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.25rem;
}

.page-docs .faq-section .faq-list {
  gap: 0;
  grid-template-columns: 1fr;
}

.page-docs .faq-section .faq-item {
  margin: 0;
  padding: 16px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

.page-docs .faq-section .faq-item:last-child {
  border-bottom: 0;
}

.page-docs .faq-section .faq-question {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.page-docs .faq-section .faq-answer p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.page-docs .content-grid.two {
  gap: 24px;
}

.page-docs .side-card {
  margin: 0;
  padding: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

.page-docs .side-card h2 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.page-docs .side-card ul {
  margin: 0;
  padding-left: 16px;
}

.page-docs .side-card li {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.page-docs .side-card li + li {
  margin-top: 6px;
}

@media (min-width: 720px) {
  .page-docs .docs-section,
  .page-docs .docs-section.section,
  .page-docs .docs-section.section-muted,
  .page-docs .faq-section {
    padding: 40px 40px;
  }

  .page-docs .docs-toc {
    padding: 24px;
  }

  .page-docs .docs-row {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 18px 0;
  }

  .page-docs .pg-row {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

@media (min-width: 1080px) {
  .page-docs .docs-layout {
    padding: 40px 0 88px;
  }

  .page-docs .docs-layout-inner {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
  }

  .page-docs .docs-rail {
    position: sticky;
    top: 80px;
  }

  .page-docs .docs-toc ol {
    columns: 1;
  }

  .page-docs .docs-toc a {
    padding: 7px 0;
    font-size: 0.75rem;
  }
}
