/* Парсек — сайт, документация, статус */
:root {
  --bg: #0a0e13;
  --bg-2: #0e141b;
  --panel: #121a23;
  --panel-2: #17212c;
  --line: #1e2934;
  --line-2: #2a3846;
  --text: #e6edf3;
  --text-2: #a9b6c3;
  --muted: #6f7f8f;
  --accent: #3ddc97;
  --accent-2: #2bb67c;
  --accent-ink: #03140c;
  --accent-soft: rgba(61, 220, 151, .12);
  --blue: #7aa2ff;
  --warn: #f5b84c;
  --err: #ff6b6b;
  --r: 16px;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
code, pre, .mono { font-family: var(--mono); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s; }
.btn:hover { border-color: #3b4c5d; background: var(--panel-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #5be6aa; border-color: #5be6aa; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(10, 14, 19, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.logo-mark { width: 28px; height: 28px; position: relative; }
.logo-mark::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 50%; transform: scaleY(.42) rotate(-22deg); }
.logo-mark::after { content: ""; position: absolute; left: 9px; top: 9px; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 14px rgba(61, 220, 151, .7); }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--text-2); font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--text); }
.header-right { margin-left: auto; display: flex; gap: 10px; }
@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 520px) { .header-right .btn:not(.btn-accent) { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(122, 162, 255, .16) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse 60% 70% at 70% 30%, #000, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 30%, #000, transparent 75%); pointer-events: none; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; position: relative; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--mono); color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(61, 220, 151, .25); padding: 5px 12px; border-radius: 99px; }
h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -.03em; margin: 20px 0 18px; font-weight: 700; }
h1 .arrow { color: var(--accent); font-family: var(--mono); font-weight: 500; }
.lead { font-size: 19px; color: var(--text-2); margin: 0 0 28px; max-width: 540px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 34px; font-size: 14px; color: var(--muted); }
.facts b { display: block; font: 600 22px var(--mono); color: var(--text); }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---------- Окно кода ---------- */
.code-win { background: #0c1218; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.code-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #0f161d; }
.code-tabs .dots { display: flex; gap: 6px; margin-right: 12px; }
.code-tabs .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a3846; }
.code-tabs button { background: none; border: 0; color: var(--muted); font: 500 13px var(--mono); padding: 5px 10px; border-radius: 6px; }
.code-tabs button.active { color: var(--text); background: var(--panel-2); }
.code-tabs .copy { margin-left: auto; }
pre.code { margin: 0; padding: 16px 18px; font-size: 13px; line-height: 1.6; overflow-x: auto; color: #cdd9e5; white-space: pre; }
pre.code.tall { max-height: 360px; }
.tk-key { color: #7aa2ff; }
.tk-str { color: #a5e8c8; }
.tk-num { color: #f5b84c; }
.tk-bool { color: #ff9dd1; }
.tk-com { color: #5c6d7e; font-style: italic; }
.tk-kw { color: #c59bff; }
.tk-flag { color: #f5b84c; }
.resp-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0f161d; font: 12px var(--mono); color: var(--muted); }
.resp-head b { color: var(--accent); font-weight: 600; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.head { max-width: 760px; margin-bottom: 44px; }
.eyebrow { font: 500 13px var(--mono); color: var(--accent); letter-spacing: .02em; display: block; margin-bottom: 12px; }
h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 14px; }
.head p { color: var(--text-2); font-size: 18px; margin: 0; }
@media (max-width: 640px) { .section { padding: 64px 0; } }

.docs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.doc-type { background: var(--bg-2); padding: 22px; }
.doc-type b { display: block; font-size: 17px; margin-bottom: 4px; }
.doc-type span { font: 13px var(--mono); color: var(--muted); }
.doc-type .tag { display: inline-block; margin-top: 10px; font: 12px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.doc-type .tag.beta { background: rgba(245, 184, 76, .12); color: var(--warn); }
@media (max-width: 900px) { .docs-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Живой разбор ---------- */
.live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.live-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.live-tabs button { background: var(--panel); border: 1px solid var(--line-2); color: var(--text-2); border-radius: 8px; padding: 8px 14px; font-weight: 500; }
.live-tabs button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.doc-stage { background: repeating-linear-gradient(45deg, #0e141b 0 12px, #10171f 12px 24px); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; position: relative; min-height: 420px; }
.scanline { position: absolute; left: 26px; right: 26px; height: 2px; background: var(--accent); box-shadow: 0 0 20px 4px rgba(61, 220, 151, .5); top: 26px; opacity: 0; pointer-events: none; }
.scanline.run { animation: scan 1.4s ease-in-out; }
@keyframes scan { 0% { top: 26px; opacity: 1; } 100% { top: calc(100% - 28px); opacity: 0; } }
.json-panel { background: #0c1218; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.json-panel pre { max-height: 520px; }
.json-panel .jf { cursor: pointer; border-radius: 3px; }
.json-panel .jf:hover, .json-panel .jf.hl { background: rgba(61, 220, 151, .16); }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
@media (max-width: 980px) { .live { grid-template-columns: 1fr; } }

/* ---------- Конвейер ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: p; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; }
.stage::before { counter-increment: p; content: "0" counter(p); font: 500 12px var(--mono); color: var(--accent); }
.stage b { display: block; margin: 6px 0 4px; }
.stage p { margin: 0; font-size: 14px; color: var(--text-2); }
.stage small { display: block; margin-top: 10px; font: 12px var(--mono); color: var(--muted); }
@media (max-width: 1000px) { .pipeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; color: var(--text-2); }
.checklist li b { color: var(--text); display: block; }
.checklist .st { font: 600 12px var(--mono); padding: 2px 8px; border-radius: 6px; align-self: flex-start; white-space: nowrap; }
.st.ok { background: var(--accent-soft); color: var(--accent); }
.st.warn { background: rgba(245, 184, 76, .12); color: var(--warn); }
.st.skip { background: #1d2733; color: var(--muted); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.case { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.case h3 { margin: 0 0 8px; font-size: 18px; }
.case p { margin: 0; color: var(--text-2); font-size: 15px; }
.case .metric { margin-top: 14px; font: 600 14px var(--mono); color: var(--accent); }
@media (max-width: 1000px) { .cases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cases { grid-template-columns: 1fr; } }

/* ---------- Цены ---------- */
.calc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 18px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.calc label { display: block; color: var(--text-2); margin-bottom: 8px; }
.calc b { font: 600 22px var(--mono); color: var(--text); }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.calc .best { text-align: right; }
.calc .best span { display: block; font-size: 13px; color: var(--muted); }
.calc .best strong { font: 600 28px var(--mono); color: var(--accent); }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; }
.plan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px rgba(61, 220, 151, .08); }
.plan h3 { margin: 0; font-size: 19px; }
.plan .for { font-size: 14px; color: var(--muted); margin: 4px 0 16px; min-height: 44px; }
.plan .price { font: 600 32px var(--mono); letter-spacing: -.02em; }
.plan .price small { font: 14px var(--font); color: var(--muted); }
.plan .est { font: 13px var(--mono); color: var(--accent); margin: 6px 0 16px; min-height: 20px; }
.plan ul { list-style: none; margin: 0 0 20px; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
.plan li::before { content: "→ "; color: var(--accent); font-family: var(--mono); }
.plan .btn { margin-top: auto; white-space: normal; height: auto; min-height: 44px; padding: 8px 14px; text-align: center; }
.note { font-size: 14px; color: var(--muted); margin-top: 16px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } .calc { grid-template-columns: 1fr; } .calc .best { text-align: left; } }

.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sec-item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.sec-item .i { color: var(--accent); width: 24px; height: 24px; margin-bottom: 12px; }
.sec-item h3 { margin: 0 0 6px; font-size: 17px; }
.sec-item p { margin: 0; color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }

.faq { display: grid; gap: 8px; max-width: 880px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 24px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 20px var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 16px; color: var(--text-2); }

.final { border: 1px solid var(--line-2); border-radius: 22px; padding: clamp(28px, 5vw, 56px); background: radial-gradient(600px 300px at 90% 0%, rgba(61, 220, 151, .14), transparent 60%), var(--panel); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.final pre { background: #0c1218; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 900px) { .final { grid-template-columns: 1fr; } }

.footer { border-top: 1px solid var(--line); padding: 48px 0 36px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { color: var(--text); margin: 0 0 12px; font-size: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; display: grid; gap: 6px; font-size: 13px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; opacity: 0; transition: .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Документация ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 28px; padding-bottom: 80px; }
.docs-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
.docs-nav h5 { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 6px; }
.docs-nav a { display: block; padding: 5px 10px; border-radius: 6px; text-decoration: none; color: var(--text-2); border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--text); }
.docs-nav a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.docs-nav .m { font: 600 10px var(--mono); padding: 1px 5px; border-radius: 4px; margin-right: 6px; }
.m.post { background: rgba(61, 220, 151, .15); color: var(--accent); }
.m.get { background: rgba(122, 162, 255, .15); color: var(--blue); }
.m.del { background: rgba(255, 107, 107, .15); color: var(--err); }
.doc-body { min-width: 0; max-width: 860px; }
.doc-body section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.doc-body h1 { font-size: 40px; margin: 0 0 12px; }
.doc-body h2 { font-size: 28px; margin: 0 0 12px; }
.doc-body h3 { font-size: 18px; margin: 26px 0 10px; }
.doc-body p, .doc-body li { color: var(--text-2); }
.doc-body code:not(pre code) { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 13.5px; color: var(--text); }
.endpoint { display: flex; align-items: center; gap: 10px; font: 14px var(--mono); background: var(--panel); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; margin: 8px 0 16px; overflow-x: auto; white-space: nowrap; }
.endpoint .m { font-size: 12px; padding: 2px 8px; }
.params { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 18px; }
.params th, .params td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.params th { font-size: 12px; color: var(--muted); font-weight: 500; font-family: var(--mono); }
.params td:first-child { font-family: var(--mono); color: var(--text); white-space: nowrap; }
.params .type { font: 12px var(--mono); color: var(--muted); display: block; }
.params .req { font: 11px var(--mono); color: var(--warn); }
.callout { border-left: 3px solid var(--blue); background: rgba(122, 162, 255, .08); padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: 15px; color: var(--text-2); margin: 14px 0; }
.callout.warn { border-color: var(--warn); background: rgba(245, 184, 76, .08); }
.table-wrap { overflow-x: auto; }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; } .docs-nav { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 12px; } }

/* ---------- Статус ---------- */
.status-hero { padding: 48px 0 24px; }
.status-banner { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 14px; background: rgba(61, 220, 151, .1); border: 1px solid rgba(61, 220, 151, .35); font-size: 18px; font-weight: 600; }
.status-banner .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(61, 220, 151, .2); }
.component { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 10px; }
.component-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.component-h span { font: 13px var(--mono); color: var(--accent); }
.bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 34px; }
.bars i { border-radius: 2px; background: var(--accent); opacity: .85; }
.bars i.minor { background: var(--warn); }
.bars i.major { background: var(--err); }
.bars-legend { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); margin-top: 6px; }
.incident { border-left: 2px solid var(--line-2); padding: 0 0 22px 18px; position: relative; }
.incident::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); }
.incident h4 { margin: 0 0 4px; }
.incident time { font: 12px var(--mono); color: var(--muted); }
.incident p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
