/* Velisity - база: сброс, типографика, поверхности, элементы. Только токены из tokens.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background:
    radial-gradient(900px 520px at 85% -8%, rgba(140, 159, 244, .085), transparent 62%),
    radial-gradient(700px 420px at -8% 38%, rgba(183, 190, 220, .035), transparent 60%),
    var(--bg);
  color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; font-weight: 400; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
code { font-family: var(--mono); font-size: .88em; }
::selection { background: rgba(183, 190, 220, .28); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #2c2c31 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26262b; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid rgba(183, 190, 220, .55); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--r-s); background: var(--btn); color: #101010; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

.mono { font-family: var(--mono); }
.lav { color: var(--lav); }
.lime { color: var(--lime); }
.t2 { color: var(--text2); }
.t3 { color: var(--text3); }
.t4 { color: var(--text4); }
.ok-c { color: var(--green2); }
.err-c { color: var(--red); }
.warn-c { color: var(--yellow); }
.hidden { display: none !important; }
.ic { width: 24px; height: 24px; flex: none; }
.ic-s { width: 17px; height: 17px; flex: none; }
.ic-xs { width: 15px; height: 15px; flex: none; }
.wrap { width: 100%; padding-left: var(--pad); padding-right: var(--pad); }
.bt { border-top: 1px solid var(--line); }
.bb { border-bottom: 1px solid var(--line); }
.cap-mono { font-family: var(--mono); font-size: 11px; color: var(--text3); letter-spacing: .02em; }
.kick { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--lav);
  padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid rgba(183, 190, 220, .22); background: rgba(183, 190, 220, .06); width: fit-content; }
.kick svg { width: 15px; height: 15px; }

/* ---------- типографика секций ---------- */
.h-hero { font-size: 70px; line-height: 1.06; font-weight: 500; letter-spacing: -.01em; }
.h-page { font-size: 72px; line-height: 1.08; font-weight: 500; letter-spacing: -.01em; text-align: center; }
.h-sec { font-size: 54px; line-height: 1.12; text-align: center; }
.h-40 { font-size: 40px; line-height: 1.15; font-weight: 500; }
.lead { font-size: 20px; line-height: 1.5; color: var(--text2); }
.page-head { padding: 72px 120px 64px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.page-head .lead { max-width: 960px; }
section { position: relative; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 28px; height: 52px; padding: 0 22px; border-radius: var(--r-s);
  background: var(--btn); border: 1px solid var(--btn); color: #101010; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .2s, transform .1s, filter .15s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 28px -12px rgba(183, 190, 220, .45); }
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn .ic-arrow { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover .ic-arrow { transform: translateX(3px); }
.btn-dark { background: rgba(255, 255, 255, .035); border-color: var(--bd); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.btn-dark:hover { background: rgba(255, 255, 255, .07); border-color: var(--bd2); }
.btn-grad { background: linear-gradient(83deg, #fff 0%, var(--lav) 100%); border: 0; }
.btn-sm { height: 40px; font-size: 13px; padding: 0 14px; gap: 14px; }
.btn-full { width: 100%; }
.btn[disabled], .btn.loading { opacity: .5; pointer-events: none; }
.link-s { font-size: 12px; color: var(--lav); }
.link-s:hover { text-decoration: underline; }
.link-arr { display: inline-flex; gap: 6px; align-items: center; }
.link-arr:hover { color: var(--lav); }

/* ---------- шапка ---------- */
.hdr { position: sticky; top: 0; z-index: 30; height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(8, 8, 8, .66); backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.hdr.scrolled { border-bottom-color: var(--bd); background: rgba(8, 8, 8, .82); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mk { width: 28px; height: 28px; color: var(--text); }
.brand b { font-weight: 400; font-size: 21px; }
.brand small { font-family: var(--mono); font-size: 11px; color: var(--text2); }
.pillnav { display: flex; gap: 4px; padding: 7px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .03); border: 1px solid var(--bd); }
.pillnav a { padding: 10px 16px; border-radius: var(--r-pill); font-size: 14px; color: var(--text2); transition: color .15s, background .15s; }
.pillnav a:hover { color: var(--text); }
.pillnav a.on { background: rgba(255, 255, 255, .09); color: var(--text); }
.hdr-r { display: flex; align-items: center; gap: 20px; font-family: var(--mono); font-size: 16px; }
.hdr-r a:hover { color: var(--lav); }
.hdr-r .hdr-cta { background: var(--btn); color: #101010; padding: 10px 16px; border-radius: var(--r-s); font-size: 14px; }
.burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text); }
.burger .b-close { display: none; }
.burger[aria-expanded="true"] .b-open { display: none; }
.burger[aria-expanded="true"] .b-close { display: block; }

/* ---------- футер ---------- */
.ftr { border-top: 1px solid var(--line); padding-top: 64px; padding-bottom: 28px; }
.ftr-in { display: flex; justify-content: space-between; gap: 40px; }
.ftr-about { width: 465px; display: flex; flex-direction: column; gap: 24px; }
.ftr-about p { color: var(--text2); font-size: 15px; line-height: 1.65; }
.ftr-col { display: flex; flex-direction: column; gap: 16px; font-size: 14px; }
.ftr-col .cap { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.ftr-col a { color: var(--text2); }
.ftr-col a:hover, .ftr-col a.on { color: var(--text); }
.ftr-legal { display: flex; gap: 24px; margin-top: 48px; font-size: 12px; color: var(--text3); }
.ftr-legal a:hover { color: var(--text); }

/* ---------- поверхности ---------- */
.card, .panel, .metric, .form-card, .bal-card, .term, .pipe { border: 1px solid var(--bd); border-radius: var(--r); }
.card, .panel, .metric, .form-card, .bal-card, .term { background: var(--glass), var(--s1); }
.card-p { padding: 28px; }
.panel { padding: 20px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-h h3 { font-size: 16px; font-weight: 500; }
.panel-h p { font-size: 11px; color: var(--text3); margin-top: 4px; }
.metric { position: relative; flex: 1; min-width: 0; min-height: 142px; padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s; }
.metric:hover { border-color: var(--bd2); }
.metric .l { font-size: 12px; color: var(--text2); }
.metric .v { font-family: var(--mono); font-size: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .s { font-size: 11px; color: var(--text2); }
.metric .act { position: absolute; right: 20px; bottom: 20px; }
.metrics { display: flex; gap: 16px; }
.row2 { display: flex; gap: 20px; }
.row2 > * { flex: 1; min-width: 0; }

/* ---------- поля ---------- */
.inp, .input, select.inp, textarea.inp { width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-s); background: rgba(255, 255, 255, .025);
  border: 1px solid var(--bd); font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.inp::placeholder { color: var(--text3); }
.inp:hover { border-color: var(--bd2); }
.inp:focus, .input:focus { border-color: rgba(183, 190, 220, .5); box-shadow: var(--ring); background: rgba(255, 255, 255, .035); }
.inp.mono { font-family: var(--mono); font-size: 14px; }
textarea.inp { height: auto; padding: 12px 16px; resize: vertical; }
select.inp { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23A6A6A3' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; cursor: pointer; }
.lbl { font-size: 14px; display: block; margin-bottom: 8px; }
.lbl.t2 { color: var(--text2); margin-bottom: 12px; }
.show-pw { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); cursor: pointer; }
.show-pw input { accent-color: var(--lav); }
.form-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form-card h3 { font-size: 18px; }
.form-card .sub { font-size: 11px; color: var(--text3); margin-top: -8px; }
.form-card .inp { height: 44px; }
.form-card .btn { height: 40px; font-size: 13px; }
.form-err { color: var(--red); font-size: 13px; }
.keybox { position: relative; display: flex; align-items: center; }
.keybox .inp { padding-right: 76px; height: 44px; font-family: var(--mono); font-size: 13px; background: rgba(0, 0, 0, .25); }
.keybox .ka { position: absolute; right: 8px; display: flex; gap: 2px; }
.keybox .ka button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--text3); cursor: pointer; border-radius: 4px; }
.keybox .ka button:hover { color: var(--text); background: var(--s3); }
.keybox .ka svg { width: 15px; height: 15px; }
.sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text2); }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { width: 36px; height: 20px; border-radius: 20px; background: var(--s5); border: 1px solid var(--bd2); position: relative; transition: background .2s; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text3); transition: transform .2s, background .2s; }
.sw input:checked + i { background: rgba(183, 190, 220, .25); border-color: rgba(183, 190, 220, .5); }
.sw input:checked + i::after { transform: translateX(16px); background: var(--lav); }
.sw input:focus-visible + i { box-shadow: var(--ring); }

/* ---------- сегменты, теги, значки ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-s); background: rgba(255, 255, 255, .03); border: 1px solid var(--bd); }
.seg button { background: transparent; border: 0; border-radius: 7px; padding: 7px 12px; font-size: 11px; color: var(--text3); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, .08); color: var(--text); }
.seg-l button { font-size: 13px; padding: 8px 14px; }
.tag { font-family: var(--mono); font-size: 10px; color: var(--lav); border: 1px solid #353743; border-radius: 4px; padding: 2px 6px; flex: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); flex: none; position: relative; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--lime); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.spin { width: 22px; height: 22px; flex: none; border: 2px solid var(--bd2); border-top-color: var(--lav); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skl { background: linear-gradient(90deg, var(--s2), var(--s4), var(--s2)); background-size: 200% 100%; animation: shim 1.2s linear infinite; border-radius: 6px; }
@keyframes shim { to { background-position: -200% 0; } }

/* ---------- модалки, тосты ---------- */
.mbg { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .74); display: none; align-items: center; justify-content: center; padding: 16px; }
.mbg.on { display: flex; }
.modal { width: 480px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; border-radius: 18px; border: 1px solid var(--bd2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%), #0e0e10; box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.modal-ctx { display: flex; justify-content: space-between; align-items: center; }
.modal-ctx .cx { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 10px; color: var(--text3); }
.modal-ctx .cx svg { width: 17px; height: 17px; color: var(--lav); }
.modal-ctx button { background: none; border: 0; cursor: pointer; color: var(--text3); padding: 0; }
.modal h2 { font-size: 23px; font-weight: 500; line-height: 1.25; }
.modal .desc { font-size: 13px; line-height: 1.5; color: var(--text2); margin-top: -14px; }
.modal-act { display: flex; gap: 12px; }
.modal-act .btn { flex: 1; height: 40px; font-size: 13px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--s2); border: 1px solid var(--line2); border-radius: 6px; padding: 12px 16px; font-size: 13px; max-width: 360px; }
.toast.err { border-color: rgba(211, 151, 151, .6); }

/* ---------- таблицы и пустые состояния ---------- */
.dt { border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.dt-h, .dt-r { display: flex; align-items: center; padding: 0 16px; height: 42px; font-size: 11px; }
.dt-h { background: var(--s2); color: var(--text3); }
.dt-r { background: var(--s1); border-top: 1px solid var(--line); font-family: var(--mono); color: var(--text2); }
.dt-r .m { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.dt-h > *, .dt-r > * { flex: none; }
.dt .fl { flex: 1; min-width: 0; }
.dt-empty { padding: 28px 16px; text-align: center; color: var(--text3); font-size: 13px; background: var(--s1); border-top: 1px solid var(--line); }
.tbl-head { display: flex; justify-content: space-between; align-items: center; }
.tbl-head h3 { font-size: 18px; }
.tbl-head a { font-size: 12px; color: var(--lav); }
.code-box { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.code-box pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.code-box .cp { position: absolute; right: 10px; top: 10px; display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border: 1px solid var(--bd); border-radius: 7px;
  background: var(--s2); color: var(--text2); font-size: 11px; cursor: pointer; }
.code-box .cp:hover { color: var(--text); border-color: var(--bd2); }
.code-box .cp svg { width: 13px; height: 13px; }

/* ---------- каркас кабинета ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; position: relative; }
.app-top { position: absolute; left: 0; right: 0; top: 57px; height: 1px; background: var(--line); z-index: 1; }
.side { padding: 15px 16px 24px; display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg); z-index: 5; }
.side .brand { padding-left: 10px; gap: 8px; }
.side .brand .mk { width: 25px; height: 25px; }
.side .brand b { font-size: 20px; }
.snav { display: flex; flex-direction: column; gap: 4px; }
.snav .cap-mono { font-size: 10px; margin-bottom: 4px; }
.snav a { position: relative; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 6px; background: var(--s1); font-size: 13px; color: var(--text2); transition: background .15s, color .15s; }
.snav a svg { width: 17px; height: 17px; color: var(--text3); }
.snav a:hover { color: var(--text); }
.snav a.on { background: var(--s4); color: var(--text); }
.snav a.on svg { color: var(--lav); }
.snav a.on::before { content: ""; position: absolute; left: 0; top: 12px; width: 2px; height: 18px; background: var(--lav); }
.snav a.ext .ext-i, .snav a .ext-i { margin-left: auto; font-size: 11px; color: var(--text3); }
.snav hr { border: 0; height: 1px; background: var(--line); margin: 28px 0 0; }
.side-sup { display: flex; gap: 10px; align-items: center; padding: 0 12px; font-size: 13px; color: var(--text2); }
.side-sup svg { width: 17px; height: 17px; }
.side-bg { display: none; }
.ws { min-width: 0; display: flex; flex-direction: column; }
.ubar { height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 32px; }
.ubar a, .ubar button { display: flex; gap: 8px; align-items: center; font-size: 12px; background: none; border: 0; cursor: pointer; color: var(--text); }
.ubar svg { width: 15px; height: 15px; color: var(--text2); }
.ubar .menu-btn { display: none; margin-right: auto; }
.ubar-brand .mk { width: 22px; height: 22px; }
.bal-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--bd); background: rgba(255, 255, 255, .03); cursor: pointer; font-size: 12px; }
.bal-chip b { font-family: var(--mono); font-weight: 400; font-size: 14px; }
.bal-chip .plus { color: var(--lav); }
.bal-chip.low b { color: var(--red); }
.ubar-user { font-size: 12px; }
.pc { padding: 32px; display: flex; flex-direction: column; gap: 24px; min-height: 806px; }
.ph { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ph h1 { font-size: 32px; font-weight: 500; }
.ph p { font-size: 12px; color: var(--text2); margin-top: 8px; }

/* ---------- авторизация ---------- */
.auth { min-height: calc(100vh - 84px - 208px); display: flex; align-items: center; justify-content: center; padding: 48px 16px 80px; }
.auth-box { width: 480px; max-width: 100%; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.auth-box h1 { font-size: 36px; line-height: 40px; font-weight: 500; }
.auth-sub { font-size: 14px; color: var(--text2); margin-top: -12px; }
.auth-fields { display: flex; flex-direction: column; gap: 12px; }
.auth-alt { font-size: 14px; color: var(--text2); text-align: center; }
.auth-alt a { color: var(--lav); text-decoration: underline; }
.or { position: relative; text-align: center; font-size: 12px; color: var(--text3); }
.or::before, .or::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--line); }
.or::before { left: 0; } .or::after { right: 0; }
.or span { background: var(--card-bg, var(--s1)); padding: 0 10px; }
.tg-btn { gap: 10px; }
.tg-btn svg { width: 18px; height: 18px; }

/* ---------- служебное ---------- */
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-family: var(--mono); font-size: 12px; color: var(--yellow);
  background: rgba(216, 195, 124, .05); border-bottom: 1px solid rgba(216, 195, 124, .18); }
.demo-bar .live-dot { background: var(--yellow); }
.legal { max-width: 860px; margin: 0 auto; padding-top: 64px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 14px; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin-top: 18px; }
.legal p, .legal li { color: var(--text2); font-size: 15px; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--lav); }

/* ---------- адаптив ---------- */
@media (max-width: 1200px) { :root { --pad: 32px; } .h-page { font-size: 56px; } .h-sec { font-size: 42px; } .h-hero { font-size: 54px; } }
@media (max-width: 860px) {
  :root { --pad: 20px; }
  .pillnav { display: none; position: absolute; left: 16px; right: 16px; top: 76px; flex-direction: column; padding: 10px; border-radius: var(--r); background: var(--s1); }
  .pillnav.open { display: flex; }
  .hdr-r > a:not(.hdr-cta) { display: none; }
  .burger { display: block; }
  .h-hero { font-size: 38px; } .h-page { font-size: 36px; } .h-sec { font-size: 30px; } .lead { font-size: 17px; }
  .metrics, .row2 { flex-direction: column; }
  .ftr-in { flex-direction: column; }
  .ftr-about { width: auto; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; border-right: 1px solid var(--line); }
  .side.open { transform: none; }
  .side-bg { display: block; position: fixed; inset: 0; z-index: 4; background: rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body:has(.side.open) .side-bg { opacity: 1; pointer-events: auto; }
  .ubar .menu-btn { display: flex; }
  .ubar { padding: 0 16px; }
  .pc { padding: 16px; }
  .dt-h { display: none; }
  .dt-r { flex-direction: column; align-items: flex-start; height: auto; gap: 6px; padding: 14px 16px; }
  .dt-r > [data-l]::before { content: attr(data-l) " "; color: var(--text3); }
  .dt-r > * { width: auto !important; }
  .page-head { padding: 48px 20px; }
}
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
