/* Twipe — страница документации (/docs) */
.docs-body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.docs-body .lp-nav { margin: 0; padding: calc(10px + env(safe-area-inset-top)) max(20px, calc((100vw - 1240px) / 2)) 10px; background: color-mix(in srgb, var(--bg) 74%, transparent); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent); }
.docs-body .lp-links a.landing-top-link { display: inline-flex; align-items: center; text-decoration: none; }
.docs-body .lp-links a.is-active { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.docs-body .lp-login { display: inline-flex; align-items: center; text-decoration: none; }

.docs-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; width: min(1240px, 100%); margin: 0 auto; padding: 28px 20px 60px; box-sizing: border-box; }
.docs-side { position: sticky; top: 76px; align-self: start; max-height: calc(100dvh - 96px); overflow: auto; padding: 6px 4px 20px 0; scrollbar-width: thin; }
.docs-search { width: 100%; box-sizing: border-box; height: 40px; padding: 0 14px 0 36px; border-radius: 12px; border: 1px solid var(--rd-border, color-mix(in srgb, var(--text) 12%, transparent)); background: var(--rd-surface, var(--bg-elevated)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px 50%; color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.docs-search:focus { border-color: #3b82f6; box-shadow: 0 0 0 4px color-mix(in srgb, #3b82f6 18%, transparent); }
.docs-toc { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; }
.docs-toc-group { margin: 14px 0 4px; padding: 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.docs-toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .18s, color .18s; }
.docs-toc a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.docs-toc a.is-on { background: color-mix(in srgb, #3b82f6 14%, transparent); color: #3b82f6; font-weight: 650; }
[data-theme="dark"] .docs-toc a.is-on { color: #93c5fd; }
.docs-toc a i { font-style: normal; width: 20px; text-align: center; }
.docs-toc a.is-hidden { display: none; }

.docs-main { min-width: 0; }
.docs-hero { padding: 26px 30px; border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, #3b82f6 16%, var(--bg-elevated, var(--bg))), color-mix(in srgb, #8b5cf6 14%, var(--bg-elevated, var(--bg)))); border: 1px solid color-mix(in srgb, var(--text) 8%, transparent); margin-bottom: 18px; }
.docs-hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.1; }
.docs-hero p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 720px; }
.docs-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 18px; }
.docs-quick a { display: block; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); text-decoration: none; transition: transform .2s cubic-bezier(.2,.9,.3,1.3), box-shadow .2s; }
.docs-quick a:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -14px rgba(15, 23, 42, .4); }
.docs-quick b { display: block; font-size: 15px; margin-bottom: 3px; }
.docs-quick span { font-size: 13px; color: var(--muted); }
.docs-quick code { font-size: 12.5px; }

.docs-sec { padding: 26px 30px; margin-bottom: 14px; border-radius: 22px; background: var(--rd-surface, var(--bg-elevated)); border: 1px solid color-mix(in srgb, var(--text) 7%, transparent); scroll-margin-top: 80px; animation: docs-in .5s cubic-bezier(.2,.8,.2,1) both; }
.docs-sec.is-hidden { display: none; }
@keyframes docs-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.docs-sec h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 24px; letter-spacing: -.02em; }
.docs-sec h2 .docs-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px; background: linear-gradient(135deg, var(--c1, #3b82f6), var(--c2, #22d3ee)); box-shadow: 0 8px 20px -10px var(--c1, #3b82f6); }
.docs-sec h3 { margin: 22px 0 8px; font-size: 17px; letter-spacing: -.01em; }
.docs-sec p, .docs-sec li { font-size: 15px; line-height: 1.65; color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.docs-sec p { margin: 0 0 10px; }
.docs-sec ul, .docs-sec ol { margin: 0 0 10px; padding-left: 22px; }
.docs-sec li { margin: 3px 0; }
.docs-sec a { color: #3b82f6; }
.docs-sec code { padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 7%, transparent); font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 13px; }
.docs-sec pre { margin: 8px 0 14px; padding: 14px 16px; border-radius: 14px; background: #0f172a; color: #e2e8f0; overflow: auto; font-size: 13px; line-height: 1.6; }
.docs-sec pre code { padding: 0; background: none; color: inherit; }
.docs-note { display: flex; gap: 12px; padding: 12px 14px; margin: 12px 0; border-radius: 14px; background: color-mix(in srgb, #3b82f6 10%, transparent); border: 1px solid color-mix(in srgb, #3b82f6 22%, transparent); font-size: 14.5px; line-height: 1.55; }
.docs-note--warn { background: color-mix(in srgb, #f59e0b 11%, transparent); border-color: color-mix(in srgb, #f59e0b 28%, transparent); }
.docs-note--ok { background: color-mix(in srgb, #22c55e 10%, transparent); border-color: color-mix(in srgb, #22c55e 26%, transparent); }
.docs-note b:first-child { flex: none; }
.docs-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 14px; font-size: 14px; border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); border-radius: 14px; overflow: hidden; }
.docs-table th, .docs-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table th { background: color-mix(in srgb, var(--text) 4%, transparent); font-weight: 650; font-size: 13px; color: var(--muted); }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.docs-grid > div { padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--text) 8%, transparent); background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.docs-grid b { display: block; margin-bottom: 4px; }
.docs-grid span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.docs-kbd { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); border-bottom-width: 2px; font-size: 12.5px; font-family: inherit; text-align: center; }
.docs-ep { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 4px 10px; margin: 6px 0 12px; font-size: 14px; }
.docs-ep span.m { justify-self: start; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; font-family: ui-monospace, Consolas, monospace; }
.docs-ep .m-get { background: color-mix(in srgb, #22c55e 18%, transparent); color: #16a34a; }
.docs-ep .m-post { background: color-mix(in srgb, #3b82f6 18%, transparent); color: #2563eb; }
.docs-ep .m-put, .docs-ep .m-patch { background: color-mix(in srgb, #f59e0b 20%, transparent); color: #b45309; }
.docs-ep .m-del { background: color-mix(in srgb, #ef4444 18%, transparent); color: #dc2626; }
[data-theme="dark"] .docs-ep .m-get { color: #4ade80; } [data-theme="dark"] .docs-ep .m-post { color: #93c5fd; } [data-theme="dark"] .docs-ep .m-put, [data-theme="dark"] .docs-ep .m-patch { color: #fbbf24; } [data-theme="dark"] .docs-ep .m-del { color: #f87171; }
.docs-ep div { min-width: 0; overflow-wrap: anywhere; }
.docs-ep div small { color: var(--muted); }
.docs-faq details { border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.docs-faq summary { cursor: pointer; padding: 13px 0; font-weight: 650; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .25s; }
.docs-faq details[open] summary::after { transform: rotate(45deg); }
.docs-faq details p { padding-bottom: 8px; }
.docs-empty { display: none; padding: 40px; text-align: center; color: var(--muted); }
.docs-empty.is-on { display: block; }
.docs-foot { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; padding: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.docs-foot a { color: var(--muted); text-decoration: none; }
.docs-foot a:hover { color: var(--text); }
.docs-menu-btn { display: none; }

@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 0; padding-top: 14px; z-index: auto; }
  .docs-body .lp-nav { z-index: 25; }
  .docs-side { position: fixed; z-index: 20; align-self: stretch; top: calc(59px + env(safe-area-inset-top)); bottom: 0; left: 0; width: min(300px, 86vw); max-height: none; padding: 14px 14px 20px; background: var(--bg); box-shadow: 20px 0 60px -20px rgba(0,0,0,.4); transform: translateX(-105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
  .docs-body.docs-menu-open .docs-side { transform: none; }
  .docs-menu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); background: var(--rd-surface, var(--bg-elevated)); color: var(--text); font-size: 18px; cursor: pointer; position: relative; z-index: 30; }
  .docs-scrim { position: fixed; inset: 0; z-index: 15; background: rgba(2, 6, 23, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .docs-body.docs-menu-open .docs-scrim { opacity: 1; pointer-events: auto; }
  .docs-sec, .docs-hero { padding: 20px 18px; border-radius: 18px; }
  .docs-ep { grid-template-columns: 64px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .docs-sec { animation: none; } }
