:root {
  --bg: #0b1110;
  --surface: #101918;
  --surface-alt: #162422;
  --text: #e4f2ec;
  --muted: #97ada4;
  --line: #243732;
  --brand: #23c17b;
  --brand-soft: #173d30;
  --code-bg: #080d0b;
  --code-text: #d6efe2;
  --radius: 14px;
  --shadow: 0 16px 34px rgba(1, 4, 3, 0.45);
  --scroll-track: rgba(12, 24, 20, 0.9);
  --scroll-thumb: linear-gradient(180deg, #1d7f56, #2bc07b);
  --scroll-thumb-hover: linear-gradient(180deg, #25a56f, #38df8f);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 10% 10%, #102421 0%, transparent 40%),
    radial-gradient(circle at 90% 5%, #113128 0%, transparent 34%),
    linear-gradient(145deg, #08100f, #0b1110 45%, #0d1513);
  color: var(--text);
}

.content,
.search-results,
.sidebar,
.toc-panel,
.doc pre {
  scrollbar-width: thin;
  scrollbar-color: #2bc07b var(--scroll-track);
}

.content::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.toc-panel::-webkit-scrollbar,
.doc pre::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.content::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.toc-panel::-webkit-scrollbar-track,
.doc pre::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
  border: 1px solid rgba(93, 126, 112, 0.26);
}

.content::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.toc-panel::-webkit-scrollbar-thumb,
.doc pre::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid rgba(7, 16, 13, 0.85);
}

.content::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.toc-panel::-webkit-scrollbar-thumb:hover,
.doc pre::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

.bg-glow {
  position: fixed;
  inset: -40vmax;
  background:
    radial-gradient(circle at 20% 20%, rgba(35, 193, 123, 0.14), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(32, 137, 95, 0.2), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(22, 92, 67, 0.18), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 16, 0.82);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.3rem 0.55rem;
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(140deg, #18a864, #0f7b4b);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-wrap {
  position: relative;
  margin-left: auto;
  flex: 0 1 360px;
  width: min(360px, 100%);
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 4.5rem 0.55rem 0.75rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}

.search-pill {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #c4dbcf;
  background: rgba(8, 13, 11, 0.78);
  border: 1px solid rgba(118, 149, 137, 0.28);
  border-radius: 7px;
  padding: 0.16rem 0.42rem;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  left: auto;
  transform: none;
  width: min(760px, 94vw);
  max-height: min(72vh, 760px);
  overflow: auto;
  border: 1px solid rgba(122, 159, 146, 0.38);
  border-radius: 12px;
  background: rgba(7, 12, 10, 0.96);
  box-shadow: 0 26px 60px rgba(1, 5, 4, 0.58);
  padding: 0.45rem;
  z-index: 90;
}

.search-empty {
  color: var(--muted);
  padding: 0.65rem 0.7rem;
  font-size: 0.95rem;
}

.search-result {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(63, 90, 81, 0.45);
  border-radius: 8px;
  background: rgba(15, 24, 22, 0.65);
  color: var(--text);
  padding: 0.62rem 0.7rem;
  cursor: pointer;
}

.search-result + .search-result {
  margin-top: 0.35rem;
}

.search-result:hover,
.search-result.active {
  border-color: #88d865;
  background: rgba(24, 41, 34, 0.95);
}

.search-path {
  display: block;
  color: #b6cec4;
  font-weight: 600;
  font-size: 0.98rem;
}

.search-path-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.search-kind-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(118, 149, 137, 0.35);
  background: rgba(12, 24, 21, 0.9);
  color: #88d865;
  font-size: 0.78rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-snippet {
  display: block;
  margin-top: 0.28rem;
  color: #8ea79d;
  font-size: 0.88rem;
}

.search-result mark {
  background: #a3f547;
  color: #0c1a0f;
  border-radius: 3px;
  padding: 0 0.15rem;
}

.layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 230px;
  gap: 1.2rem;
  width: min(1400px, 95vw);
  height: calc(100vh - 84px);
  margin: 0 auto 0;
}

.sidebar,
.toc-panel,
.content {
  animation: rise 380ms ease both;
}

.nav-section + .nav-section {
  margin-top: 0.9rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(118, 149, 137, 0.2);
}

.nav-title {
  width: 100%;
  margin: 0 0 0.45rem;
  padding: 0.2rem 0.25rem;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
}

.nav-section.non-collapsible .nav-title {
  cursor: default;
}

.nav-section.non-collapsible .nav-caret {
  visibility: hidden;
}

.nav-title-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-title-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.nav-title-icon svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-caret {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.nav-caret::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid rgba(179, 205, 196, 0.72);
  border-bottom: 1.6px solid rgba(179, 205, 196, 0.72);
  transform: rotate(45deg);
  transition: transform 170ms ease;
}

.nav-section.collapsed .nav-caret {
  transform: none;
}

.nav-section.collapsed .nav-caret::before {
  transform: rotate(-45deg);
}

.nav-section.collapsed .nav-list {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  border-left-color: transparent;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
  transition-duration: 420ms, 300ms, 340ms;
}

.nav-list {
  list-style: none;
  padding: 0;
  padding-left: 0.72rem;
  margin: 0;
  margin-left: 0.5rem;
  margin-top: 0.2rem;
  border-left: 0;
  overflow: hidden;
  max-height: var(--list-height, 0px);
  opacity: 1;
  transform: translateY(0);
  transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: max-height, opacity, transform;
}

.nav-section:not(.non-collapsible):not(.collapsed) > .nav-list {
  border-left: 1px solid rgba(114, 146, 134, 0.34);
}

.nav-root-pages {
  border-left: 0;
  padding-left: 0;
  margin-left: 0;
  margin-top: 0;
  margin-bottom: 0.95rem;
  padding-bottom: 0.25rem;
}

.nav-link {
  display: block;
  position: relative;
  padding: 0.42rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: var(--surface-alt);
}

.nav-link.active {
  color: #9ef56e;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}

.nav-section:not(.non-collapsible):not(.collapsed) > .nav-list > li > .nav-link.active::before {
  content: "";
  position: absolute;
  left: calc(-0.72rem - 1px);
  top: 0.22rem;
  bottom: 0.22rem;
  width: 2px;
  border-radius: 999px;
  background: #9ef56e;
}

.nav-subsection:not(.non-collapsible):not(.collapsed) > .nav-sublist > li > .nav-link.active::before {
  content: "";
  position: absolute;
  left: calc(-0.6rem - 1px);
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  border-radius: 999px;
  background: #9ef56e;
}

.nav-link.active:hover {
  background: transparent;
}

.nav-subsection {
  list-style: none;
}

.nav-subtitle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #9fb6ad;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.2rem 0.22rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.nav-subtitle-text {
  text-transform: uppercase;
  opacity: 0.95;
}

.nav-subsection.non-collapsible .nav-subtitle {
  cursor: default;
}

.nav-subsection.non-collapsible .nav-caret {
  visibility: hidden;
}

.nav-subsection.collapsed > .nav-subtitle .nav-caret::before {
  transform: rotate(-45deg);
}

.nav-sublist {
  list-style: none;
  padding: 0;
  padding-left: 0.6rem;
  margin: 0.12rem 0 0.22rem 0.42rem;
  border-left: 0;
  overflow: hidden;
  max-height: var(--list-height, 0px);
  opacity: 1;
  transform: translateY(0);
  transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-subsection:not(.non-collapsible):not(.collapsed) > .nav-sublist {
  border-left: 1px solid rgba(103, 136, 124, 0.28);
}

.nav-subsection.collapsed > .nav-sublist {
  max-height: 0;
  opacity: 0;
  transform: translateY(-5px);
  border-left-color: transparent;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.nav-subsection > .nav-sublist .nav-link {
  font-size: 0.92rem;
  padding-left: 0.42rem;
}

.content {
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding-right: 0.15rem;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.doc {
  /*border: 1px solid var(--line);
  border-radius: var(--radius);*/
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 2.1rem);
  line-height: 1.7;
}

.doc h1,
.doc h2,
.doc h3 {
  line-height: 1.25;
  margin-top: 1.5em;
}

.doc h1 {
  margin-top: 0.2em;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
}

.doc h2 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3rem;
}

.doc p {
  margin: 0.8rem 0;
}

.doc hr {
  border: 0;
  height: 1px;
  margin: 1.4rem 0;
  background: linear-gradient(90deg, rgba(114, 146, 134, 0), rgba(114, 146, 134, 0.52), rgba(114, 146, 134, 0));
}

.doc-callout {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  margin: 1rem 0;
  padding: 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(86, 116, 105, 0.35);
}

.doc-callout-info {
  background: rgba(17, 30, 48, 0.72);
  border-color: rgba(64, 122, 222, 0.55);
}

.doc-callout-warn {
  background: rgba(52, 38, 15, 0.72);
  border-color: rgba(214, 151, 46, 0.55);
}

.doc-callout-danger {
  background: rgba(55, 21, 24, 0.78);
  border-color: rgba(214, 72, 83, 0.58);
}

.doc-callout-tip {
  background: rgba(29, 36, 20, 0.78);
  border-color: rgba(154, 206, 96, 0.58);
}

.doc-callout-success {
  background: rgba(19, 44, 34, 0.78);
  border-color: rgba(74, 191, 136, 0.58);
}

.doc-callout-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-top: 0.08rem;
}

.doc-callout-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-callout-info .doc-callout-icon {
  color: #9fc4ff;
  /*border: 1px solid rgba(110, 159, 241, 0.5);*/
}

.doc-callout-warn .doc-callout-icon {
  color: #ffd37d;
  /*border: 1px solid rgba(214, 151, 46, 0.5);*/
}

.doc-callout-danger .doc-callout-icon {
  color: #ff9aa3;
  /*border: 1px solid rgba(214, 72, 83, 0.5);*/
}

.doc-callout-tip .doc-callout-icon {
  color: #d4f59f;
  /*border: 1px solid rgba(154, 206, 96, 0.5);*/
}

.doc-callout-success .doc-callout-icon {
  color: #91e6bd;
  /*border: 1px solid rgba(74, 191, 136, 0.5);*/
}

.doc .doc-callout-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  /*line-height: 1.2;*/
}

.doc-callout-body {
  min-width: 0;
}

.doc-callout-content {
  color: #e5efe9;
}

.doc-callout-content > :first-child {
  margin-top: 0;
}

.doc-callout-content > :last-child {
  margin-bottom: 0;
}

.doc-quote {
  margin: 1rem 0;
  padding: 0.45rem 0 0.45rem 0.9rem;
  border-left: 3px solid rgba(164, 182, 174, 0.72);
  background: linear-gradient(90deg, rgba(25, 32, 30, 0.62), rgba(25, 32, 30, 0));
}

.doc-quote p {
  margin: 0;
  color: #c2d3cb;
  font-style: italic;
}

.doc-table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
  border: 1px solid rgba(92, 121, 111, 0.4);
  border-radius: 10px;
  background: rgba(13, 22, 20, 0.7);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.doc-table th,
.doc-table td {
  padding: 0.62rem 0.72rem;
  border-bottom: 1px solid rgba(92, 121, 111, 0.25);
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  background: rgba(23, 37, 33, 0.92);
  color: #d7eee4;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-table td {
  color: #c5d8d0;
}

.doc-table tbody tr:last-child td {
  border-bottom: 0;
}

.doc-table tbody tr:hover td {
  background: rgba(20, 31, 28, 0.65);
}

.doc-updates {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}

.doc-update-entry {
  position: relative;
  border: 1px solid rgba(92, 121, 111, 0.4);
  border-radius: 10px;
  background: rgba(13, 22, 20, 0.72);
  padding: 0.8rem 0.9rem 0.85rem;
}

.doc-update-entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #52d08f, #2f8f67);
}

.doc-update-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.36rem;
}

.doc-updates-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.doc-updates-filter {
  border: 1px solid rgba(90, 122, 111, 0.45);
  background: rgba(16, 26, 23, 0.78);
  color: #b9cdc5;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.doc-updates-filter.active {
  color: #c9f5de;
  border-color: rgba(106, 191, 150, 0.62);
  background: rgba(31, 74, 58, 0.76);
}

.doc-update-version {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.77rem;
  color: #9ef2cb;
  background: rgba(41, 104, 78, 0.34);
  border: 1px solid rgba(84, 161, 126, 0.5);
  border-radius: 999px;
  padding: 0.14rem 0.46rem;
}

.doc-update-date {
  font-size: 0.8rem;
  color: #9fb5ad;
}

.doc-update-type {
  display: inline-flex;
  margin: 0 0 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 121, 111, 0.42);
  background: rgba(17, 29, 25, 0.7);
  color: #a8c4b8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.14rem 0.46rem;
}

.doc-update-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #d9ece5;
}

.doc-update-items {
  margin: 0;
  padding-left: 1.1rem;
  color: #c4d7cf;
}

.doc-update-items li + li {
  margin-top: 0.24rem;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(92, 121, 111, 0.46);
  background: rgba(17, 29, 25, 0.74);
  color: #c5d8d0;
  font-size: 0.74rem;
  line-height: 1;
  padding: 0.18rem 0.42rem;
  margin: 0 0.18rem;
  vertical-align: 0.08em;
}

.doc-badge-success {
  color: #aef0ce;
  border-color: rgba(82, 182, 136, 0.6);
  background: rgba(23, 59, 45, 0.82);
}

.doc-badge-warning {
  color: #f5df9c;
  border-color: rgba(196, 157, 67, 0.58);
  background: rgba(58, 45, 20, 0.8);
}

.doc-badge-danger {
  color: #ffc0c6;
  border-color: rgba(210, 100, 112, 0.6);
  background: rgba(63, 26, 31, 0.82);
}

.doc-badge-info {
  color: #b9d7ff;
  border-color: rgba(99, 146, 223, 0.56);
  background: rgba(24, 40, 66, 0.8);
}

.doc-codegroup .selectable-box-tabs,
.doc-tabs .selectable-box-tabs {
  background: rgba(10, 18, 16, 0.62);
}

.doc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid rgba(88, 122, 110, 0.62);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 35, 31, 0.95), rgba(15, 24, 22, 0.95));
  color: #dcefe6;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  min-height: 2.1rem;
  cursor: pointer;
}

.doc-action-btn:hover {
  border-color: rgba(126, 173, 156, 0.8);
  color: #f1fbf6;
  background: linear-gradient(180deg, rgba(26, 40, 35, 0.98), rgba(18, 29, 25, 0.98));
}

.doc-action-link {
  cursor: pointer;
}

.doc-collapsible {
  margin: 1rem 0;
  /*border-top: 1px solid rgba(104, 137, 124, 0.35);*/
  border-bottom: 1px solid rgba(104, 137, 124, 0.35);
}

.doc-collapsible-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #dceee6;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  font-family: inherit;
  font-weight: 600;
  padding: 0.7rem 0;
  cursor: pointer;
}

.doc-collapsible-toggle:hover {
  color: #f0fbf5;
}

.doc-collapsible-caret {
  width: 1.1rem;
  color: #9cb8ab;
  transform-origin: 45% 52%;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), color 220ms ease;
}

.doc-collapsible.open .doc-collapsible-caret {
  transform: rotate(90deg);
  color: #c2e6d7;
}

.doc-collapsible-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(-7px);
  overflow: hidden;
  pointer-events: none;
  transition: max-height 340ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease, transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.doc-collapsible.open .doc-collapsible-content {
  pointer-events: auto;
}

.doc-collapsible-inner {
  padding: 0 0 0.9rem 1.65rem;
  color: #d7e8e1;
}

.doc-collapsible-inner > :first-child {
  margin-top: 0.1rem;
}

.doc-collapsible-inner > :last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .doc-collapsible-caret,
  .doc-collapsible-content {
    transition: none;
  }
}

.doc ul,
.doc ol {
  padding-left: 1.2rem;
}

.doc code {
  font-family: "IBM Plex Mono", monospace;
  background: #11201d;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08rem 0.3rem;
  font-size: 0.93em;
}

.doc pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  overflow-x: auto;
}

.code-block {
  position: relative;
}

.code-block-meta {
  position: absolute;
  right: 0.7rem;
  top: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.code-lang {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: #8ca59b;
  text-transform: lowercase;
}

.code-copy-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(72, 102, 91, 0.6);
  background: rgba(9, 16, 14, 0.86);
  color: #b8ccc4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.code-copy-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.code-copy-btn:hover {
  border-color: rgba(132, 179, 162, 0.8);
  color: #d5e9e2;
}

.code-copy-btn.copied {
  border-color: #6fd8a1;
  color: #6fd8a1;
}

.code-copy-btn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  left: auto;
  transform: translateY(-50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #d6efe2;
  background: rgba(8, 13, 11, 0.95);
  border: 1px solid rgba(118, 149, 137, 0.4);
  border-radius: 6px;
  padding: 0.14rem 0.42rem;
  white-space: nowrap;
  pointer-events: none;
}

.code-block pre {
  padding-top: 2.1rem;
}

.doc pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.doc pre code .tok-keyword {
  color: #7fc6ff;
}

.doc pre code .tok-string {
  color: #ffd98c;
}

.doc pre code .tok-number {
  color: #b7f089;
}

.doc pre code .tok-comment {
  color: #7f9289;
}

.doc pre code .tok-fn {
  color: #86f3c6;
}

.doc a {
  color: #78edb8;
}

.inline-custom-icon {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  object-fit: contain;
}

.doc-spoiler {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(86, 116, 105, 0.45);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(20, 33, 30, 0.95), rgba(14, 24, 22, 0.95));
  color: inherit;
  cursor: pointer;
  padding: 0.06rem 0.32rem;
  margin: 0 0.08rem;
  font: inherit;
}

.doc-spoiler .doc-spoiler-text {
  filter: blur(0.34rem);
  user-select: none;
  transition: filter 140ms ease;
}

.doc-spoiler:not(.revealed):hover {
  border-color: rgba(120, 159, 144, 0.7);
}

.doc-spoiler.revealed {
  background: rgba(20, 33, 30, 0.5);
}

.doc-spoiler.revealed .doc-spoiler-text {
  filter: none;
  user-select: text;
}

.doc-spoiler[data-tip]:not(.revealed):hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #d6efe2;
  background: rgba(8, 13, 11, 0.95);
  border: 1px solid rgba(118, 149, 137, 0.4);
  border-radius: 6px;
  padding: 0.14rem 0.42rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 15;
}

.selectable-box {
  border: 1px solid rgba(86, 116, 105, 0.35);
  border-radius: 12px;
  background: rgba(15, 24, 22, 0.78);
  margin: 1rem 0;
  overflow: hidden;
}

.selectable-box-tabs {
  display: flex;
  gap: 0.2rem;
  padding: 0.5rem 0.5rem 0;
  border-bottom: 1px solid rgba(86, 116, 105, 0.35);
}

.selectable-box-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #a7bcb3;
  font-family: inherit;
  font-weight: 600;
  padding: 0.5rem 0.72rem;
  cursor: pointer;
}

.selectable-box-tab.active {
  color: #e4f2ec;
  border-bottom-color: #8df56b;
  background: rgba(9, 16, 14, 0.65);
}

.selectable-box-panels {
  padding: 0.8rem;
}

.selectable-box-panel[hidden] {
  display: none;
}

.selectable-box-content {
  margin: 0 0 0.7rem;
  color: #b7cbc2;
}

.selectable-box-panel pre {
  margin: 0;
}

.doc-stepper {
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
}

.doc-step {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0 0 1.35rem;
}

.doc-step:last-child {
  padding-bottom: 0;
}

.doc-step::after {
  content: "";
  position: absolute;
  left: 1.18rem;
  top: 2.35rem;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(114, 146, 134, 0.45), rgba(114, 146, 134, 0.12));
}

.doc-step-marker {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(86, 116, 105, 0.38);
  background: rgba(28, 33, 30, 0.96);
  color: #abbbb4;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.doc .doc-step-title {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(1.08rem, 1.7vw, 1.55rem);
}

.doc-step-content {
  color: #dbe9e2;
}

.doc-step-content > :first-child {
  margin-top: 0;
}

.doc-step-content > :last-child {
  margin-bottom: 0;
}

.toc-panel {
  position: sticky;
  top: 72px;
  height: calc(100vh - 84px);
  overflow: auto;
  scrollbar-width: none;
  border: 0;
  border-left: 1px solid rgba(118, 149, 137, 0.18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.3rem 0.2rem 0.3rem 1rem;
}

.toc-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.toc-title {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #d4e6dd;
  font-weight: 700;
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.96rem;
  padding: 0.3rem 0;
}

.toc-link:hover {
  color: #d9efe4;
}

.toc-link.toc-h3 {
  padding-left: 0.95rem;
  font-size: 0.9rem;
}

.pager {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.pager a {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  padding: 0.7rem 0.8rem;
}

.pager a:hover {
  background: var(--surface-alt);
}

.pager .next {
  text-align: right;
}

.hidden {
  display: none !important;
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .toc-panel {
    display: none;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-block;
  }

  .layout {
    grid-template-columns: 1fr;
    width: min(100%, 95vw);
    height: calc(100vh - 84px);
  }

  .sidebar {
    padding-top: 0.8rem;
    position: sticky;
    top: 72px;
    height: calc(100vh - 84px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 0.8rem;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    width: 100%;
  }

  .search-pill {
    display: none;
  }

  .search-results {
    position: fixed;
    top: 62px;
    right: 2vw;
    left: auto;
    width: 96vw;
  }

  .doc {
    padding: 1rem;
  }

  .pager {
    grid-template-columns: 1fr;
  }
}
