:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: rgba(11, 11, 11, 0.72);
  --line: rgba(255, 255, 255, 0.15);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f4f4;
  --muted: #adadad;
  --muted-2: #747474;
  --button-text: #070707;
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.11), transparent 30%),
    linear-gradient(180deg, #101010 0%, #080808 44%, #050505 100%);
}

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

.page {
  min-height: 100vh;
  padding: 28px 22px 42px;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  font-size: 19px;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  padding: 9px 11px;
  border-radius: 10px;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.nav .login,
.button.primary {
  color: var(--button-text);
  background: #f4f4f4;
}

.legal-hero {
  position: relative;
  padding: 64px 30px 32px;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.legal-hero::after {
  position: absolute;
  top: -110px;
  right: -96px;
  width: min(420px, 48vw);
  aspect-ratio: 1;
  content: "";
  background: url("/logo.png") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.035);
}

h1 {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(42px, 8vw, 86px);
  font-weight: 760;
  line-height: 0.94;
  letter-spacing: 0;
}

.lead {
  max-width: 700px;
  margin: 22px 0 0;
  color: #d7d7d7;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
}

.content {
  display: grid;
  gap: 10px;
  padding: 30px;
}

.doc-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
}

.doc-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.doc-card p,
.doc-card li {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.doc-card ul {
  margin: 0;
  padding-left: 18px;
}

.doc-card a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-content {
  gap: 14px;
}

.docs-landing-hero .lead {
  max-width: 820px;
}

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

.docs-quick-grid article,
.docs-mini-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}

.docs-quick-grid span {
  display: inline-flex;
  width: 34px;
  height: 26px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 820;
}

.docs-quick-grid strong,
.docs-mini-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.25;
}

.docs-quick-grid p,
.docs-mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.docs-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016));
}

.docs-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.docs-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.docs-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  stroke-width: 1.7;
}

.docs-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.15;
}

.docs-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  line-height: 1.25;
}

.docs-card p,
.docs-card li {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.docs-card ul {
  margin: 0;
  padding-left: 18px;
}

.docs-scenario-grid,
.docs-tool-grid {
  display: grid;
  gap: 10px;
}

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

.docs-steps {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: docs-step;
}

.docs-steps li {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.38;
  counter-increment: docs-step;
}

.docs-steps li::before {
  display: inline-flex;
  flex: 0 0 auto;
  width: 34px;
  height: 24px;
  align-items: center;
  justify-content: center;
  content: counter(docs-step, decimal-leading-zero);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  font-weight: 820;
}

.docs-list,
.docs-rows {
  display: grid;
  gap: 8px;
}

.docs-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.012));
}

.docs-row span {
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
}

.docs-row p {
  max-width: 760px;
}

.docs-example {
  overflow: auto;
  margin: 0;
  padding: 14px;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.docs-accordion {
  display: grid;
  gap: 10px;
}

.docs-details,
.docs-details-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.docs-details summary,
.docs-details-card summary {
  cursor: pointer;
  list-style: none;
}

.docs-details summary::-webkit-details-marker,
.docs-details-card summary::-webkit-details-marker {
  display: none;
}

.docs-details summary {
  display: grid;
  min-height: 76px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}

.docs-details summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 780;
  line-height: 1.25;
}

.docs-details summary small {
  display: block;
  max-width: 900px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.docs-details summary i {
  color: var(--muted);
  font-size: 24px;
  font-style: normal;
  line-height: 1;
  transition: transform 160ms ease;
}

.docs-details[open] summary i {
  transform: rotate(90deg);
}

.docs-details > .docs-rows {
  padding: 10px;
  border-top: 1px solid var(--line-soft);
}

.docs-details-card {
  display: grid;
  gap: 12px;
  padding: 0;
}

.docs-details-card summary {
  padding: 14px 16px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  font-size: 16px;
  font-weight: 780;
}

.docs-details-card > p,
.docs-details-card > .docs-rows,
.docs-details-card > .docs-example {
  margin-inline: 16px;
}

.docs-details-card > .docs-example {
  margin-bottom: 16px;
}

.docs-note {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.1), transparent 28%),
    rgba(255, 255, 255, 0.045);
}

.docs-note strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 780;
}

.docs-note p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.85fr) minmax(260px, 1.1fr);
  gap: 10px;
  align-items: stretch;
  padding: 24px 30px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 13px;
}

.footer-brand,
.footer-docs,
.footer-owner {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
}

.footer-brand strong,
.footer-docs strong,
.footer-owner strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.footer-brand span,
.footer-owner span {
  color: var(--muted);
  line-height: 1.35;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.footer-links a {
  padding: 7px 9px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.footer-links a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
}

@media (max-width: 820px) {
  .page {
    padding: 12px;
  }

  .shell {
    border-radius: 16px;
  }

  .topbar,
  .legal-hero,
  .content,
  .footer {
    padding-inline: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .doc-card,
  .docs-quick-grid,
  .docs-scenario-grid,
  .docs-row,
  .footer {
    grid-template-columns: 1fr;
  }

  .docs-card-head {
    align-items: flex-start;
  }

  .docs-details summary {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: auto;
  }
}
