.docs-main { padding-top: 43px; }
.docs-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.docs-heading h1 { margin: 8px 0 5px; font-size: clamp(31px, 4vw, 43px); letter-spacing: -.055em; line-height: 1.12; font-weight: 680; }
.docs-heading p { margin: 0; color: #8290a6; font-size: 12px; }
.docs-count { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; color: #96a4bb; border: 1px solid var(--line); border-radius: 8px; background: rgba(16,24,39,.55); font-size: 10px; white-space: nowrap; }
.docs-layout { display: grid; grid-template-columns: 256px minmax(0,1fr); gap: 21px; align-items: start; }
.doc-sidebar { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(14,21,34,.74); backdrop-filter: blur(15px); }
.sidebar-details > summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 15px 14px; list-style: none; color: #d4deef; font-size: 11px; font-weight: 680; border-bottom: 1px solid var(--line); cursor: pointer; }
.sidebar-details > summary::-webkit-details-marker { display: none; }
.summary-count { color: #7a8aa5; font-family: ui-monospace, monospace; font-size: 9px; }
.sidebar-inner { padding: 15px 12px 12px; }
.field-label { display: block; margin: 0 0 7px 1px; color: #74829a; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-search { height: 37px; display: flex; align-items: center; gap: 8px; padding: 0 10px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7,12,21,.48); color: #8d9bb2; }
.sidebar-search > span { font-size: 18px; }
.sidebar-search input { font-size: 10px; }
.select-field { width: 100%; height: 36px; padding: 0 9px; margin-bottom: 19px; color: #c7d4e8; background: #111a2a; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.sidebar-list-label { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 8px; color: #687790; font-size: 8px; font-weight: 750; letter-spacing: .13em; }
.sidebar-list-label span:last-child { font-family: ui-monospace, monospace; }
.doc-list { display: flex; flex-direction: column; gap: 4px; }
.doc-list-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 7px; border: 1px solid transparent; border-radius: 7px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.doc-list-item:hover { background: rgba(255,255,255,.035); }
.doc-list-item.is-active { border-color: rgba(120,169,255,.16); background: rgba(77,127,204,.12); }
.doc-list-icon { width: 25px; height: 25px; border-radius: 6px; font-size: 8px; flex: 0 0 auto; }
.doc-list-copy { min-width: 0; flex: 1; }
.doc-list-copy strong, .doc-list-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.doc-list-copy strong { color: #cbd7e9; font-size: 10px; font-weight: 620; }
.doc-list-copy small { color: #6f7d94; font-family: ui-monospace, monospace; font-size: 8px; }
.doc-list-arrow { color: #6f8dbd; opacity: 0; font-size: 11px; }
.doc-list-item.is-active .doc-list-arrow, .doc-list-item:hover .doc-list-arrow { opacity: 1; }
.sidebar-empty, .sidebar-loading { padding: 14px 6px; color: #728099; font-size: 10px; line-height: 1.6; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); color: #687891; font-size: 9px; }
.recent-block { margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line); }
.recent-item { width: 100%; display: flex; align-items: center; gap: 7px; padding: 6px 4px; overflow: hidden; border: 0; color: #8392a9; background: transparent; font-size: 9px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.recent-item:hover { color: #d1def2; }
.recent-item span { color: #6c92ce; }

.doc-workspace { min-width: 0; }
.doc-state { min-height: 410px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 11px; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15,23,37,.53); text-align: center; }
.doc-state strong { color: #d5dfef; font-size: 14px; font-weight: 650; }
.doc-state > span:not(.loader):not(.state-symbol) { max-width: 410px; color: #7d8ba2; font-size: 11px; }
.doc-state .button { margin-top: 8px; }
.state-symbol { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,140,155,.24); border-radius: 50%; color: #f39aa7; background: rgba(255,140,155,.06); font-size: 20px; }
.doc-state-empty .state-symbol { border-color: var(--line-strong); color: #9badc9; background: rgba(120,169,255,.05); }
.document-view { min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin: 3px 0 20px; color: #6d7b93; font-size: 9px; }
.breadcrumb a { color: #92b5ee; }
.breadcrumb strong { overflow: hidden; color: #aab7ca; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.document-kicker { color: #85a9df; font-size: 8px; font-weight: 750; letter-spacing: .17em; }
.document-header h2 { margin: 5px 0 6px; color: #e4ebf7; font-size: clamp(23px, 3vw, 31px); line-height: 1.2; letter-spacing: -.045em; font-weight: 670; }
.document-header p { max-width: 620px; margin: 0; color: #8b98ad; font-size: 11px; line-height: 1.7; }
.bookmark-button { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: #9eabc0; background: rgba(255,255,255,.025); font-size: 9px; cursor: pointer; }
.bookmark-button span:first-child { color: #8fb4f0; font-size: 14px; }
.bookmark-button.is-bookmarked { color: #cfdbef; border-color: rgba(120,169,255,.27); background: rgba(75,125,207,.12); }
.bookmark-button.is-bookmarked span:first-child { color: #a9c8ff; }
.document-meta { display: flex; flex-wrap: wrap; gap: 17px; margin: 17px 0 25px; padding-bottom: 15px; border-bottom: 1px solid var(--line); color: #718099; font-size: 9px; }
.document-meta span { display: inline-flex; align-items: center; gap: 6px; }
.document-meta strong { color: #b5c3d8; font-weight: 550; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.code-toolbar-left, .code-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.code-file-icon { width: 24px; height: 24px; border-radius: 5px; font-size: 8px; }
.code-toolbar-left > strong { overflow: hidden; color: #cbd7e8; font-family: ui-monospace, monospace; font-size: 10px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.language-pill { padding: 3px 7px; color: #8f9fba; border: 1px solid var(--line); border-radius: 5px; font-size: 8px; white-space: nowrap; }
.tool-button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: #aab8cd; background: rgba(255,255,255,.025); font-size: 9px; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.tool-button:hover { background: rgba(120,169,255,.08); border-color: rgba(120,169,255,.25); }
.tool-button-copy { color: #d0dff6; border-color: rgba(120,169,255,.24); background: rgba(77,129,211,.12); }
.tool-button-copy span { padding-left: 4px; color: #9dbef4; }
.code-window { overflow: hidden; border: 1px solid rgba(133,160,202,.19); border-radius: 10px; background: #0c111b; box-shadow: 0 16px 43px rgba(0,0,0,.22); }
.terminal-bar { height: 39px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-bottom: 1px solid rgba(173,193,225,.1); background: rgba(22,31,48,.72); }
.terminal-bar > span:nth-child(2) { overflow: hidden; color: #8f9db3; font-family: ui-monospace, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.terminal-bar .window-dots { gap: 5px; }
.terminal-bar .window-dots i { width: 6px; height: 6px; }
.terminal-state { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: #697b93; font-size: 7px; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }
.terminal-state i { width: 4px; height: 4px; border-radius: 50%; background: #77bfa2; }
.code-scroll { max-height: 590px; overflow: auto; overscroll-behavior: contain; scrollbar-color: #35445d #0c111b; scrollbar-width: thin; }
.code-scroll pre[class*="language-"] { min-width: max-content; margin: 0; padding-top: 18px; padding-right: 22px; padding-bottom: 20px; background: transparent; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; line-height: 1.75; tab-size: 4; }
.code-scroll pre.line-numbers { padding-left: 4.2em; }
.code-scroll pre.raw-code { padding-left: 18px; color: #c8d3e4; white-space: pre; }
.code-scroll code { font-family: inherit; text-shadow: none; }
.code-scroll .line-numbers .line-numbers-rows { padding-top: 18px; border-right: 1px solid rgba(173,193,225,.09); }
.code-scroll .line-numbers-rows > span:before { color: #53627a; }
.code-window-footer { display: flex; justify-content: space-between; padding: 8px 13px; border-top: 1px solid rgba(173,193,225,.08); color: #65738a; background: rgba(17,25,39,.75); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .05em; }
.doc-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }
.pagination-button { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; color: #aebbd0; background: rgba(16,24,38,.52); text-align: left; cursor: pointer; }
.pagination-button:disabled { opacity: .4; cursor: not-allowed; }
.pagination-button span { color: #71819a; font-size: 8px; }
.pagination-button strong { max-width: 100%; overflow: hidden; color: #cbd7e9; font-size: 10px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.pagination-next { align-items: flex-end; text-align: right; }
.code-window.is-expanded { position: fixed; z-index: 100; inset: 18px; display: flex; flex-direction: column; border-color: rgba(141,174,232,.3); box-shadow: 0 0 0 100vmax rgba(2,5,10,.82), 0 20px 80px rgba(0,0,0,.6); }
.code-window.is-expanded .code-scroll { flex: 1; max-height: none; }
body.code-expanded { overflow: hidden; }
.docs-footer { margin-top: 57px; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 220px minmax(0,1fr); gap: 14px; }
  .code-actions { gap: 5px; }
  .tool-button { padding: 0 7px; }
}
@media (max-width: 700px) {
  .docs-main { padding-top: 32px; }
  .docs-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 21px; }
  .docs-layout { grid-template-columns: 1fr; }
  .doc-sidebar { order: 0; }
  .sidebar-details:not([open]) > summary { border-bottom: 0; }
  .doc-workspace { order: 1; }
  .doc-state { min-height: 270px; }
  .breadcrumb { margin-top: 4px; }
  .document-header { gap: 10px; }
  .document-header h2 { font-size: 24px; }
  .document-header p { font-size: 10px; }
  .bookmark-button { padding: 0 8px; font-size: 8px; }
  .document-meta { gap: 8px 13px; margin: 14px 0 19px; }
  .code-toolbar { align-items: flex-start; flex-direction: column; }
  .code-actions { width: 100%; flex-wrap: wrap; }
  .code-actions .tool-button { flex: 1 1 auto; }
  .code-actions .tool-button-copy { flex-grow: 1.3; }
  .code-scroll pre[class*="language-"] { font-size: 10px; }
  .code-window.is-expanded { inset: 8px; }
  .terminal-state { font-size: 6px; }
  .docs-footer { margin-top: 43px; }
}
.bookmark-block { margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); }

.share-panel { margin: 0 0 13px; padding: 15px; border: 1px solid rgba(133,160,202,.19); border-radius: 9px; background: rgba(15,23,37,.78); }
.share-panel[hidden] { display: none; }
.share-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.share-panel-heading strong { color: #d5dfef; font-size: 11px; font-weight: 650; }
.share-panel-heading p { margin: 4px 0 0; color: #7d8ba2; font-size: 9px; line-height: 1.6; }
.share-close { width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; color: #9baac0; background: rgba(255,255,255,.03); font-size: 17px; cursor: pointer; }
.share-label { display: block; margin: 12px 0 6px; color: #8190a8; font-size: 9px; font-weight: 650; }
.share-input-row { display: flex; gap: 7px; }
.share-input-row input, .share-panel textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; color: #aebbd0; background: #0b111c; font-family: ui-monospace, monospace; font-size: 9px; line-height: 1.6; }
.share-panel textarea { display: block; resize: vertical; }
.share-input-row .tool-button { flex: 0 0 auto; }
.share-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.share-panel-footer > span { color: #697891; font-size: 8px; }
@media (max-width: 700px) {
  .share-panel { padding: 12px; }
  .share-input-row { align-items: stretch; flex-direction: column; }
  .share-input-row .tool-button { min-height: 34px; }
  .share-panel-footer { align-items: flex-start; flex-direction: column; }
}
