:root {
  color-scheme: dark;
  --bg: #06051d;
  --surface: #1d293d;
  --surface-2: #0f1c36;
  --hover: #314062;
  --ink: #ffffff;
  --text: #cad5e2;
  --muted: #8b9ab1;
  --line: rgba(229, 231, 235, .12);
  --line-soft: rgba(229, 231, 235, .12);
  --line-strong: rgba(229, 231, 235, .22);
  --blue: #63b3ed;
  --amber: #f0b100;
  --green: #00bc7d;
  --red: #ff2056;
  --field-text: #ebf8ff;
  --g-bg: rgba(0, 79, 59, .55);
  --g-bg-h: rgba(0, 110, 82, .65);
  --a-bg: rgba(115, 62, 10, .6);
  --a-bg-h: rgba(150, 82, 14, .7);
  --r-bg: rgba(139, 8, 54, .55);
  --r-bg-h: rgba(175, 12, 68, .65);
  --spec-line: rgba(255, 255, 255, .10);
  --st-ok: #00bc7d;
  --st-wait: #f0b100;
  --st-err: #ff2056;
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-base: 16px;
  --fs-small: 14px;
  --fs-h1: 30px;
  --lh: 1.5;
  --u: 8px;
  --gut: 24px;
  --maxw: 1100px;
  --prose: 800px;
  --r: 8px;
  --pill: 9999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #06051d; }
body {
  margin: 0; color: var(--text);
  background-color: #06051d;
  background-image: linear-gradient(0deg, #06051d 30%, #061434);
  background-attachment: fixed;
  font: 400 var(--fs-base)/var(--lh) var(--font);
  min-height: 100vh; overflow-wrap: anywhere;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 400; line-height: 1.25; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: 20px; line-height: 1.3; }
h3 { font-size: var(--fs-base); }
b, strong { font-weight: 500; }
p { margin: 0 0 12px; }
a { color: var(--blue); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--font); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .93em; color: var(--text); }
pre { margin: 0; white-space: pre-wrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--hover); color: #fff; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--blue); padding: var(--u); z-index: 100; border-radius: var(--r); }
.skip:focus { left: 8px; top: 8px; }
.boot { padding: var(--gut); color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); line-height: 1.63; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top .wrap { display: flex; align-items: stretch; gap: 24px; min-height: 56px; }
.logo { display: flex; align-items: center; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--amber); }
.tabs { display: flex; align-items: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; padding: 0 14px; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.who { display: flex; align-items: center; gap: 12px; font-size: var(--fs-small); white-space: nowrap; }
.who .bal { color: var(--ink); text-decoration: none; }
.who .bal:hover { color: var(--blue); }
.linkbtn {
  font: 400 14px/1 var(--font); color: #fff1f2; cursor: pointer;
  background: var(--r-bg); border: 1px solid var(--spec-line); border-radius: var(--pill); padding: 8px 20px;
  box-shadow: rgba(0, 0, 0, .1) 0 4px 6px -1px;
}
.linkbtn:hover { background: var(--r-bg-h); }
.maint { background: var(--a-bg); color: #fefce8; border-bottom: 1px solid var(--line); padding: var(--u) 0; font-size: 14px; }
.maint .wrap { display: block; }

main { padding: 48px 0 80px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gut); flex-wrap: wrap; margin-bottom: 24px; }
.page-h p { margin: var(--u) 0 0; color: var(--muted); }
.foot { border-top: 1px solid var(--line); padding: 24px 0; font-size: var(--fs-small); color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- buttons / fields ---------- */
.btn, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--u);
  font: 400 14px/1.5 var(--font); padding: 8px 20px; min-height: 40px;
  border: 1px solid var(--spec-line); border-radius: var(--pill); cursor: pointer; text-decoration: none;
  background: var(--g-bg); color: #d1fae5;
  box-shadow: rgba(0, 0, 0, .1) 0 4px 6px -1px;
}
.btn:hover { background: var(--g-bg-h); text-decoration: none; }
.btn.t-g { background: var(--g-bg); color: #d1fae5; }
.btn.t-g:hover { background: var(--g-bg-h); }
.btn.t-a { background: var(--a-bg); color: #fefce8; }
.btn.t-a:hover { background: var(--a-bg-h); }
.btn.t-r { background: var(--r-bg); color: #fff1f2; }
.btn.t-r:hover { background: var(--r-bg-h); }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--text); box-shadow: none; }
.btn-line:hover { background: var(--hover); text-decoration: none; }
.btn[disabled], .btn-line[disabled] { opacity: .4; cursor: not-allowed; }
.btn-sm { padding: 4px 14px; min-height: 32px; font-size: 13px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.field { display: block; margin-bottom: 16px; }
.field > .lbl { display: block; font-size: var(--fs-small); color: var(--text); margin-bottom: 4px; }
.field .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], textarea, select {
  width: 100%; font: 400 var(--fs-base)/1.4 var(--font); color: var(--field-text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-height: 42px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; }
textarea { min-height: 104px; resize: vertical; font-size: 13px; }
input[type=file] { font: inherit; font-size: 13px; max-width: 100%; color: var(--text); }
input[type=file]::file-selector-button { font: 400 13px var(--font); color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 4px 14px; margin-right: 12px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; }
.check { display: flex; align-items: flex-start; gap: 0; margin-bottom: var(--u); cursor: pointer; }
.check input { margin-top: 4px; flex: none; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gut); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--pill); overflow: hidden; background: var(--surface-2); }
.seg label { padding: 8px 20px; cursor: pointer; font-size: 14px; color: var(--text); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--g-bg); color: #d1fae5; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: var(--pill); }
.seg label:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.err { color: var(--red); font-size: 14px; margin: var(--u) 0 0; }
.okline { color: var(--green); font-size: 14px; margin: var(--u) 0 0; }
.note { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 12px 16px; margin: 0 0 16px; font-size: 14px; line-height: 1.63; }
.note.warn { border-color: rgba(240, 177, 0, .35); background: rgba(115, 62, 10, .3); color: #fefce8; }
.note.bad { border-color: rgba(255, 32, 86, .4); background: rgba(139, 8, 54, .3); color: #fff1f2; }

/* ---------- pills (status) ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: var(--pill); padding: 2px 14px 2px 10px; font-size: 13px; line-height: 1.6; white-space: nowrap; border: 1px solid var(--spec-line); background: rgba(229, 231, 235, .08); color: var(--text); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: var(--pill); background: currentColor; }
.pill.ok { background: var(--g-bg); color: var(--green); }
.pill.wait, .pill.auto { background: var(--a-bg); color: var(--amber); }
.pill.err { background: var(--r-bg); color: var(--red); }
.pill.idle { background: rgba(229, 231, 235, .08); color: var(--muted); }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: var(--pill); padding: 0 10px; font-size: 12px; color: var(--muted); }

/* ---------- tables ---------- */
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; line-height: 1.63; }
table.grid thead th { font-size: 12px; font-weight: 400; color: var(--muted); background: rgba(15, 28, 54, .55); }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover { background: var(--hover); }
table.grid tr.off td { color: var(--muted); }
table.grid td.k { color: var(--muted); width: 1%; white-space: nowrap; }
table.grid tr.sel td { background: var(--hover); }
table.grid b { font-weight: 400; color: var(--ink); }
.copy-cell code { background: none; padding: 0; word-break: break-all; }
.dl { width: 100%; border-collapse: collapse; }
.dl th, .dl td { text-align: left; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.dl th { color: var(--muted); font-weight: 400; width: 1%; white-space: nowrap; }
.dl tr:last-child th, .dl tr:last-child td { border-bottom: 0; }

/* ---------- chain ---------- */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; padding: 4px 0; font-size: 14px; }
.chain .n { padding: 4px 16px; border: 1px solid var(--line-strong); border-radius: var(--pill); color: var(--text); background: rgba(15, 28, 54, .6); }
.chain .a { color: var(--muted); padding: 0 8px; user-select: none; }
.chain .n.on { background: var(--a-bg); color: #fefce8; border-color: rgba(240, 177, 0, .45); animation: pulse 2.4s ease-in-out infinite; }
.chain .n.done { background: var(--g-bg); color: #d1fae5; border-color: rgba(0, 188, 125, .4); }
.chain.big { font-size: clamp(12px, 2.2vw, 18px); margin-bottom: 24px; }
.chain.big .n { padding: 8px 20px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .chain .n.on { animation: none; } }

/* ---------- landing ---------- */
.l-head { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 30; }
.l-head .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
#view:focus { outline: none; }
.landing-main, main#view:has(.hero) { padding: 0 0 80px; }

.hero { position: relative; overflow: hidden; height: min(78vh, 720px); min-height: 520px; display: flex; align-items: center; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-in { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.hero h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.25; max-width: 15ch; text-wrap: balance; }
.hero .sub { max-width: 44ch; margin: 24px 0 0; color: var(--text); }
.hero .sub.dim { margin-top: 8px; color: var(--muted); font-size: var(--fs-small); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 1099px) {
  .hero { display: block; height: auto; min-height: 0; padding-bottom: 8px; }
  .hero canvas { position: relative; inset: auto; height: 340px; }
  .hero-in { padding-bottom: 24px; }
  .hero .sub { max-width: 60ch; }
}

.lwrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.lsec { max-width: var(--prose); margin: 64px auto 0; }
.lsec.wide { max-width: var(--maxw); }
.lsec.login-sec { margin-top: 32px; }
.lsec h2 { margin-bottom: 24px; display: flex; gap: 12px; align-items: baseline; font-size: 20px; }
.lsec h2 .ix { color: var(--amber); font-size: 18px; }
#page h2::before { content: "▸"; color: var(--amber); margin-right: 10px; font-size: 18px; }
.sec h2::before { margin-right: 0; }
.login { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px 24px; }
.login:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.login .tgbox { min-height: 40px; display: flex; align-items: center; }
.login p { margin: 0; font-size: var(--fs-small); color: var(--muted); line-height: 1.63; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps3 > div { padding-top: 16px; border-top: 1px solid var(--line-strong); }
.steps3 b { display: block; font-size: 30px; font-weight: 400; color: var(--amber); line-height: 1.2; margin-bottom: 8px; }
.reqs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.reqs li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.reqs li::before { content: "◇"; color: var(--amber); margin-right: 12px; }
.demo-h { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.console.demo { height: 400px; margin-top: 0; overflow: hidden; }
.console.demo .ln { white-space: normal; }
.statsbar { width: 100%; border-collapse: collapse; }
.statsbar td { width: 33.33%; padding: 16px 24px 16px 0; vertical-align: top; border-top: 1px solid var(--line-strong); }
.statsbar b { display: block; font-size: 40px; font-weight: 400; color: var(--ink); line-height: 1.2; }
.statsbar span { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); }
.plan { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 24px; }
.plan h3 { font-size: 20px; margin-bottom: 12px; }
.plan ul { margin: 0; padding-left: 18px; }
.plan li { margin-bottom: 4px; }
.plan-one { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px 20px; margin: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "▸"; display: inline-block; width: 1.8em; color: var(--amber); }
.faq details[open] > summary::before { content: "▾"; }
.faq summary:hover { color: var(--blue); }
.faq details > p { margin: 0; padding: 0 0 16px 1.8em; }
.final-t { font-size: 30px; line-height: 1.25; color: var(--ink); margin-bottom: 12px; }
.final-in .btns { gap: 24px; margin-top: 16px; }
.lfoot { margin-top: 64px; }
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .statsbar td { padding: 12px 8px 12px 0; }
  .statsbar b { font-size: 30px; }
  .statsbar span { font-size: 12px; }
  .final-t { font-size: 24px; }
}

/* ---------- wizard ---------- */
.sec { display: grid; grid-template-columns: 72px 1fr; border-top: 1px solid var(--line); padding: 24px 0 32px; }
.sec:last-of-type { border-bottom: 1px solid var(--line); }
.sec > .no { font-size: 30px; line-height: 1.25; color: var(--muted); }
.sec.done > .no { color: var(--green); }
.sec h2 { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.sec .body { max-width: 760px; min-width: 0; }
.sec .body.wide { max-width: none; }
.sum { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.price { color: var(--ink); }

/* ---------- node page ---------- */
.stepper { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 16px; overflow: hidden; }
.stepper span { padding: 8px 16px; font-size: 13px; color: var(--muted); }
.stepper span.cur { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.stepper span.past { color: var(--text); }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 16px 24px; margin: 24px 0; }
.panel h3 { margin-bottom: var(--u); font-size: 18px; }
.vis { display: block; }
.console { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); font-size: 13px; line-height: 1.6; height: 380px; overflow: auto; padding: 12px 16px; margin-top: var(--u); }
.console .ln { white-space: pre-wrap; display: block; }
.console .t { color: var(--muted); }
.console .ln.done { color: var(--green); }
.console .ln.error { color: var(--red); }
.console .ln.warn, .console .ln.wait { color: var(--amber); }
.console .cur { animation: blink 1.1s steps(2, start) infinite; color: var(--text); }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .console .cur { animation: none; } }
.danger { margin-top: 40px; border: 1px solid rgba(255, 32, 86, .35); border-radius: var(--r); background: var(--surface); padding: 16px 24px; }
.danger h3 { color: var(--red); margin-bottom: var(--u); }
.kv { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.big-num { font-size: clamp(30px, 6vw, 40px); color: var(--ink); line-height: 1.2; }

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); padding: 0; max-width: min(520px, calc(100vw - 32px)); width: 100%; font: inherit; }
dialog::backdrop { background: rgba(6, 5, 29, .75); }
dialog .dh { padding: 16px 20px; border-bottom: 1px solid var(--line); }
dialog .db { padding: 16px 20px; }
dialog .df { padding: 12px 20px 20px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  :root { --gut: 16px; --fs-h1: 26px; }
  .top .wrap { flex-wrap: wrap; gap: 0 var(--u); }
  .logo { min-height: 48px; }
  .who { margin-left: auto; min-height: 48px; }
  .tabs { order: 3; flex: 1 0 100%; border-top: 1px solid var(--line); }
  .tabs a { min-height: 44px; }
  main { padding-top: 24px; }
  .lsec { margin-top: 48px; }
  .login { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .steps3 { grid-template-columns: 1fr; gap: 16px; }
  .sec { grid-template-columns: 1fr; gap: var(--u); }
  .cols { grid-template-columns: 1fr; }
  table.grid.stack thead { display: none; }
  table.grid.stack, table.grid.stack tbody, table.grid.stack tr, table.grid.stack td { display: block; width: 100%; }
  table.grid.stack tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.grid.stack tbody tr:last-child { border-bottom: 0; }
  table.grid.stack td { border: 0; padding: 4px 16px; display: flex; gap: 12px; }
  table.grid.stack td::before { content: attr(data-l); flex: 0 0 84px; color: var(--muted); font-size: 12px; padding-top: 2px; }
  table.grid.stack td > * { min-width: 0; }
  .dl th { white-space: normal; width: 38%; }
  .panel, .danger { padding: 16px; }
  .console { height: 320px; padding: 8px 12px; }
  .console.demo { height: 280px; }
  .chain { font-size: 12px; }
  .chain .n { padding: 2px 10px; }
  .chain.big .n { padding: 4px 12px; }
  .chain .a { padding: 0 3px; }
  .page-h { align-items: flex-start; }
  .hero canvas { height: 300px; }
  .hero-cta { margin-top: 24px; }
}
@media (max-width: 400px) {
  .who .who-name { display: none; }
}
.copy-cell .btn-sm { white-space: nowrap; flex: none; }
@media (max-width: 760px) {
  td.copy-cell { flex-wrap: wrap; }
  td.copy-cell code { flex: 1 1 100%; }
}
.acc-row:hover { background: var(--hover); }

/* заголовок hero: переносим только между предложениями */
.nw{white-space:nowrap;display:inline-block}
