/* hw-connector.ru — в стиле страницы настройки агента (hw-connector: static/app.css):
   те же цвета (#6d5dfc → #22b8f0), стеклянные карточки, фон с цветными пятнами, Segoe UI, скругления 18px */
:root {
	--bg: #f5f6fb;
	--bg-grad: radial-gradient(1200px 600px at 10% -10%, #e7e3ff 0%, transparent 60%), radial-gradient(900px 500px at 110% 0%, #dff4ff 0%, transparent 55%);
	--surface: rgba(255, 255, 255, .78);
	--surface-solid: #fff;
	--surface-2: #f0f1f8;
	--border: rgba(20, 22, 50, .09);
	--text: #15172b;
	--muted: #6b6f8a;
	--accent: #6d5dfc;
	--accent-2: #22b8f0;
	--accent-3: #8b5cf6;
	--accent-soft: rgba(109, 93, 252, .12);
	--grad: linear-gradient(135deg, var(--accent), var(--accent-2));
	--ok: #16a34a;
	--ok-soft: rgba(22, 163, 74, .12);
	--warn: #d97706;
	--warn-soft: rgba(217, 119, 6, .12);
	--err: #e11d48;
	--err-soft: rgba(225, 29, 72, .1);
	--shadow: 0 1px 2px rgba(20, 22, 50, .05), 0 8px 24px rgba(20, 22, 50, .06);
	--shadow-lg: 0 24px 64px rgba(20, 22, 50, .18);
	--radius: 18px;
	--font: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
	--mono: "Cascadia Code", Consolas, ui-monospace, monospace;
	color-scheme: light;
}

/* тёмная тема: по системе, пока не выбрана вручную, или кнопкой в шапке (data-theme на html, как в агенте) */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0d0e18;
		--bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(109, 93, 252, .22) 0%, transparent 60%), radial-gradient(900px 500px at 110% 0%, rgba(34, 184, 240, .14) 0%, transparent 55%);
		--surface: rgba(24, 26, 42, .72);
		--surface-solid: #181a2a;
		--surface-2: #20233a;
		--border: rgba(255, 255, 255, .08);
		--text: #eceefb;
		--muted: #9599b8;
		--accent-soft: rgba(109, 93, 252, .2);
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
		--shadow-lg: 0 24px 64px rgba(0, 0, 0, .45);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0d0e18;
	--bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(109, 93, 252, .22) 0%, transparent 60%), radial-gradient(900px 500px at 110% 0%, rgba(34, 184, 240, .14) 0%, transparent 55%);
	--surface: rgba(24, 26, 42, .72);
	--surface-solid: #181a2a;
	--surface-2: #20233a;
	--border: rgba(255, 255, 255, .08);
	--text: #eceefb;
	--muted: #9599b8;
	--accent-soft: rgba(109, 93, 252, .2);
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
	--shadow-lg: 0 24px 64px rgba(0, 0, 0, .45);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* подвал всегда внизу: на коротких страницах (вход, ошибки) main растягивается на свободное место */
body {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	margin: 0;
	font: 16px/1.6 var(--font);
	color: var(--text);
	background: var(--bg-grad), var(--bg);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
code { font: 13px var(--mono); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
.muted { color: var(--muted); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.section { padding: 80px 0; }
.section.alt { background: color-mix(in srgb, var(--surface-2) 55%, transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.eyebrow {
	display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; margin-bottom: 16px;
	font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* --- шапка: как .topbar агента --- */
.site-header {
	position: sticky; top: 0; z-index: 10;
	background: var(--surface);
	backdrop-filter: saturate(160%) blur(18px);
	border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.logo-mark { width: 40px; height: 40px; flex: none; display: block; filter: drop-shadow(0 6px 12px rgba(109, 93, 252, .3)); }
.logo-word { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 10px; transition: .15s; }
.nav a:hover { color: var(--text); background: var(--surface-solid); box-shadow: var(--shadow); }
.nav a.btn { color: #fff !important; padding: 7px 14px; margin-left: 4px; }
.nav a.btn:hover { background: linear-gradient(135deg, var(--accent), var(--accent-3)); }

.mobile-menu { display: none; position: relative; }
.mobile-menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-content: center; gap: 4px; border-radius: 10px; background: var(--surface-2); }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu-panel {
	position: absolute; right: 0; top: 50px; min-width: 230px; padding: 6px;
	background: var(--surface-solid); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.mobile-menu-panel a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.mobile-menu-panel a:hover { background: var(--accent-soft); color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
/* кнопка темы — как #themeBtn агента */
.theme-btn { border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* переключатель языка — как .lang-switch агента */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.lang-switch a { color: var(--muted); font: 600 12px var(--font); padding: 5px 9px; border-radius: 7px; text-decoration: none; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }
@media (max-width: 900px) {
	.nav { display: none; }
	.mobile-menu { display: block; }
}

/* --- кнопки: как .btn агента; основная — фиолетовый градиент (.btn.primary) --- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0; color: #fff !important; background: linear-gradient(135deg, var(--accent), var(--accent-3));
	box-shadow: 0 6px 18px rgba(109, 93, 252, .3);
	font: 600 15px var(--font); padding: 11px 20px; border-radius: 12px; cursor: pointer; transition: .15s;
	white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(109, 93, 252, .38); }
.btn:active { transform: none; }
.btn-ghost {
	border: 1px solid var(--border); background: var(--surface-solid); color: var(--text) !important; box-shadow: none;
}
.btn-ghost:hover { box-shadow: var(--shadow); }
.btn-small { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* --- первый экран --- */
/* на весь экран под шапкой, содержимое по центру, как на bigbilet.com/promo */
.hero {
	padding: 72px 0 112px; position: relative; overflow: hidden;
	min-height: calc(100vh - 69px); min-height: calc(100svh - 69px); display: flex; align-items: center;
}
.hero > .wrap { width: 100%; }
.hero-scroll {
	position: absolute; bottom: 28px; left: 50%; z-index: 1; color: var(--muted); opacity: .8;
	transform: translateX(-50%); animation: hero-float 2.5s ease-in-out infinite;
}
.hero-scroll:hover { color: var(--accent); opacity: 1; }
@keyframes hero-float {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(10px); }
}
/* разделы под липкой шапкой: по ссылке-якорю заголовок не уходит под неё */
section[id] { scroll-margin-top: 69px; }
/* летающие точки с линиями — под содержимым первого экрана (js/particles.js) */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; }
.hero-grid { display: grid; gap: 48px; align-items: center; grid-template-columns: minmax(0, 1fr); }
.hero-grid > * { min-width: 0; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 800; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 640px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }

/* окно с примером запроса — тёмное в обеих темах */
.console {
	background: #12131f; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius);
	box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
}
.console::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); }
.console-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2d44; }
.console-bar span { margin-left: 8px; font: 12px var(--mono); color: #9599b8; }
.console pre { margin: 0; padding: 20px 22px 24px; overflow-x: auto; font: 13.5px/1.75 var(--mono); color: #d6d8ee; }
.console .c { color: #6b6f8a; }
.console .k { color: #a99dff; font-weight: 600; }
.console .s { color: #67e8f9; }
.console .h { color: #93c5fd; }

/* --- карточки: как .card / .device агента --- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
@media (min-width: 1000px) {
	.grid { grid-template-columns: repeat(3, 1fr); }
	.grid.two { grid-template-columns: repeat(2, 1fr); }
}
.card {
	background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; transition: .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.icon {
	width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
	color: var(--accent); background: var(--accent-soft);
}
.grid .card:nth-child(3n+2) .icon { color: #0ea5e9; background: rgba(14, 165, 233, .12); }
.grid .card:nth-child(3n) .icon { color: #f59e0b; background: rgba(245, 158, 11, .14); }
.icon svg { width: 24px; height: 24px; }

/* --- оборудование: группы — карточки --- */
.device-group {
	background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.device-group h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.device-group h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: var(--surface-2); color: var(--text); }

/* --- шаги --- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
	counter-increment: step; background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.steps li::before {
	content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; margin-bottom: 14px;
	color: #fff; font-weight: 700; background: var(--grad); box-shadow: 0 6px 18px rgba(109, 93, 252, .3);
}
.steps p { color: var(--muted); margin: 0; }

/* --- вопросы --- */
.faq { max-width: 860px; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* --- призыв --- */
.cta {
	border-radius: 24px; padding: 52px 32px; text-align: center; color: #fff;
	background: linear-gradient(135deg, var(--accent), var(--accent-3) 55%, var(--accent-2));
	box-shadow: 0 24px 64px rgba(109, 93, 252, .3);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto; }
.cta .actions { justify-content: center; }
.cta .btn { background: #fff; color: var(--accent) !important; box-shadow: none; }
.cta .btn-ghost { background: rgba(255,255,255,.14); color: #fff !important; border: 1px solid rgba(255,255,255,.4); }

/* --- подвал --- */
.site-footer { background: var(--surface); backdrop-filter: blur(12px); border-top: 1px solid var(--border); flex-shrink: 0; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.3fr; } }
.footer-grid h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.footer-grid a:not(.logo) { display: block; color: var(--text); text-decoration: none; margin-bottom: 7px; font-size: 15px; }
.footer-grid a:not(.logo):hover { color: var(--accent); }
.footer-note { color: var(--muted); max-width: 320px; margin-top: 12px; font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; padding-bottom: 24px; color: var(--muted); font-size: 13px; }

/* --- текст документов --- */
.prose { max-width: 820px; }
.prose h2 { font-size: 21px; margin: 32px 0 10px; }
.prose li { margin-bottom: 6px; }
.prose ul { padding-left: 22px; }

/* --- страницы кабинета --- */
.page { padding: 48px 0 80px; }
.narrow { max-width: 520px; }
.panel { background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.page h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.02em; }
.form { display: grid; gap: 16px; margin: 22px 0; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.form input {
	font: 15px var(--font); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
	background: var(--surface-solid); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form button { justify-self: start; }
.form-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--muted); }
.form .check input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); flex: none; }
.field-error { color: var(--err); font-weight: 500; font-size: 13px; }
.alert { border-radius: 12px; padding: 12px 16px; background: var(--accent-soft); color: var(--text); }
.alert.error { background: var(--err-soft); color: var(--err); }
.cabinet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cabinet-head form { margin: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin: 12px 0 32px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions form, .table form { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); margin: 0 4px 4px 0; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--err-soft); color: var(--err); }
.upload {
	display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0; padding: 18px;
	border: 2px dashed var(--border); border-radius: var(--radius); transition: .2s;
}
.upload:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload progress { width: 200px; accent-color: var(--accent); }

@media (max-width: 720px) {
	.hero { padding: 48px 0 96px; }
	.section { padding: 56px 0; }
	.cta { padding: 40px 20px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
