/* Документация PNC — тот же язык, что у сайта: графит, оранжевый акцент,
   крупные скругления, стекло на шапке. Тёмная тема по умолчанию, светлая —
   по настройке системы. */
:root {
  --bg: #000; --surface: #161618; --surface2: #1f1f22; --text: #f5f5f7; --sub: #98989f;
  --line: rgba(255,255,255,.08); --accent: #ff7a45; --api: #8e6cf0; --code: #0e0e11; --codetext: #e6e6ea;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f2f2f7; --surface: #fff; --surface2: #f6f6f8; --text: #111113; --sub: #6e6e73;
          --line: #e5e5ea; --code: #0e0e11; --codetext: #e6e6ea; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15.5px/1.65 Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: radial-gradient(900px 600px at 95% -10%, rgba(255,122,69,.14), transparent 60%),
                    radial-gradient(800px 600px at -10% 110%, rgba(142,108,240,.12), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  position: sticky; top: 0; z-index: 5; height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand em { font-style: normal; font-weight: 500; color: var(--sub); }
.toplinks { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.toplinks a { color: var(--sub); }
.btn { background: var(--text); color: var(--bg) !important; padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.btn:hover { text-decoration: none; opacity: .9; }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; max-width: 1120px; margin: 0 auto; padding: 32px 24px 80px; }
.side nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.side p { margin: 16px 0 6px 12px; font-size: 12px; font-weight: 600; color: var(--sub); }
.side p:first-child { margin-top: 0; }
.side a { color: var(--text); opacity: .8; font-size: 14px; padding: 7px 12px; border-radius: 10px; }
.side a:hover { background: var(--surface); opacity: 1; text-decoration: none; }
.side a.on { background: var(--surface); opacity: 1; font-weight: 600; }

main { min-width: 0; max-width: 780px; }
section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.8px; margin: 0 0 12px; font-weight: 900; }
h2 { font-size: 26px; letter-spacing: -.4px; margin: 0 0 12px; font-weight: 800; }
.lead { font-size: 17px; color: var(--sub); margin: 0 0 22px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
code { font: 13.5px/1.5 "JetBrains Mono", ui-monospace, Consolas, monospace; background: var(--surface2); padding: 2px 6px; border-radius: 6px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.facts span { font-size: 12.5px; color: var(--sub); }
.facts code { background: none; padding: 0; font-size: 13.5px; overflow-wrap: anywhere; }
code.copy { cursor: pointer; }
code.copy:hover { color: var(--accent); }

pre { position: relative; margin: 0 0 16px; background: var(--code); color: var(--codetext); border: 1px solid rgba(255,255,255,.08);
      border-radius: 18px; padding: 16px 18px; overflow-x: auto; }
pre code { background: none; padding: 0; color: inherit; font-size: 13.5px; }
.cp { position: absolute; top: 10px; right: 10px; border: 0; cursor: pointer; font: 600 12px Inter, sans-serif;
      color: #c7c7cc; background: rgba(255,255,255,.08); padding: 5px 10px; border-radius: 999px; opacity: 0; transition: opacity .15s; }
pre:hover .cp, .cp.done { opacity: 1; }
.cp.done { color: #34c759; }

.tabs { margin-bottom: 16px; }
.tabbar { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 10px; }
.tabbar button { border: 0; background: none; color: var(--sub); font: 600 13.5px Inter, sans-serif; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.tabbar button.on { background: var(--text); color: var(--bg); }
.tabs pre { display: none; }
.tabs pre.on { display: block; }

.steps li::marker { color: var(--accent); font-weight: 800; }
.endpoint { font-size: 15px; }
.endpoint b { color: #fff; background: var(--api); padding: 3px 9px; border-radius: 7px; font-size: 12.5px; margin-right: 6px; }

.table { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--sub); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--sub); font-size: 12px; margin-top: 3px; }
td i { font-style: normal; font-size: 11px; color: var(--accent); margin-left: 4px; }
.params td:first-child { white-space: nowrap; }

footer { color: var(--sub); font-size: 13px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding-top: 20px; }
  .side { display: none; }
  h1 { font-size: 32px; }
  .facts { grid-template-columns: 1fr; }
  .toplinks a:not(.btn) { display: none; }
}
