/* ТеплоСтраж — демо-стенд */
:root {
  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e3e8ef;
  --line-2: #eef2f7;
  --paper: #ffffff;
  --bg: #f7f9fc;
  --tint: #eef2f7;
  --accent: #e2540b;
  --accent-2: #c2410c;
  --accent-soft: #fdece3;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --crit: #b91c1c;
  --crit-soft: #feecec;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05);
  --shadow: 0 10px 30px rgba(11, 18, 32, .08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; font-weight: 750; }
h1 { font-size: clamp(34px, 4.4vw, 56px); }
h2 { font-size: clamp(26px, 3vw, 38px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: #fff;
}
.brand-text { font-size: 17px; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: var(--ink-2); font-size: 14.5px; font-weight: 550; }
.nav a:hover { color: var(--accent-2); text-decoration: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.demo-badge {
  font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-soft); border: 1px solid #fde3b0;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s ease; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .55); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { padding: 13px 24px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% 18%, rgba(226, 84, 11, .16), transparent 60%),
    radial-gradient(700px 380px at 8% 0%, rgba(37, 99, 235, .16), transparent 60%),
    var(--ink);
  color: #e8eef8;
  padding: 72px 0 84px;
}
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.hero .eyebrow { color: #fdba74; }
.hero h1 { color: #fff; margin-top: 18px; }
.accent { color: #fb923c; }
.lead { font-size: 17.5px; color: #b6c2d4; max-width: 54ch; margin-top: 18px; }
.lead strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; font-size: 13px; color: #93a3b8; }
.hero-trust > span:first-child { margin-right: 4px; }
.chip {
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05); color: #dbe4f0; font-size: 12.5px; font-weight: 550;
}

.hero-card {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  backdrop-filter: blur(8px);
}
.hero-card-head { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #cbd5e1; }
.hero-card-title { font-weight: 650; }
.hero-card-head .pill { margin-left: auto; }
.hero-card-body { padding: 14px 2px 2px; }
.hero-alert { font-size: 15.5px; font-weight: 650; color: #fff; }
.hero-numbers { display: flex; align-items: center; gap: 18px; margin: 10px 0 4px; }
.hero-value { font-size: 30px; font-weight: 750; letter-spacing: -.02em; color: #fff; line-height: 1.1; }
.hero-value-alert { color: #fca5a5; }
.unit { font-size: 15px; color: #94a3b8; margin-left: 3px; font-weight: 600; }
.hero-label { font-size: 12px; color: #8fa0b8; }
.hero-arrow { color: #64748b; font-size: 20px; }
.chart { width: 100%; }
.chart-hero { height: 168px; margin: 6px 0 4px; }
.hero-buttons { display: flex; gap: 8px; margin-top: 8px; }
.mock-btn {
  padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .2); color: #e2e8f0;
}
.mock-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero-card-foot { margin-top: 10px; font-size: 11.5px; color: #7c8ba1; text-align: center; }

/* ---------- dots, pills, badges ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ok { background: var(--ok); }
.dot-warning, .dot-info { background: #d97706; }
.dot-critical { background: var(--crit); }
.dot-live { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.pill {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .02em;
}
.pill-critical { background: var(--crit-soft); color: var(--crit); }
.pill-warning { background: var(--warn-soft); color: var(--warn); }
.pill-info { background: #eef2ff; color: #4338ca; }

.badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-crit { background: var(--crit-soft); color: var(--crit); }
.badge-muted { background: var(--tint); color: var(--muted); }

/* ---------- stats ---------- */
.stats { background: var(--paper); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 30px 26px; border-left: 1px solid var(--line-2); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-value { font-size: clamp(22px, 2.4vw, 30px); font-weight: 750; letter-spacing: -.02em; }
.stat-label { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-tinted { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-sub { color: var(--muted); font-size: 16.5px; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card-featured { border-color: #f3b27a; box-shadow: 0 12px 34px rgba(226, 84, 11, .12); }
.card-icon {
  display: inline-flex; font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 6px; margin-bottom: 16px;
}
.card-icon-now { background: #eef2ff; color: #4338ca; }
.card-icon-ml { background: var(--accent-soft); color: var(--accent-2); }
.card-icon-dq { background: var(--warn-soft); color: var(--warn); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.card-example {
  border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.card-flat { padding: 22px; }
.card-flat p { margin-bottom: 0; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { position: relative; padding-top: 18px; border-top: 2px solid var(--line); }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 42px; height: 2px; background: var(--accent); }
.step-num { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.steps h3 { margin: 8px 0 6px; font-size: 17px; }
.steps p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- split / checklist ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 15px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 800; margin-top: 4px;
}
.checklist-light li { color: #cbd5e1; }
.checklist-light li::before { background: rgba(34, 197, 94, .18); color: #4ade80; }

.max-mock {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow);
}
.max-mock-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: #f8fafc; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--muted);
}
.max-logo {
  background: #0077ff; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 6px;
}
.max-msg { padding: 16px; font-size: 14px; }
.max-msg-title { font-weight: 700; margin-bottom: 6px; }
.max-msg-body { color: var(--ink-2); font-size: 13.5px; }
.max-buttons { display: flex; gap: 8px; margin-top: 12px; }
.max-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.max-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.max-time { text-align: right; font-size: 11px; color: var(--muted-2); margin-top: 8px; }

/* ---------- faq ---------- */
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- cta ---------- */
.section-cta { background: var(--ink); color: #e8eef8; }
.eyebrow-light { color: #fdba74; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.cta-text { color: #b6c2d4; font-size: 16px; }
.lead-form { background: var(--paper); border-radius: var(--radius-lg); padding: 26px; color: var(--ink); box-shadow: var(--shadow); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; background: #fbfcfe; color: var(--ink);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid #fdba74; outline-offset: 1px; border-color: var(--accent); }
.form-note { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; text-align: center; }
.form-error { color: var(--crit); font-size: 13.5px; margin: 10px 0 0; }
.lead-ok { margin-top: 12px; padding: 14px 16px; border-radius: 10px; background: var(--ok-soft); color: #14532d; }
.lead-ok p { margin: 4px 0 0; font-size: 13.5px; }

/* ---------- app ---------- */
.page-app { background: var(--bg); }
.app-shell { padding: 32px 0 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; display: flex; gap: 8px; }

.sites-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.site-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 14px; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--line);
}
.site-card.status-ok { border-top-color: var(--ok); }
.site-card.status-warning { border-top-color: #d97706; }
.site-card.status-critical { border-top-color: var(--crit); }
.site-card-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.site-id { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.site-code { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.site-status { font-weight: 600; }
.site-link { font-size: 12.5px; }
.site-name { font-size: 17px; margin: 12px 0 2px; }
.site-address { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.site-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 0; border-block: 1px solid var(--line-2); }
.metric { display: flex; flex-direction: column; }
.metric-value { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.metric-value .unit { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.metric-label { font-size: 11.5px; color: var(--muted); }
.spark { width: 100%; height: 42px; display: block; margin: 10px 0 6px; }
.site-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }

.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 18px; margin: 0; }
.panel-head a { font-size: 13.5px; }

.alert-list { display: grid; }
.alert-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 14px 14px 14px 16px; border-left: 3px solid var(--line);
  border-bottom: 1px solid var(--line-2);
}
.alert-row:last-child { border-bottom: 0; }
.alert-row.sev-critical { border-left-color: var(--crit); }
.alert-row.sev-warning { border-left-color: #d97706; }
.alert-row.sev-info { border-left-color: #6366f1; }
.alert-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.alert-site { font-family: var(--mono); font-weight: 700; color: var(--ink-2); }
.alert-title { font-weight: 650; font-size: 14.5px; }
.alert-detail { font-size: 13px; color: var(--muted); margin-top: 2px; }
.alert-evidence { font-size: 12px; color: #7c8ba1; margin-top: 4px; }
.alert-actions { flex: none; display: flex; align-items: center; padding-top: 4px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.empty-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); margin: 0 auto 10px; font-weight: 800; }
.empty p { margin: 0; font-size: 14px; }

.tabs { display: inline-flex; background: var(--tint); border-radius: 9px; padding: 3px; gap: 2px; }
.tab {
  border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--muted); padding: 5px 12px; border-radius: 7px; cursor: pointer;
}
.tab.is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.chart-main { height: 380px; }
.chart-small { height: 220px; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 6px 4px 0; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.line { display: inline-block; width: 16px; height: 2px; border-radius: 2px; }
.line-supply { background: #2563eb; }
.line-return { background: var(--accent); }
.line-limit { background: var(--crit); height: 0; border-top: 2px dashed var(--crit); }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.split-2 .panel { height: 100%; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.status-inline { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; vertical-align: middle; }
.status-inline.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-inline.status-warning { background: var(--warn-soft); color: var(--warn); }
.status-inline.status-critical { background: var(--crit-soft); color: var(--crit); }

.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- footer ---------- */
.footer { background: var(--paper); border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 32px; align-items: start; }
.brand-footer { margin-bottom: 10px; }
.footer-note { font-size: 13px; color: var(--muted); margin: 0; }
.footer-links { display: grid; gap: 8px; font-size: 13.5px; }
.footer-links a { color: var(--ink-2); }
.footer-legal { text-align: right; font-size: 13px; color: var(--ink-2); }

/* ---------- docs ---------- */
.page-doc { padding: 48px 0 72px; }
.page-doc h1 { font-size: 32px; }
.page-doc h2 { font-size: 20px; margin-top: 28px; }
.page-doc p { color: var(--ink-2); font-size: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { padding: 52px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding: 20px 0; border-top: 1px solid var(--line-2); }
  .stat:first-child { border-top: 0; }
  .cards-3, .cards-4, .steps, .sites-grid { grid-template-columns: 1fr 1fr; }
  .split, .cta-grid, .split-2, .footer-inner { grid-template-columns: 1fr; }
  .footer-legal { text-align: left; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .section { padding: 56px 0; }
  .cards-3, .cards-4, .steps, .sites-grid, .stats-grid { grid-template-columns: 1fr; }
  .chart-main { height: 300px; }
  .alert-row { flex-direction: column; gap: 10px; }
  .topbar-actions .demo-badge { display: none; }
  .hero-value { font-size: 26px; }
}

/* недостающие обёртки */
.hero-copy { max-width: 640px; }
.split-copy { min-width: 0; }
.split-visual { min-width: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-kind, .alert-time { color: var(--muted); }
