:root {
  --bg: #07070a;
  --panel: #111116;
  --panel-soft: #17171e;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f4fb;
  --body: #cac7d2;
  --muted: #928e9e;
  --purple: #9b73ff;
  --purple-soft: rgba(155, 115, 255, 0.13);
  --green: #77d3a2;
  --yellow: #f3c96c;
  --blue: #77bdf7;
  --max: 1240px;
  --maxw: 100%;
  --white: #fafafa;
  --body-intense: #f5f5f5;
  --gold-deep: #e0a52a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 50% -220px, rgba(111, 76, 218, 0.27), transparent 70%),
    var(--bg);
  font-family: "Fira Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

#nav {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 6, 10, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #nav {
    background: rgba(6, 6, 10, 0.94);
  }
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-left .logo {
  font-size: 28px;
  letter-spacing: 2px;
}

.nav-left .nav-logo {
  display: block;
  flex: 0 0 104px;
  width: 104px;
}

.nav-logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a,
.nav-docs-desktop {
  position: relative;
  padding-bottom: 3px;
  color: var(--body-intense);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

.nav-links a::after,
.nav-docs-desktop::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-deep);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-docs-desktop:hover {
  color: #fff;
}

.nav-links a:hover::after,
.nav-docs-desktop:hover::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -0.24px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-white {
  background: #fff;
  color: #473810;
}

.btn-sm {
  height: 28px;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.21px;
}

.nav-docs-mobile,
.nav-cta-mobile {
  display: none;
}

.vdiv {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.22);
}

.powered {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
}

.powered .pb {
  display: inline-block;
  max-width: 130px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  transition: opacity 0.25s ease, max-width 0.3s ease, margin 0.3s ease;
}

.lysto-logo {
  position: relative;
  z-index: 1;
  height: 14px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  filter: saturate(0.5) brightness(0.92);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.3s ease;
  will-change: transform;
}

.lysto-logo img {
  display: block;
}

.lysto-logo .l-typo {
  width: 38px;
  height: 14px;
}

.lysto-logo .l-mark {
  width: 12px;
  height: 12px;
}

.powered:hover .lysto-logo {
  filter: saturate(1.25) brightness(1.12);
  transform: translateX(-34px) scale(1.85);
}

.powered:hover .pb {
  opacity: 0;
}

.docs-shell {
  width: min(var(--max), calc(100% - 56px));
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 780px);
  justify-content: space-between;
  gap: 72px;
  padding: 54px 0 92px;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  padding: 2px 24px 20px 0;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 24px;
}

.sidebar-group h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-group a {
  padding: 7px 10px;
  border-radius: 7px;
  color: #aaa6b2;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.sidebar-group a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-group a.active {
  color: #d8c9ff;
  background: var(--purple-soft);
}

.sidebar-toggle {
  display: none;
}

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

.eyebrow {
  margin-bottom: 14px;
  color: var(--purple);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.025em;
}

.docs-content h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.06;
}

.docs-content h2 {
  margin: 52px 0 16px;
  padding-top: 4px;
  font-size: 28px;
  line-height: 1.18;
}

.docs-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.docs-content p,
.docs-content li {
  color: var(--body);
  font-size: 16px;
  line-height: 1.72;
}

.docs-content p {
  margin: 0 0 16px;
}

.docs-content .lead {
  max-width: 730px;
  margin-bottom: 30px;
  color: #ddd9e4;
  font-size: 19px;
  line-height: 1.65;
}

.docs-content ul,
.docs-content ol {
  margin: 12px 0 20px;
  padding-left: 24px;
}

.docs-content li {
  margin: 7px 0;
  padding-left: 4px;
}

.docs-content strong {
  color: #f1eef7;
  font-weight: 600;
}

.docs-content code {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: #ddd1ff;
  background: #17151d;
  font-family: "Fira Mono", monospace;
  font-size: 0.88em;
}

.card-grid {
  display: grid;
  gap: 14px;
  margin: 20px 0 28px;
}

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

.doc-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.doc-card p {
  margin: 0;
  font-size: 15px;
}

.callout {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 9px;
  background: rgba(119, 189, 247, 0.07);
}

.callout.tip {
  border-left-color: var(--green);
  background: rgba(119, 211, 162, 0.07);
}

.callout.warning {
  border-left-color: var(--yellow);
  background: rgba(243, 201, 108, 0.07);
}

.callout.limit {
  border-left-color: var(--purple);
  background: var(--purple-soft);
}

.callout > strong {
  display: block;
  margin-bottom: 5px;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--body);
  font-size: 14px;
  line-height: 1.55;
  vertical-align: top;
}

th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

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

.prompt {
  position: relative;
  margin: 16px 0;
  padding: 20px 20px 20px 82px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: #ddd9e4;
  background: #111116;
  font-family: "Fira Mono", monospace;
  font-size: 14px;
  line-height: 1.65;
}

.prompt span {
  position: absolute;
  top: 19px;
  left: 18px;
  padding: 3px 7px;
  border-radius: 5px;
  color: #d8c9ff;
  background: var(--purple-soft);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

details {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

summary {
  padding: 16px 18px;
  color: var(--text);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

details p {
  padding: 0 18px 16px;
}

.docs-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pager-link {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--body);
  text-decoration: none;
}

.pager-link.next {
  text-align: right;
}

.pager-link:hover {
  color: var(--text);
  border-color: rgba(155, 115, 255, 0.5);
}

.pager-link small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.site-footer {
  width: 100%;
  background: #000;
  backdrop-filter: blur(5.85px);
}

.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 115px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.foot-row .logo {
  font-size: 24px;
}

.foot-row .footer-logo {
  display: block;
  flex: 0 0 96px;
  width: 96px;
}

.footer-logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.foot-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.foot-cta a {
  color: var(--body-intense);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

.foot-div {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.foot-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.foot-legal .left {
  display: flex;
  gap: 20px;
}

.foot-legal span,
.foot-legal .left a {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.48px;
  text-decoration: none;
  text-transform: uppercase;
}

.foot-legal .left a:hover {
  color: #fff;
}

@media (max-width: 1100px) {
  .nav-inner {
    padding: 14px 40px;
  }

  .foot-inner {
    padding: 20px 48px;
  }
}

@media (max-width: 900px) {
  .nav-right {
    display: none;
  }

  .nav-feature {
    display: none;
  }

  .nav-docs-mobile {
    display: inline-block;
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin-left: 14px;
  }

  .nav-left {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
  }

  .nav-links {
    display: flex;
    gap: 16px;
    margin-left: auto;
  }

  .nav-links a {
    font-size: 14px;
  }

  .nav-left .logo {
    font-size: 24px;
  }

  .sidebar-toggle {
    position: sticky;
    top: 56px;
    z-index: 15;
    display: block;
    width: 100%;
    padding: 12px 22px;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: var(--body);
    background: rgba(12, 12, 16, 0.96);
    font: 600 13px "Space Grotesk", sans-serif;
    text-align: left;
  }

  .docs-shell {
    width: min(100% - 40px, 780px);
    display: block;
    padding-top: 42px;
  }

  .docs-sidebar {
    position: fixed;
    z-index: 30;
    inset: 105px 18px auto;
    display: none;
    max-height: calc(100vh - 140px);
    padding: 22px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #111116;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  }

  .docs-sidebar.open {
    display: block;
  }

  .card-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    padding: 12px 20px;
  }

  .sidebar-toggle {
    top: 52px;
  }

  .docs-sidebar {
    top: 101px;
  }

  .foot-inner {
    padding: 20px;
  }

  .foot-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .foot-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .docs-shell {
    width: min(100% - 32px, 780px);
    padding-bottom: 64px;
  }

  .docs-content h1 {
    font-size: 37px;
  }

  .docs-content h2 {
    margin-top: 44px;
    font-size: 25px;
  }

  .prompt {
    padding: 52px 16px 16px;
  }

  .docs-pager {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 400px) {
  .nav-inner {
    padding: 10px 14px;
  }

  .nav-left {
    gap: 10px;
  }

  .nav-left .logo {
    font-size: 19px;
    letter-spacing: 1px;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .sidebar-toggle {
    top: 48px;
  }

  .docs-sidebar {
    top: 97px;
  }

  .foot-inner {
    padding: 16px 14px;
  }
}

@page {
  size: A4;
  margin: 16mm 17mm;
}

@media print {
  :root {
    --text: #15131a;
    --body: #2f2c35;
    --muted: #686370;
    --border: #d8d4dd;
    --border-strong: #c8c2cf;
    --purple: #6842c2;
    --purple-soft: #f1ecfb;
  }

  html,
  body {
    color: var(--text);
    background: #fff;
  }

  #nav,
  .sidebar-toggle,
  .docs-sidebar,
  .docs-pager,
  .site-footer {
    display: none !important;
  }

  .docs-shell {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    display: block;
  }

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

  .eyebrow {
    margin-bottom: 8px;
    color: var(--purple);
    font-size: 10px;
  }

  .docs-content h1 {
    max-width: none;
    margin-bottom: 14px;
    color: var(--text);
    font-size: 30px;
  }

  .docs-content h2 {
    margin: 28px 0 10px;
    padding: 0;
    color: var(--text);
    font-size: 20px;
    break-after: avoid-page;
  }

  .docs-content h3 {
    color: var(--text);
    font-size: 15px;
  }

  .docs-content .lead {
    max-width: none;
    margin-bottom: 18px;
    color: #28242e;
    font-size: 14px;
    line-height: 1.5;
  }

  .docs-content p,
  .docs-content li {
    color: var(--body);
    font-size: 11px;
    line-height: 1.5;
  }

  .docs-content p {
    margin-bottom: 9px;
  }

  .docs-content ul,
  .docs-content ol {
    margin: 7px 0 12px;
  }

  .docs-content li {
    margin: 3px 0;
  }

  .docs-content strong {
    color: var(--text);
  }

  .docs-content code {
    border-color: #ddd8e3;
    color: #4e337f;
    background: #f5f2f8;
  }

  .card-grid,
  .table-wrap,
  .callout,
  .prompt,
  details {
    break-inside: avoid-page;
  }

  .doc-card,
  .callout,
  .prompt,
  details,
  .table-wrap {
    border-color: var(--border);
    color: var(--body);
    background: #fff;
    box-shadow: none;
  }

  .doc-card {
    padding: 14px;
  }

  .callout {
    margin: 16px 0;
    padding: 12px 14px;
    border-left-color: var(--purple);
    background: #f8f6fb;
  }

  .callout p,
  .callout li {
    color: var(--body);
  }

  .table-wrap {
    margin: 14px 0 18px;
    overflow: visible;
  }

  table {
    color: var(--body);
    background: #fff;
  }

  th,
  td {
    padding: 8px 9px;
    border-color: var(--border);
    color: var(--body);
    font-size: 9px;
  }

  th {
    color: var(--text);
    background: #f4f2f6;
  }

  .prompt {
    margin: 10px 0;
    padding: 12px 12px 12px 56px;
    color: var(--body);
    font-size: 9px;
  }

  .prompt span {
    top: 11px;
    left: 11px;
    color: #4e337f;
    background: #f1ecfb;
  }

  details {
    margin: 7px 0;
  }

  details:not([open]) > *:not(summary) {
    display: block !important;
  }

  summary {
    padding: 10px 12px 4px;
    color: var(--text);
    font-size: 11px;
    list-style: none;
  }

  summary::-webkit-details-marker {
    display: none;
  }

  details p {
    padding: 0 12px 9px;
  }

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