:root {
  --ink: #18221f;
  --muted: #5b6864;
  --paper: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #eef4f0;
  --line: #dfe6df;
  --teal: #0c9b8e;
  --teal-dark: #08786e;
  --coral: #e8654f;
  --amber: #d79f39;
  --shadow: 0 18px 44px rgba(23, 33, 31, 0.1);
  --radius: 8px;
  --header: 70px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 18px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.58;
  overflow-x: hidden;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbf8;
  color: #284a42;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

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

.docs-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(23, 33, 31, 0.06);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 850;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--teal);
  color: #ffffff;
  font-size: 0.82rem;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 750;
}

.docs-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-links a,
.toc a {
  border-radius: var(--radius);
  transition: background 160ms ease, color 160ms ease;
}

.top-links a {
  padding: 9px 12px;
}

.top-links a:hover,
.top-links a:focus-visible,
.toc a:hover,
.toc a:focus-visible,
.toc a.is-active {
  background: rgba(12, 155, 142, 0.12);
  color: var(--teal-dark);
  outline: none;
}

.toc-toggle {
  display: none;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
}

.lang-button:hover,
.lang-button:focus-visible {
  background: rgba(12, 155, 142, 0.12);
  outline: none;
}

.lang-button.is-active {
  background: var(--teal);
  color: #ffffff;
}

.docs-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px);
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header) + 20px);
  align-self: start;
  max-height: calc(100svh - var(--header) - 40px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sidebar-search {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.sidebar-search label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-search input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}

.sidebar-search input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(12, 155, 142, 0.14);
}

.toc {
  display: grid;
  gap: 3px;
}

.toc a {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 750;
}

.docs-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.docs-content *,
.docs-sidebar *,
.summary-grid article,
.doc-card,
.steps article,
.split-grid > div {
  min-width: 0;
}

.docs-section,
.hero-doc > *,
.hero-figure {
  max-width: 100%;
}

.docs-section {
  margin-bottom: 18px;
}

.hero-doc {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius);
  color: #ffffff;
  background: #17211f;
  overflow: hidden;
}

.hero-doc h1,
.doc-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero-doc h1 {
  font-size: 5.8rem;
  line-height: 0.94;
  overflow-wrap: anywhere;
}

.doc-card h2 {
  font-size: 2.5rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.doc-card h3,
.steps h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-doc .eyebrow {
  color: #62ded2;
}

.lead {
  max-width: 780px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-primary {
  background: var(--teal);
  color: #ffffff;
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-figure {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.summary-grid,
.split-grid,
.steps {
  display: grid;
  gap: 14px;
}

.summary-grid {
  grid-template-columns: repeat(3, 1fr);
}

.summary-grid article,
.doc-card,
.steps article,
.accordion button,
.accordion div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-grid article {
  padding: 20px;
}

.summary-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-grid p,
.doc-card p,
.doc-card li,
.steps p,
td {
  color: var(--muted);
}

.summary-grid p,
.doc-card p {
  margin: 0;
}

.doc-card {
  padding: clamp(22px, 3vw, 36px);
}

.doc-card > p + h2,
.doc-card > h2 + p,
.doc-card > p + .table-wrap,
.doc-card > p + .split-grid,
.doc-card > p + ul {
  margin-top: 14px;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.split-grid > div,
.doc-card > ul,
.number-list {
  padding: 0;
}

ul,
ol {
  padding-left: 20px;
}

li + li {
  margin-top: 7px;
}

.number-list {
  margin: 20px 0 0;
  list-style-position: outside;
  padding-left: 24px;
}

.table-wrap {
  width: 100%;
  margin-top: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef4f0;
  color: var(--ink);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.note {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #eef8f5;
  color: #244b43;
  font-weight: 700;
}

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.steps article {
  min-height: 270px;
  padding: 20px;
}

.steps span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.code-card,
.code-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.code-grid {
  margin-bottom: 0;
}

.accordion {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.accordion button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.accordion button:hover,
.accordion button:focus-visible {
  border-color: rgba(12, 155, 142, 0.48);
  outline: none;
}

.accordion div {
  margin-top: -8px;
  padding: 14px 16px;
  border-top: 0;
  background: #fbfcfa;
}

.accordion div p {
  margin: 0;
}

.is-hidden-by-search {
  display: none;
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .eyebrow,
html[dir="rtl"] .summary-grid strong,
html[dir="rtl"] th,
html[dir="rtl"] .steps span {
  letter-spacing: 0;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 20px;
  padding-left: 0;
}

html[dir="rtl"] .number-list {
  padding-right: 24px;
  padding-left: 0;
}

html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] .accordion button {
  text-align: right;
}

html[dir="rtl"] .note {
  border-right: 4px solid var(--teal);
  border-left: 0;
}

html[dir="rtl"] .hero-doc h1 {
  line-height: 1.06;
}

@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    top: var(--header);
    right: 16px;
    left: 16px;
    z-index: 25;
    max-height: calc(100svh - var(--header) - 24px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .docs-sidebar.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .toc-toggle {
    display: inline-grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    place-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--ink);
  }

  .toc-toggle span:not(.sr-only) {
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .toc-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(7px) rotate(45deg);
  }

  .toc-toggle[aria-expanded="true"] span:nth-child(3) {
    opacity: 0;
  }

  .toc-toggle[aria-expanded="true"] span:nth-child(4) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .top-links {
    display: none;
  }

  .docs-header-actions {
    gap: 8px;
  }

  .hero-doc {
    grid-template-columns: 1fr;
  }

  .hero-doc h1 {
    font-size: 4.7rem;
  }

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

@media (max-width: 720px) {
  .docs-header {
    padding-inline: 14px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand span:last-child {
    max-width: 220px;
  }

  .docs-shell {
    padding: 16px 14px 28px;
  }

  .hero-doc {
    gap: 22px;
    padding: 24px;
    width: 100%;
  }

  .hero-doc h1 {
    font-size: 3.4rem;
  }

  .doc-card h2 {
    font-size: 2rem;
  }

  .lead {
    max-width: 100%;
    font-size: 1rem;
  }

  .summary-grid,
  .split-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 280px);
  }

  .doc-card {
    padding: 22px;
  }

  .table-wrap {
    margin-right: -6px;
    margin-left: -6px;
    width: calc(100% + 12px);
  }

  .steps article {
    min-height: auto;
  }

  .steps span {
    margin-bottom: 18px;
  }
}

@media (max-width: 420px) {
  :root {
    --header: 62px;
  }

  .docs-header {
    padding-inline: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand span:last-child {
    max-width: 120px;
  }

  .language-switch {
    padding: 2px;
  }

  .lang-button {
    min-width: 30px;
    height: 28px;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .docs-shell {
    padding: 12px 12px 26px;
  }

  .docs-sidebar {
    right: 12px;
    left: 12px;
  }

  .hero-doc,
  .doc-card,
  .summary-grid article,
  .steps article {
    padding: 18px;
  }

  .hero-doc h1 {
    font-size: 2.85rem;
  }

  .doc-card h2 {
    font-size: 1.72rem;
  }

  .lead {
    margin-top: 16px;
  }

  table {
    min-width: 640px;
  }

  th,
  td {
    padding: 11px 12px;
  }

  .code-card code,
  .code-grid code {
    width: 100%;
  }
}

@media (max-width: 340px) {
  .brand span:last-child {
    max-width: 88px;
  }

  .hero-doc h1 {
    font-size: 2.48rem;
  }

  .doc-card h2 {
    font-size: 1.55rem;
  }

  .button {
    padding-inline: 14px;
  }
}

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