.docs-body {
  min-height: 100dvh;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
}

.docs-body * { scroll-margin-top: 32px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 30;
  padding: 12px 16px;
  background: #fff;
  color: var(--ink);
  font: 650 13px/1 var(--display);
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.docs-body button:focus-visible,
.docs-body a:focus-visible,
.docs-body summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(0, 122, 10, .48);
}

.docs-mobile-header,
.docs-mobile-menu { display: none; }

.docs-shell {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--paper);
}

.docs-index {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 24px 18px 20px;
  border-right: 1px solid #29352e;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--ink);
}

.docs-index .brand { color: #f7f5ee; font-size: 18px; }
.docs-index .brand > span > span { color: var(--brand-green); }

.docs-desktop-nav {
  margin-top: 40px;
  display: grid;
  gap: 22px;
}

.docs-nav-group { display: grid; gap: 2px; }

.docs-nav-label {
  margin: 0 10px 8px;
  color: #82909e;
  font: 650 10px/1 var(--display);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.docs-index nav a {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  color: #c7d0d8;
  font: 570 12px/1 var(--display);
  text-decoration: none;
}

.docs-index nav a:hover { color: #fff; background: #1c241d; }
.docs-index nav a[aria-current="location"] { color: #fff; background: #243127; box-shadow: inset 2px 0 var(--brand-green); }

.docs-index > p {
  margin: auto 8px 0;
  color: #c7d0d8;
  font-size: 11px;
  line-height: 1.55;
}

.docs-index > p i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--orange);
}

.docs-index > p span { color: #82909e; }
.docs-content {
  width: min(100%, 1040px);
  min-width: 0;
  border-right: 1px solid var(--fine);
}

.docs-content > section {
  padding: 46px clamp(36px, 5vw, 68px);
  border-bottom: 1px solid var(--fine);
}

.docs-content > section:last-child { border-bottom: 0; }

.docs-hero {
  min-height: 0;
  padding-top: 48px !important;
  padding-bottom: 50px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.docs-hero h1 {
  max-width: 20ch;
  margin: 0 0 20px;
  font: 630 clamp(36px, 3.6vw, 46px)/1.04 var(--display);
  letter-spacing: -.03em;
  text-wrap: balance;
}

.docs-lede {
  max-width: 66ch;
  margin: 0;
  color: var(--slate);
  font-size: 16px;
  line-height: 1.6;
}

.docs-release {
  margin: 30px 0 0;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.docs-release > div { min-width: 0; padding: 14px 14px 14px 0; }
.docs-release > div + div { padding-left: 14px; border-left: 1px solid var(--fine); }
.docs-release dt,
.docs-eyebrow { color: var(--slate); font: 650 10px/1 var(--display); letter-spacing: .09em; text-transform: uppercase; }
.docs-release dd { margin: 6px 0 0; color: var(--ink); font: 600 12px/1.3 var(--display); overflow-wrap: anywhere; }

.docs-start-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  border-bottom: 1px solid var(--line);
}

.docs-prerequisites { padding: 2px 30px 28px 0; border-right: 1px solid var(--line); }
.quickstart { padding: 2px 0 28px 30px; }
.docs-start-grid h2 { font-size: 20px; }
.docs-prerequisites ul { margin: 18px 0 0; padding-left: 18px; }
.docs-prerequisites > p { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--fine); }
.quickstart ol { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: steps; }
.quickstart li { counter-increment: steps; padding: 13px 0; border-top: 1px solid var(--fine); display: grid; grid-template-columns: 28px 68px 1fr; gap: 10px; }
.quickstart li::before { content: counter(steps, decimal-leading-zero); color: var(--blue); font: 650 11px/1.5 var(--display); }
.quickstart li strong { color: var(--ink); font: 650 13px/1.5 var(--display); }

.docs-hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.docs-hero-actions > a:not(.docs-primary) { margin-top: 26px; min-height: 44px; display: inline-flex; align-items: center; font: 620 12px/1 var(--display); }

.docs-content .docs-primary {
  width: fit-content;
  min-height: 44px;
  margin-top: 26px;
  padding: 0 17px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  background: var(--blue);
  color: #fff;
  font: 650 12px/1 var(--display);
  text-decoration: none;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.docs-content .docs-primary:hover {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
  color: #fff;
}

.docs-content h2 {
  max-width: 22ch;
  margin: 0 0 14px;
  font: 630 clamp(25px, 2.5vw, 32px)/1.08 var(--display);
  letter-spacing: -.025em;
}

.docs-content h3 { margin: 34px 0 10px; font: 620 18px/1.2 var(--display); }
.docs-content p,
.docs-content li { color: var(--slate); font-size: 15px; line-height: 1.65; }
.docs-content > section > p,
.docs-content > section > ul { max-width: 72ch; }
.docs-content > section > p { margin: 16px 0 0; }
.docs-content a { color: var(--blue); }

.docs-content :not(pre) > code {
  color: var(--ink);
  font: 12px/1.45 "Cascadia Code", Consolas, monospace;
  overflow-wrap: anywhere;
}

.docs-contract {
  margin-top: 26px;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.docs-contract > div { min-width: 0; padding: 18px 18px 18px 0; border-bottom: 1px solid var(--fine); }
.docs-contract > div:nth-child(odd) { border-right: 1px solid var(--line); }
.docs-contract > div:nth-child(even) { padding-left: 18px; }
.docs-contract > div:nth-last-child(-n + 2) { border-bottom: 0; }
.docs-contract strong { font: 620 13px/1.2 var(--display); }
.docs-contract p { margin: 6px 0 0; }

.docs-note {
  max-width: 72ch;
  margin-top: 24px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e6eee8;
}

.docs-note strong { font: 620 13px/1.2 var(--display); }
.docs-note p { margin: 5px 0 0; }

.code-block {
  min-width: 0;
  margin-top: 22px;
  border: 1px solid #405166;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ink);
  color: #d8e2eb;
}

.code-label {
  min-height: 42px;
  padding-left: 16px;
  border-bottom: 1px solid #405166;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9facb9;
  font: 600 9px/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.code-label button {
  min-width: 72px;
  min-height: 44px;
  border: 0;
  border-left: 1px solid #405166;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 620 11px/1 var(--display);
}

.code-label button:hover { background: #21384e; color: #fff; }
.code-block pre { margin: 0; padding: 19px; overflow-x: auto; }
.code-block pre code { color: inherit; font: 12px/1.7 "Cascadia Code", Consolas, monospace; }

.docs-content table { width: 100%; margin-top: 24px; border-collapse: collapse; }
.docs-content caption { padding: 0 0 12px; color: var(--slate); font-size: 13px; text-align: left; }
.docs-content th,
.docs-content td { padding: 13px 12px; border-bottom: 1px solid var(--fine); text-align: left; vertical-align: top; }
.docs-content th { color: var(--slate); font: 650 11px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; }
.docs-content td { color: var(--slate); font-size: 13px; line-height: 1.5; }

.docs-glossary { margin: 18px 0 0; border-block: 1px solid var(--line); }
.docs-glossary > div { padding: 14px 0; display: grid; grid-template-columns: minmax(120px, .35fr) 1fr; gap: 20px; border-bottom: 1px solid var(--fine); }
.docs-glossary > div:last-child { border-bottom: 0; }
.docs-glossary dt { color: var(--ink); font: 650 13px/1.5 var(--display); }
.docs-glossary dd { margin: 0; color: var(--slate); font-size: 14px; line-height: 1.55; }

.docs-complete { border-top: 3px solid var(--brand-green); }
.docs-complete .docs-eyebrow { margin: 0 0 12px; color: var(--blue); }

.docs-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 150ms ease-out, transform 200ms cubic-bezier(.16, 1, .3, 1);
}

.docs-toast.visible { opacity: 1; transform: translateY(0); }

/* Customer trust documents */
.legal-body { min-height: 100dvh; overflow: auto; background: var(--paper); color: var(--ink); }
.legal-header { min-height: 78px; padding: 16px clamp(20px, 5vw, 64px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.legal-header nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-header nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--blue); font-family: var(--display); font-weight: 620; text-decoration: none; }
.legal-document { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: clamp(48px, 8vw, 90px) 0 100px; }
.legal-document > header { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.legal-document > header > p:first-child { margin: 0 0 16px; color: var(--blue); font: 620 11px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.legal-document h1 { max-width: 12ch; margin: 0 0 20px; font: 630 clamp(42px, 8vw, 70px)/.98 var(--display); letter-spacing: -.035em; }
.legal-document h2 { margin: 0 0 10px; font: 620 21px/1.2 var(--display); letter-spacing: -.015em; }
.legal-document p { max-width: 72ch; margin: 0; color: var(--slate); font-size: 15px; line-height: 1.7; }
.legal-document section { padding: 28px 0; border-bottom: 1px solid var(--fine); }
.legal-document a { color: var(--blue); overflow-wrap: anywhere; }
.legal-document code { font-family: "Cascadia Code", Consolas, monospace; font-size: .9em; }

@media (max-width: 880px) {
  .docs-mobile-header {
    position: sticky;
    top: 0;
    z-index: 12;
    min-height: 68px;
    padding: 0 16px;
    border-bottom: 1px solid #405166;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ink);
  }

  .docs-mobile-header .brand { color: #fff; }
  .docs-mobile-header .brand { min-height: 44px; }
  .docs-mobile-header .brand > span { display: inline; }
  .docs-mobile-header .brand > span > span { color: var(--brand-green); }
  .docs-mobile-header > a:last-child { min-height: 44px; display: inline-flex; align-items: center; color: var(--brand-green); font: 620 12px/1 var(--display); text-decoration: none; }
  .docs-shell { width: 100%; display: block; }
  .docs-index { position: sticky; top: 68px; z-index: 10; width: 100%; height: auto; padding: 0; border: 0; border-bottom: 1px solid #405166; overflow: visible; }
  .docs-index > .brand,
  .docs-index > p,
  .docs-desktop-nav { display: none; }
  .docs-mobile-menu { display: block; color: #fff; background: var(--ink); }
  .docs-mobile-menu summary { min-height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: #9facb9; font: 620 11px/1 var(--display); list-style: none; text-transform: uppercase; letter-spacing: .06em; }
  .docs-mobile-menu summary::-webkit-details-marker { display: none; }
  .docs-mobile-menu summary::after { content: "+"; color: #fff; font-size: 18px; }
  .docs-mobile-menu[open] summary::after { content: "−"; }
  .docs-mobile-menu summary span { color: #fff; margin-left: auto; margin-right: 14px; text-transform: none; letter-spacing: 0; }
  .docs-mobile-menu nav { padding: 6px 12px 14px; border-top: 1px solid #405166; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .docs-mobile-menu .docs-nav-label { display: block; margin: 10px 8px 5px; }
  .docs-mobile-menu nav a { min-height: 44px; padding: 0 8px; }
  .docs-body * { scroll-margin-top: 132px; }
  .docs-content { width: 100%; border-right: 0; }
  .docs-content > section { padding: 40px 20px; }
  .docs-hero { padding-top: 40px !important; padding-bottom: 44px !important; }
  .docs-hero h1 { font-size: clamp(36px, 10vw, 48px); }
  .docs-contract { grid-template-columns: 1fr; }
  .docs-release { grid-template-columns: 1fr 1fr; }
  .docs-release > div:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--fine); }
  .docs-release > div:nth-child(4) { border-top: 1px solid var(--fine); }
  .docs-start-grid { grid-template-columns: 1fr; }
  .docs-prerequisites { padding: 0 0 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  .quickstart { padding: 28px 0; }
  .docs-contract > div,
  .docs-contract > div:nth-child(even) { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--fine); }
  .docs-contract > div:nth-last-child(2) { border-bottom: 1px solid var(--fine); }
  .docs-content table { display: block; overflow-x: auto; }
  .legal-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .legal-header nav { width: 100%; justify-content: space-between; }
  .legal-document { width: min(100% - 32px, 760px); padding-top: 42px; }
}

@media (max-width: 620px) {
  .docs-content > section { padding-inline: 18px; }
  .docs-hero h1 { font-size: clamp(34px, 10.5vw, 44px); }
}

@media (prefers-reduced-motion: reduce) {
  .docs-toast { transition-duration: .01ms; }
}
