
:root {
  --bg: #191b23; --panel: rgba(36, 39, 51, .94); --panel-solid: #242733; --panel-2: #2b2e3b; --code: #1d202a;
  --line: #353947; --line-2: #484e60;
  --text: #f7f7fc; --muted: #b9bdce; --faint: #9298ad;
  --accent: #b49aff; --accent-2: #a98afb; --accent-soft: rgba(180, 154, 255, .11);
  --accent-light: #cbbaff; --button-text: #191426;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --shadow: 0 1px 0 rgba(255, 255, 255, .025) inset, 0 18px 40px -30px rgba(0, 0, 0, .5);
  --glow-1: rgba(127, 95, 190, .1); --glow-2: rgba(127, 95, 190, .045);
  --grid-line: rgba(180, 172, 209, .035);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-serif: var(--font-display);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7fa; --panel: rgba(255, 255, 255, .94); --panel-solid: #ffffff; --panel-2: #eceef4; --code: #f0f2f7;
  --line: #dfe2eb; --line-2: #c6cbd9;
  --text: #252733; --muted: #565d72; --faint: #657088;
  --accent: #7346c7; --accent-2: #693dba; --accent-soft: rgba(115, 70, 199, .09);
  --accent-light: #8356d8; --button-text: #ffffff;
  --ok: #16a34a; --warn: #b07216; --bad: #dc2626;
  --shadow: 0 1px 2px rgba(26, 18, 48, .04), 0 20px 40px -28px rgba(26, 18, 48, .18);
  --glow-1: rgba(127, 95, 190, .055); --glow-2: rgba(127, 95, 190, .025);
  --grid-line: rgba(98, 100, 129, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: none; }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
              linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
              radial-gradient(1000px 740px at 95% 35%, var(--glow-1), transparent 68%),
              radial-gradient(900px 600px at 10% 100%, var(--glow-2), transparent 70%); }
.flowlines { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .flowlines { display: none; } }

.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: var(--panel); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -24px; height: 24px; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 80%, transparent), transparent); }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 650; font-size: 16px; letter-spacing: -.015em; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-display); font-size: 19px; letter-spacing: -.04em; font-weight: 800; }
.logo { width: 26px; height: 26px; flex: none; display: inline-grid; place-items: center; filter: drop-shadow(0 0 8px rgba(167, 139, 250, .28)); }
.logo svg { width: 100%; height: 100%; display: block; transition: transform .5s var(--ease-out); }
.brand:hover .logo svg { transform: rotate(90deg); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  color: var(--muted); background: color-mix(in srgb, var(--panel-solid) 60%, transparent); border: 1px solid var(--line); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); animation: pulse 2.4s var(--ease-in-out) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 10%, transparent); } }
.nav { display: flex; align-items: center; gap: 6px; }
.navlink { color: var(--muted); padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; transition: color .15s var(--ease-out); display: inline-flex; align-items: center; gap: 6px; }
.navlink:hover, .navlink.on { color: var(--text); text-decoration: none; }
.navlink-cta { color: var(--text); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel-solid) 65%, transparent); margin-left: 4px; }
.navlink-cta:hover { border-color: var(--accent); color: var(--accent); }
.navlink-cta svg { opacity: .7; transition: transform .18s var(--ease-out); }
.navlink-cta:hover svg { transform: translateX(2px); opacity: 1; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); gap: 2px; }
.seg button { all: unset; cursor: pointer; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-align: center;
  transition: background .18s var(--ease-out), color .18s var(--ease-out), transform .16s var(--ease-out); }
.seg button.on { background: var(--text); color: var(--bg); }
.seg button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .seg button:hover:not(.on) { color: var(--text); }
}
.icon-btn { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 10px; color: var(--muted); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel-solid) 65%, transparent);
  transition: color .15s var(--ease-out), border-color .15s var(--ease-out); position: relative; }
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg { width: 16px; height: 16px; transition: opacity .25s var(--ease-out), transform .4s var(--ease-out); }
.icon-btn .icon-sun { position: absolute; opacity: 0; transform: rotate(-90deg); }
:root[data-theme="light"] .icon-btn .icon-moon { opacity: 0; transform: rotate(90deg); }
:root[data-theme="light"] .icon-btn .icon-sun { opacity: 1; transform: rotate(0); }
.icon-btn:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--accent-2); color: var(--button-text); font-weight: 700; transition: top .15s var(--ease-out); }
.skip-link:focus { top: 12px; outline: 2px solid var(--text); outline-offset: 2px; }
main:focus { outline: none; }

/* Мобильное меню: кнопка видна только на узком экране, панель выезжает под шапкой */
.menu-btn { display: none; }
.menu-btn path { transition: transform .2s var(--ease-out), opacity .15s var(--ease-out); transform-origin: 12px 12px; }
.menu-open .menu-btn .mb-top { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn .mb-mid { opacity: 0; }
.menu-open .menu-btn .mb-bot { transform: translateY(-5px) rotate(-45deg); }
.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 19; display: flex; flex-direction: column; padding: 8px 12px 14px;
  background: var(--panel-solid); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(-6px); transition: opacity .18s var(--ease-out), transform .18s var(--ease-out); }
.mobile-menu.open { opacity: 1; transform: none; }
.mobile-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; border-radius: 10px;
  color: var(--text); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.mobile-menu a + a { border-top: 1px solid var(--line); border-radius: 0; }
.mobile-menu a.on { color: var(--accent); }
.mobile-menu a:active { background: var(--panel-2); }
.mobile-menu .mm-cta { margin-top: 10px; border: 0; border-radius: 10px; justify-content: center; gap: 8px; background: var(--accent-2); color: var(--button-text); }
.mobile-menu .mm-cta + a, .mobile-menu a + .mm-cta { border-top: 0; }
html.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 18; background: rgba(8, 8, 14, .55); animation: menu-dim .18s var(--ease-out); }
@keyframes menu-dim { from { opacity: 0; } }

.wrap { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 20px 80px; flex: 1; }
.foot { position: relative; z-index: 1; color: var(--faint); font-size: 13px; padding: 48px 20px 36px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); }
.foot-in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 40px; }
.foot-brand { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.foot-brand > div { min-width: 0; }
.foot-brand .logo { width: 32px; height: 32px; }
.foot-name { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--text); letter-spacing: -.04em; margin-bottom: 4px; }
.foot-note { max-width: 280px; line-height: 1.5; overflow-wrap: anywhere; }
.foot-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 980px) { .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.foot-cols > div { min-width: 0; overflow-wrap: anywhere; }
.foot-cols .foot-h { margin: 0 0 8px; font-size: 12px; line-height: 1.4; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.foot-cols a { display: block; color: var(--faint); padding: 5px 0; font-size: 14px; transition: color .15s var(--ease-out); }
@media (pointer: coarse) { .foot-cols a { display: flex; align-items: center; min-height: 44px; padding: 0; } }
.foot-cols a:hover { color: var(--text); }
.foot-bot { max-width: 1180px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
@media (max-width: 720px) { .foot-in { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 420px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); will-change: opacity, transform; }
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
[data-reveal][data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.5vw, 52px); line-height: 1.12; letter-spacing: -.04em; margin: 0 0 16px; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.015em; margin: 0 0 6px; font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.fine { font-size: 13px; color: var(--faint); margin: 14px 0 0; }
.serif { font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); }
.card-solid { background: var(--panel-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); background: color-mix(in srgb, var(--panel-solid) 60%, transparent); white-space: nowrap; letter-spacing: .02em; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

input, select, textarea { font: inherit; color: var(--text); background: var(--code); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; width: 100%; min-width: 0; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }
.btn { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; color: var(--button-text); white-space: nowrap; text-decoration: none;
  background: var(--accent-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 8px 24px -20px rgba(127, 95, 190, .35);
  transition: filter .18s var(--ease-out), border-color .18s var(--ease-out), transform .16s var(--ease-out), box-shadow .18s var(--ease-out); letter-spacing: -.005em; }
a.btn { color: var(--button-text); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, a.btn:hover { filter: brightness(1.1); color: var(--button-text); text-decoration: none; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 12px 28px -20px rgba(127, 95, 190, .55); }
}
.btn:active, a.btn:active { transform: scale(0.97); }
.btn:focus-visible, a.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.ghost, a.btn.ghost { color: var(--text); background: color-mix(in srgb, var(--panel-solid) 70%, transparent); border-color: var(--line-2); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn.ghost:hover, a.btn.ghost:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); filter: none; color: var(--text); background: var(--panel-2); box-shadow: none; }
}
.soft { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 32%, transparent); box-shadow: none; }
.soft:hover { filter: none; border-color: var(--accent); }
.btn-block { width: 100%; }
.btn.btn-sm, .btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; min-height: 34px; }
@media (pointer: coarse) { .btn.btn-sm, .btn-sm { min-height: 44px; padding: 8px 14px; } }

code, pre, .mono { font-family: var(--font-mono); font-size: 13px; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.code { border: 1px solid var(--line); border-radius: 14px; background: var(--code); overflow: hidden; margin: 10px 0 14px; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--line); }
.code-title { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code pre { margin: 0; padding: 14px; overflow-x: auto; line-height: 1.65; }
.code pre code { background: none; border: 0; padding: 0; }

.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; background: transparent; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  tbody tr { transition: background .18s var(--ease-out); }
  tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .btn:active, a.btn:active, .seg button:active, .app-card:active { transform: none !important; }
}
.empty { padding: 26px 14px; text-align: center; color: var(--faint); white-space: normal; }

.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px; background: var(--accent-soft); font-size: 14px; margin: 12px 0 14px; }
.note.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.note.good { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.note b { font-weight: 600; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1 1 180px; }
.row > button { flex: 0 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; position: relative; overflow: hidden; }
.stat > span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.stat b { display: block; font-size: 28px; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; font-weight: 500; }
.stat.accent::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, var(--accent-soft), transparent 60%); }
.stat.accent b { color: var(--accent); }
.notice { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.error { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.inline { display: flex; gap: 6px; }
.inline input { width: 140px; padding: 6px 9px; }
.inline button { padding: 6px 10px; }
form { margin: 0; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  .card { padding: 16px; border-radius: 10px; }
  .wrap { padding-top: 22px; }
  .navlink { padding: 6px 8px; font-size: 13px; gap: 4px; }
  .navlink:not(.navlink-cta) { display: none; }
  .menu-btn { display: inline-grid; }
  .icon-btn { width: 44px; height: 44px; border-radius: 12px; }
  .navlink-cta { min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
  .topbar-in { padding: 10px 16px; }
  .status-pill { display: none; }
  .brand-name { display: none; }
}
