:root {
  --doc-bg: #090b0d;
  --doc-surface: #101419;
  --doc-surface-raised: #151a20;
  --doc-line: rgba(167, 180, 191, 0.2);
  --doc-line-strong: rgba(167, 180, 191, 0.38);
  --doc-text: #eef2f3;
  --doc-muted: #98a3aa;
  --doc-dim: #667179;
  --doc-cyan: #58dce5;
  --doc-green: #a7df78;
  --doc-coral: #ff806f;
  --doc-yellow: #f0c36b;
  --doc-content: 1320px;
}

html {
  scroll-padding-top: 100px;
  background: var(--doc-bg);
}

.lua-doc-body {
  min-height: 100vh;
  color: var(--doc-text);
  background: var(--doc-bg);
}

.lua-doc-body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background: rgba(8, 10, 12, 0.84);
}

.doc-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(117, 132, 141, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 132, 141, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 720px);
}

.doc-main {
  position: relative;
  z-index: 2;
}

.doc-header {
  width: min(calc(100% - 32px), var(--doc-content));
}

.doc-header .home-brand {
  min-width: 204px;
}

.doc-header .home-nav a {
  padding: 0 9px;
}

.doc-header-actions .home-purchase {
  background: #181c20;
}

.doc-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 70px;
  width: min(calc(100% - 40px), var(--doc-content));
  min-height: 420px;
  margin: 24px auto 0;
  padding: 78px 40px 62px;
  border-bottom: 1px solid var(--doc-line-strong);
}

.doc-intro-copy {
  align-self: center;
  max-width: 760px;
}

.doc-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--doc-cyan);
  font: 700 10px/1.4 Consolas, "Courier New", monospace;
  letter-spacing: 0;
}

.doc-eyebrow i {
  width: 24px;
  height: 1px;
  background: var(--doc-cyan);
}

.doc-intro h1 {
  margin-top: 20px;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: 0;
}

.doc-intro-copy > p:last-of-type {
  max-width: 690px;
  margin-top: 24px;
  color: var(--doc-muted);
  font-size: 16px;
  line-height: 1.9;
}

.doc-runtime-facts {
  display: flex;
  gap: 0;
  margin-top: 38px;
  border-top: 1px solid var(--doc-line);
  border-bottom: 1px solid var(--doc-line);
}

.doc-runtime-facts div {
  min-width: 142px;
  padding: 16px 20px 15px 0;
}

.doc-runtime-facts div + div {
  padding-left: 20px;
  border-left: 1px solid var(--doc-line);
}

.doc-runtime-facts dt {
  color: var(--doc-dim);
  font: 700 9px/1.3 Consolas, "Courier New", monospace;
}

.doc-runtime-facts dd {
  margin-top: 7px;
  color: #dce4e7;
  font: 700 12px/1.4 Consolas, "Courier New", monospace;
}

.doc-intro-console {
  align-self: center;
  min-width: 0;
  padding: 1px;
  border: 1px solid var(--doc-line-strong);
  border-radius: 6px;
  background: #0b0e11;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.console-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--doc-line);
  background: #13181d;
}

.console-title span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dce4e7;
  font: 700 10px/1 Consolas, "Courier New", monospace;
}

.console-title i,
.code-toolbar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--doc-green);
  box-shadow: 0 0 12px rgba(167, 223, 120, 0.42);
}

.console-title small {
  color: var(--doc-dim);
  font: 700 8px/1 Consolas, "Courier New", monospace;
}

.console-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 54px;
  align-items: center;
  min-height: 58px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(167, 180, 191, 0.12);
}

.console-line > b {
  color: var(--doc-green);
  font-size: 17px;
}

.console-line code {
  color: #f4f6f7;
  font: 700 13px/1.4 Consolas, "Courier New", monospace;
}

.console-line button,
.command-list button {
  min-height: 30px;
  cursor: pointer;
  border: 1px solid var(--doc-line);
  border-radius: 4px;
  color: var(--doc-muted);
  background: #151a1e;
  font-size: 10px;
  font-weight: 800;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.console-line button:hover,
.command-list button:hover {
  color: #061012;
  border-color: var(--doc-cyan);
  background: var(--doc-cyan);
}

.doc-intro-console > p {
  padding: 16px 14px 18px;
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.7;
}

.doc-intro-console > p code {
  color: var(--doc-coral);
  font-family: Consolas, "Courier New", monospace;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px) 168px;
  justify-content: space-between;
  gap: 46px;
  width: min(calc(100% - 40px), var(--doc-content));
  margin: 0 auto;
  padding: 56px 0 100px;
}

.doc-sidebar,
.doc-page-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 116px);
}

.doc-sidebar {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--doc-line-strong) transparent;
}

.doc-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--doc-dim);
  font: 800 9px/1.4 Consolas, "Courier New", monospace;
}

.doc-search > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 40px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--doc-line);
  border-radius: 5px;
  background: #0e1215;
  transition: border-color 160ms ease;
}

.doc-search > div:focus-within {
  border-color: var(--doc-cyan);
}

.doc-search span {
  color: var(--doc-dim);
  font-size: 17px;
}

.doc-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--doc-text);
  background: transparent;
  font-size: 11px;
}

.doc-search input::placeholder {
  color: #59636a;
}

.doc-search kbd {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--doc-line);
  border-radius: 3px;
  color: var(--doc-dim);
  background: #151a1e;
  font: 9px/1 Consolas, monospace;
}

.doc-section-nav {
  margin-top: 26px;
}

.doc-section-nav > small {
  display: block;
  margin: 23px 0 8px;
  color: #657079;
  font: 800 8px/1.4 Consolas, "Courier New", monospace;
}

.doc-section-nav a {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 35px;
  padding: 0 9px;
  border-left: 1px solid var(--doc-line);
  color: #8e999f;
  font-size: 11px;
  font-weight: 700;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.doc-section-nav a span {
  color: #566168;
  font: 8px/1 Consolas, monospace;
}

.doc-section-nav a:hover,
.doc-section-nav a.is-active {
  color: var(--doc-text);
  border-left-color: var(--doc-cyan);
  background: rgba(88, 220, 229, 0.06);
}

.doc-section-nav a.is-active span {
  color: var(--doc-cyan);
}

.doc-sidebar-meta {
  display: flex;
  flex-direction: column;
  margin-top: 34px;
  padding: 16px 0;
  border-top: 1px solid var(--doc-line);
}

.doc-sidebar-meta > span {
  color: var(--doc-dim);
  font: 800 8px/1.3 Consolas, monospace;
}

.doc-sidebar-meta strong {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--doc-green);
  font: 800 10px/1.3 Consolas, monospace;
}

.doc-sidebar-meta strong i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.doc-sidebar-meta small {
  margin-top: 7px;
  color: #59636a;
  font: 8px/1.5 Consolas, monospace;
}

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

.doc-section {
  padding: 8px 0 88px;
  scroll-margin-top: 100px;
}

.doc-section + .doc-section {
  padding-top: 70px;
  border-top: 1px solid var(--doc-line);
}

.doc-section[hidden] {
  display: none;
}

.doc-section-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.doc-section-title > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--doc-line-strong);
  border-radius: 5px;
  color: var(--doc-cyan);
  background: #101519;
  font: 800 10px/1 Consolas, monospace;
}

.doc-section-title small {
  display: block;
  color: var(--doc-dim);
  font: 800 8px/1.3 Consolas, "Courier New", monospace;
}

.doc-section-title h2 {
  margin-top: 3px;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: 0;
}

.doc-lead {
  margin-top: 27px;
  color: #aab3b8;
  font-size: 14px;
  line-height: 1.9;
}

.doc-content p code,
.doc-content li code,
.doc-content aside code {
  padding: 2px 5px;
  border: 1px solid rgba(88, 220, 229, 0.18);
  border-radius: 3px;
  color: #8ce8ed;
  background: rgba(88, 220, 229, 0.06);
  font: 500 0.92em/1.5 Consolas, "Courier New", monospace;
}

.doc-feature-lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 36px;
  border-top: 1px solid var(--doc-line);
  border-bottom: 1px solid var(--doc-line);
}

.doc-feature-lines > div {
  min-height: 184px;
  padding: 24px 20px 22px 0;
}

.doc-feature-lines > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--doc-line);
}

.doc-feature-lines span,
.security-grid small {
  color: var(--doc-cyan);
  font: 800 8px/1.4 Consolas, "Courier New", monospace;
}

.doc-feature-lines strong,
.security-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

.doc-feature-lines p,
.security-grid p {
  margin-top: 12px;
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.75;
}

.doc-callout {
  position: relative;
  margin-top: 30px;
  padding: 20px 22px 20px 48px;
  border: 1px solid var(--doc-line);
  border-left-width: 3px;
  border-radius: 5px;
  background: #11161a;
}

.doc-callout::before {
  position: absolute;
  top: 22px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  content: "i";
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 800 10px/1 Consolas, monospace;
}

.doc-callout b {
  font-size: 12px;
}

.doc-callout p {
  margin-top: 7px;
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.75;
}

.doc-callout-info {
  color: var(--doc-cyan);
  border-left-color: var(--doc-cyan);
}

.doc-callout-warning {
  color: var(--doc-yellow);
  border-left-color: var(--doc-yellow);
}

.doc-callout-warning::before,
.doc-callout-danger::before {
  content: "!";
}

.doc-callout-danger {
  color: var(--doc-coral);
  border-left-color: var(--doc-coral);
}

.doc-steps {
  margin-top: 30px;
  border-top: 1px solid var(--doc-line);
}

.doc-steps li {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  min-height: 100px;
  padding: 22px 0;
  border-bottom: 1px solid var(--doc-line);
}

.doc-steps li > b {
  color: var(--doc-cyan);
  font: 800 10px/1.5 Consolas, monospace;
}

.doc-steps strong {
  font-size: 13px;
}

.doc-steps p {
  margin-top: 9px;
  color: var(--doc-muted);
  font-size: 12px;
  line-height: 1.7;
}

.code-block {
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--doc-line-strong);
  border-radius: 6px;
  background: #080b0d;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 0 9px 0 15px;
  border-bottom: 1px solid var(--doc-line);
  background: #13181c;
}

.code-toolbar > span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #aab4ba;
  font: 700 10px/1 Consolas, "Courier New", monospace;
}

.code-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
  cursor: pointer;
  border: 1px solid var(--doc-line);
  border-radius: 4px;
  color: #929da3;
  background: #191e22;
  font-size: 9px;
  font-weight: 800;
}

.code-toolbar button:hover {
  color: var(--doc-text);
  border-color: var(--doc-cyan);
}

.code-toolbar button b {
  color: var(--doc-cyan);
  font-size: 13px;
}

.code-block pre {
  max-height: 560px;
  margin: 0;
  padding: 24px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #354047 #111518;
}

.code-block code {
  color: #d7dfe2;
  font: 12px/1.85 Consolas, "Courier New", monospace;
  tab-size: 4;
  white-space: pre;
}

.compact-code pre {
  max-height: 340px;
}

.code-block-large pre {
  max-height: 700px;
}

.tok-keyword { color: #ff907f; }
.tok-string { color: #b8e986; }
.tok-number { color: #f0c36b; }
.tok-comment { color: #647078; }

.doc-note {
  margin-top: 20px;
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.75;
}

.signature {
  margin-top: 28px;
  padding: 17px 18px;
  overflow-x: auto;
  border-left: 3px solid var(--doc-cyan);
  color: #e6edef;
  background: #11161a;
}

.signature code {
  font: 700 12px/1.5 Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.api-table {
  margin-top: 28px;
  border-top: 1px solid var(--doc-line-strong);
}

.api-table-head,
.api-row {
  display: grid;
  grid-template-columns: 150px 110px minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  border-bottom: 1px solid var(--doc-line);
}

.api-table-head {
  min-height: 38px;
  color: var(--doc-dim);
  font: 800 8px/1.4 Consolas, "Courier New", monospace;
}

.api-row {
  min-height: 74px;
  padding: 14px 0;
}

.api-row > code {
  color: var(--doc-cyan);
  font: 700 11px/1.55 Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.api-row > em {
  color: var(--doc-yellow);
  font: normal 10px/1.5 Consolas, "Courier New", monospace;
}

.api-row > p {
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.75;
}

.setting-table .api-table-head,
.setting-table .api-row {
  grid-template-columns: 158px 90px minmax(0, 1fr);
}

.runtime-table .api-table-head,
.runtime-table .api-row {
  grid-template-columns: minmax(190px, 1.15fr) 100px minmax(0, 1.5fr);
}

.doc-section h3 {
  margin-top: 38px;
  font-size: 15px;
}

.value-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.value-strip code {
  padding: 8px 11px;
  border: 1px solid var(--doc-line);
  border-radius: 4px;
  color: #d9e1e4;
  background: #11161a;
  font: 10px/1 Consolas, monospace;
}

.api-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  border-top: 1px solid var(--doc-line);
  border-bottom: 1px solid var(--doc-line);
}

.api-methods > div {
  min-height: 105px;
  padding: 20px 16px 18px 0;
}

.api-methods > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--doc-line);
}

.api-methods code {
  color: var(--doc-cyan);
  font: 700 10px/1.4 Consolas, monospace;
}

.api-methods p {
  margin-top: 10px;
  color: var(--doc-muted);
  font-size: 10px;
  line-height: 1.65;
}

.command-list {
  margin-top: 28px;
  border-top: 1px solid var(--doc-line-strong);
}

.command-list > div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 13px 0;
  border-bottom: 1px solid var(--doc-line);
}

.command-list code {
  color: var(--doc-green);
  font: 700 11px/1.5 Consolas, monospace;
}

.command-list p {
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.65;
}

.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 30px;
  border: 1px solid var(--doc-line);
  background: var(--doc-line);
}

.security-grid > div {
  min-height: 165px;
  padding: 23px;
  background: #101519;
}

.security-grid > div:nth-child(2) small { color: var(--doc-green); }
.security-grid > div:nth-child(3) small { color: var(--doc-yellow); }
.security-grid > div:nth-child(4) small { color: var(--doc-coral); }

.security-grid p code {
  display: inline-block;
  margin: 2px 0;
}

.troubleshooting-list {
  margin-top: 28px;
  border-top: 1px solid var(--doc-line-strong);
}

.troubleshooting-list details {
  border-bottom: 1px solid var(--doc-line);
}

.troubleshooting-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  cursor: pointer;
  color: #dce3e6;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.troubleshooting-list summary::-webkit-details-marker {
  display: none;
}

.troubleshooting-list summary b {
  color: var(--doc-cyan);
  font: 400 17px/1 Consolas, monospace;
}

.troubleshooting-list details p {
  padding: 0 44px 22px 0;
  color: var(--doc-muted);
  font-size: 11px;
  line-height: 1.8;
}

.doc-page-toc {
  padding-left: 18px;
  border-left: 1px solid var(--doc-line);
}

.doc-page-toc > small {
  display: block;
  margin-bottom: 14px;
  color: var(--doc-dim);
  font: 800 8px/1.4 Consolas, monospace;
}

.doc-page-toc a {
  display: block;
  padding: 7px 0;
  color: #68737a;
  font-size: 9px;
  font-weight: 700;
  transition: color 160ms ease;
}

.doc-page-toc a:hover,
.doc-page-toc a.is-active {
  color: var(--doc-cyan);
}

.doc-search-empty {
  padding: 28px;
  border: 1px solid var(--doc-line);
  border-radius: 5px;
  background: #101519;
}

.doc-search-empty strong,
.doc-search-empty span {
  display: block;
}

.doc-search-empty strong {
  font-size: 14px;
}

.doc-search-empty span {
  margin-top: 8px;
  color: var(--doc-muted);
  font-size: 11px;
}

.doc-content-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  padding-top: 28px;
  border-top: 1px solid var(--doc-line-strong);
}

.doc-content-footer > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.doc-content-footer img {
  width: 34px;
  height: 34px;
  padding: 4px;
  border: 1px solid rgba(88, 220, 229, 0.38);
  border-radius: 5px;
  background: #11191d;
}

.doc-content-footer strong,
.doc-content-footer small {
  display: block;
}

.doc-content-footer strong {
  font-size: 11px;
}

.doc-content-footer small {
  margin-top: 3px;
  color: var(--doc-dim);
  font: 8px/1.4 Consolas, monospace;
}

.doc-content-footer > a {
  color: var(--doc-muted);
  font-size: 10px;
  font-weight: 800;
}

.doc-content-footer > a b {
  margin-left: 6px;
  color: var(--doc-cyan);
}

.doc-nav-trigger,
.doc-overlay {
  display: none;
}

.copy-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  min-width: 150px;
  padding: 12px 16px;
  visibility: hidden;
  opacity: 0;
  border: 1px solid rgba(167, 223, 120, 0.48);
  border-radius: 5px;
  color: #dff3ce;
  background: #111812;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.4);
  font-size: 10px;
  font-weight: 800;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.copy-toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .doc-header .home-nav a {
    padding: 0 6px;
  }

  .doc-header-actions .home-purchase {
    display: none;
  }

  .doc-layout {
    grid-template-columns: 210px minmax(0, 820px);
  }

  .doc-page-toc {
    display: none;
  }
}

@media (max-width: 900px) {
  body.doc-menu-open {
    overflow: hidden;
  }

  .doc-intro {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
    padding: 60px 24px 48px;
  }

  .doc-intro-console {
    width: min(100%, 560px);
  }

  .doc-nav-trigger {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    width: min(calc(100% - 40px), var(--doc-content));
    min-height: 48px;
    margin: 20px auto 0;
    padding: 0 14px;
    cursor: pointer;
    border: 1px solid var(--doc-line-strong);
    border-radius: 5px;
    color: var(--doc-text);
    background: #11161a;
    text-align: left;
  }

  .doc-nav-trigger > span {
    color: var(--doc-cyan);
    font-size: 18px;
  }

  .doc-nav-trigger b {
    font-size: 11px;
  }

  .doc-nav-trigger small {
    color: var(--doc-dim);
    font: 8px/1 Consolas, monospace;
  }

  .doc-layout {
    display: block;
    padding-top: 42px;
  }

  .doc-sidebar {
    position: fixed;
    top: 0;
    bottom: auto;
    left: 0;
    z-index: 151;
    width: min(310px, calc(100% - 56px));
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 102px 24px 40px;
    visibility: hidden;
    opacity: 0;
    background: #0d1114;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.45);
    transform: translateX(-100%);
    transition: transform 220ms ease, opacity 220ms ease, visibility 220ms ease;
  }

  .doc-sidebar.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
  }

  .doc-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.68);
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .doc-overlay.is-visible {
    visibility: visible;
    opacity: 1;
  }
}

@media (max-width: 820px) {
  .doc-header .home-brand {
    min-width: 0;
  }

  .doc-header-actions {
    display: none;
  }

  .doc-header .home-nav {
    grid-template-columns: 1fr 1fr;
  }

  .doc-intro {
    margin-top: 14px;
  }

  .doc-feature-lines,
  .api-methods {
    grid-template-columns: 1fr;
  }

  .doc-feature-lines > div,
  .api-methods > div {
    min-height: 0;
    padding: 20px 0;
  }

  .doc-feature-lines > div + div,
  .api-methods > div + div {
    padding-left: 0;
    border-top: 1px solid var(--doc-line);
    border-left: 0;
  }

  .api-table-head {
    display: none;
  }

  .api-row,
  .setting-table .api-row,
  .runtime-table .api-row {
    grid-template-columns: minmax(145px, 0.8fr) minmax(0, 1fr);
    gap: 5px 15px;
    align-items: start;
    min-height: 0;
    padding: 18px 0;
  }

  .api-row > p {
    grid-column: 1 / -1;
    margin-top: 4px;
  }
}

@media (max-width: 600px) {
  .doc-intro,
  .doc-layout,
  .doc-nav-trigger {
    width: calc(100% - 24px);
  }

  .doc-intro {
    padding: 48px 8px 38px;
  }

  .doc-intro h1 {
    font-size: 40px;
  }

  .doc-intro-copy > p:last-of-type {
    font-size: 14px;
  }

  .doc-runtime-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .doc-runtime-facts div {
    min-width: 0;
    padding: 14px 12px 14px 0;
  }

  .doc-runtime-facts div + div {
    padding-left: 12px;
  }

  .doc-runtime-facts div:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--doc-line);
    border-left: 0;
  }

  .doc-layout {
    padding-bottom: 60px;
  }

  .doc-section {
    padding-bottom: 64px;
  }

  .doc-section + .doc-section {
    padding-top: 54px;
  }

  .doc-section-title {
    gap: 12px;
  }

  .doc-section-title > span {
    width: 38px;
    height: 38px;
  }

  .doc-section-title h2 {
    font-size: 23px;
  }

  .doc-lead {
    font-size: 13px;
  }

  .code-block pre {
    padding: 19px 16px;
  }

  .code-block code {
    font-size: 11px;
  }

  .code-toolbar button span {
    display: none;
  }

  .code-toolbar button {
    width: 32px;
    justify-content: center;
    padding: 0;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .security-grid > div {
    min-height: 0;
  }

  .command-list > div {
    grid-template-columns: 1fr 54px;
    gap: 8px 14px;
    padding: 17px 0;
  }

  .command-list p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .command-list button {
    grid-column: 2;
    grid-row: 1;
  }

  .doc-callout {
    padding-right: 16px;
  }

  .doc-content-footer {
    align-items: flex-start;
    gap: 24px;
  }

  .copy-toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-sidebar,
  .doc-overlay,
  .copy-toast,
  .console-line button,
  .command-list button {
    transition: none;
  }
}
