/* ==========================================================================
   OCR by OneSwitch — стили в единой дизайн-системе с oneswitch.ru
   Manrope + JetBrains Mono · тёмная/светлая тема · акцент лайм / олива
   ========================================================================== */

/* ---------- Токены (идентичны oneswitch.ru) ---------- */
:root {
  --bg: #08090b;
  --bg2: #0e1013;
  --card: #12151a;
  --line: #1f242c;
  --fg: #eef0f2;
  --mut: #8b94a1;
  --acc: #c8ff3d;
  --acc-ink: #0a0d02;
  --acc2: #5ef0c4;
  --amber: #ffbe5c;
  --danger: #ff6b6b;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);

  --r: 18px;
  --max: 1200px;
  --g: clamp(16px, 4vw, 40px);
  --f: 'Manrope', system-ui, sans-serif;
  --m: 'JetBrains Mono', ui-monospace, monospace;

  /* Совместимость со старыми именами переменных в шаблонах */
  --bg-main: var(--bg);
  --bg-card: var(--card);
  --bg-card-hover: var(--card);
  --bg-elevated: var(--bg2);
  --border: var(--line);
  --border-light: color-mix(in srgb, var(--mut) 40%, var(--line));
  --border-focus: var(--acc);
  --text-main: var(--fg);
  --text-muted: var(--mut);
  --text-dark: color-mix(in srgb, var(--mut) 75%, var(--bg));
  --accent: var(--acc);
  --accent-hover: var(--acc);
  --accent-light: var(--acc);
  --accent-glow: color-mix(in srgb, var(--acc) 16%, transparent);
  --emerald: var(--acc2);
  --font-sans: var(--f);
  --font-mono: var(--m);
  --container-max: var(--max);
  --radius-sm: 10px;
  --radius-md: var(--r);
  --radius-lg: calc(var(--r) + 6px);
  --transition: all .25s cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7f4; --bg2: #ecede8; --card: #fff; --line: #dcdfd6;
  --fg: #101214; --mut: #5c6570; --acc: #4f7d00; --acc-ink: #fff; --acc2: #007a5a;
  --amber: #9a5b00; --danger: #c62828;
  --shadow: 0 30px 60px -34px rgba(16, 18, 20, .28);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f4; --bg2: #ecede8; --card: #fff; --line: #dcdfd6;
    --fg: #101214; --mut: #5c6570; --acc: #4f7d00; --acc-ink: #fff; --acc2: #007a5a;
    --amber: #9a5b00; --danger: #c62828;
    --shadow: 0 30px 60px -34px rgba(16, 18, 20, .28);
    color-scheme: light;
  }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--f);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .2s, border-color .2s; }
img, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--acc); color: var(--acc-ink); }

h1, h2, h3, h4 { line-height: 1.08; letter-spacing: -.025em; font-weight: 800; color: var(--fg); }

.container {
  width: min(var(--max), 100% - 2 * var(--g));
  margin-inline: auto;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
.brand-text { display: flex; flex-direction: column; white-space: nowrap; }

.logo { font: 800 19px/1.1 var(--m); letter-spacing: -.02em; color: var(--fg); }
.logo b { color: var(--acc); font-weight: 800; }
.logo-prod { margin-left: 8px; color: var(--mut); font-weight: 500; }

.brand-sub {
  font: 500 10.5px/1 var(--m);
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: 5px;
}

.nav-menu { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); }

.nav-link {
  font-size: 15px;
  color: var(--mut);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--fg); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--acc);
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn, .mobile-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color .2s;
}
.icon-btn:hover, .mobile-toggle:hover { border-color: var(--acc); }
.mobile-toggle { display: none; }

.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-sun { display: none; }
  :root:not([data-theme="dark"]) .i-moon { display: block; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s, background .25s, border-color .25s, box-shadow .25s, color .25s;
  text-align: center;
  white-space: nowrap;
}

.btn-primary { background: var(--acc); color: var(--acc-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -10px var(--acc); }

.btn-secondary, .btn-outline { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-secondary:hover, .btn-outline:hover { border-color: var(--acc); }

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 17px 30px; font-size: 17px; }
.header-actions .btn { padding: 10px 20px; font-size: 14px; }

/* ---------- Метки (eyebrow) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12.5px/1.3 var(--m);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--acc);
}
.badge::before { content: ""; width: 22px; height: 1px; background: currentColor; flex-shrink: 0; }
.badge-emerald { color: var(--acc2); }
.badge-amber { color: var(--amber); }

/* Внутри карточек-мокапов метки — компактные «теги» */
.col-header .badge, .one-c-titlebar .badge, .hw-head .badge {
  letter-spacing: .04em;
  text-transform: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.col-header .badge::before, .one-c-titlebar .badge::before, .hw-head .badge::before { display: none; }

.accent-gradient { color: var(--acc); }

/* ---------- Hero ---------- */
.hero-section {
  padding: clamp(56px, 8vw, 96px) 0 clamp(56px, 7vw, 90px);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--mut) 35%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70% 55% at 50% 30%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 30%, #000, transparent 80%);
  opacity: .5;
  pointer-events: none;
}
.hero-section > * { position: relative; }

.hero-header { text-align: center; max-width: 980px; margin: 0 auto 56px; }

.hero-title {
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -.035em;
  margin: 24px auto 26px;
  max-width: 20ch;
}
.hero-title em, .section-title em { font-style: normal; color: var(--acc); }

.hero-subtitle {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--mut);
  max-width: 62ch;
  margin: 0 auto 34px;
}

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 48px; flex-wrap: wrap; }

.hero-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  max-width: 1040px;
  margin: 0 auto;
  overflow: hidden;
}
.stat-item { text-align: left; padding: 22px 24px; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-val { font: 800 clamp(26px, 2.6vw, 36px)/1 var(--f); letter-spacing: -.04em; color: var(--acc); }
.stat-lbl { font-size: 14px; color: var(--mut); margin-top: 8px; line-height: 1.4; }

/* Демо-виджет */
.hero-product-preview {
  margin-top: 64px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.preview-topbar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.window-dots { display: flex; gap: 7px; }
.window-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.preview-title { font: 12.5px var(--m); color: var(--mut); }
.preview-status { display: flex; align-items: center; gap: 8px; font: 500 12.5px var(--m); color: var(--acc2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 10px var(--acc2); }

.preview-grid { display: grid; grid-template-columns: 1fr 64px 1.25fr; min-height: 460px; }
.preview-grid > *, [style*="display:grid"] > *, [style*="display: grid"] > *,
.solution-box > *, .speed-body-grid > *, .footer-grid > * { min-width: 0; }
.preview-col-source { padding: 24px; background: var(--bg2); border-right: 1px solid var(--line); }

.col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.col-title { font: 500 12px var(--m); text-transform: uppercase; letter-spacing: .12em; color: var(--mut); }

/* «Бумажный» УПД — всегда светлый */
.mockup-document {
  background: #fff;
  color: #101214;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #dcdfd6;
  font: 400 .72rem/1.5 var(--f);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .45);
  position: relative;
}
.doc-stamp {
  position: absolute; top: 15px; right: 15px;
  border: 2px solid #d32f2f; color: #d32f2f;
  padding: 4px 8px; font-weight: 800; font-size: .65rem;
  transform: rotate(8deg); text-transform: uppercase; border-radius: 3px;
}
.doc-header-block { margin-bottom: 14px; border-bottom: 1px solid #e6e8e1; padding-bottom: 10px; }
.doc-name { font-weight: 800; font-size: .85rem; margin-bottom: 6px; }
.doc-field { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.doc-label { color: #5c6570; }
.doc-val { font-weight: 600; }
.doc-val.highlighted { background: rgba(79, 125, 0, .12); outline: 1px solid #4f7d00; border-radius: 3px; padding: 0 3px; }
.doc-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 10px; font-size: .68rem; }
.doc-table th:nth-child(1), .doc-table td:nth-child(1) { width: 12%; }
.doc-table th:nth-child(2), .doc-table td:nth-child(2) { width: 31%; }
.doc-table th:nth-child(3), .doc-table td:nth-child(3) { width: 14%; }
.doc-table th:nth-child(4), .doc-table td:nth-child(4) { width: 14%; }
.doc-table th:nth-child(5), .doc-table td:nth-child(5) { width: 9%; }
.doc-table th:nth-child(6), .doc-table td:nth-child(6) { width: 20%; }
.doc-table th { background: #f1f2ee; text-align: left; padding: 4px 6px; border: 1px solid #dcdfd6; }
.doc-table td { padding: 4px 6px; border: 1px solid #dcdfd6; }
.doc-table tr.highlighted td { background: rgba(79, 125, 0, .08); }
.doc-table th:nth-child(n+3), .doc-table td:nth-child(n+3) { white-space: normal; overflow-wrap: anywhere; text-align: right; }
.doc-table th:last-child, .doc-table td:last-child { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .mockup-document { padding: 14px 12px; }
  .doc-stamp { position: static; display: inline-block; margin-bottom: 8px; transform: rotate(-3deg); }
  .doc-field { flex-wrap: wrap; gap: 0 8px; }
  .doc-table { font-size: .64rem; table-layout: auto; }
  .doc-table th, .doc-table td { padding: 4px 4px; }
  .doc-table th:nth-child(1), .doc-table td:nth-child(1),
  .doc-table th:nth-child(5), .doc-table td:nth-child(5) { display: none; }
  .doc-table th:nth-child(2), .doc-table td:nth-child(2) { width: 38%; }
  .doc-table th:nth-child(3), .doc-table td:nth-child(3) { width: 16%; }
  .doc-table th:nth-child(4), .doc-table td:nth-child(4) { width: 18%; }
  .doc-table th:nth-child(6), .doc-table td:nth-child(6) { width: 28%; }
  .doc-table td:nth-child(2) { overflow-wrap: anywhere; }
}

.preview-connector {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: var(--bg2); border-right: 1px solid var(--line);
}
.connector-pulse {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--acc); color: var(--acc-ink);
  display: grid; place-items: center;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 55%, transparent); }
  70% { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.preview-col-1c { padding: 24px; }
.one-c-window { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.one-c-titlebar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.one-c-name { font-size: 15px; font-weight: 800; color: var(--fg); }
.one-c-btn-group { display: flex; gap: 8px; }
.one-c-btn { background: var(--card); border: 1px solid var(--line); color: var(--fg); padding: 4px 12px; font: 600 12px var(--m); border-radius: 99px; }
.one-c-btn.posted { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.one-c-fields-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.one-c-input-box { background: var(--card); border: 1px solid var(--line); padding: 9px 12px; border-radius: 10px; }
.one-c-lbl { font: 500 10.5px var(--m); color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.one-c-val { font-size: 14px; font-weight: 700; color: var(--fg); margin-top: 2px; }
.one-c-postings { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.postings-head { display: flex; justify-content: space-between; font: 500 11px var(--m); color: var(--mut); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .1em; }
.posting-row { display: flex; justify-content: space-between; gap: 10px; font: 13px var(--m); padding: 5px 0; border-bottom: 1px dashed var(--line); }
.posting-row:last-child { border-bottom: 0; }
.posting-dt-kt { color: var(--acc); }
.posting-sum { color: var(--fg); font-weight: 600; }

/* ---------- Секции ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; position: relative; }
.section-alt { background: var(--bg2); border-block: 1px solid var(--line); }

.section-head { text-align: left; max-width: 860px; margin: 0 0 56px; }
.section-title { font-size: clamp(30px, 4.6vw, 56px); margin: 18px 0 18px; max-width: 20ch; }
.section-subtitle { font-size: clamp(16px, 1.5vw, 19px); color: var(--mut); max-width: 62ch; }

/* Сетки карточек — общий стиль карточки oneswitch.ru */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 40px; }

.problem-card, .feature-card, .sec-card, .step-card, .article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .3s;
  display: flex;
  flex-direction: column;
}
.problem-card:hover, .feature-card:hover, .sec-card:hover, .step-card:hover, .article-card:hover {
  border-color: color-mix(in srgb, var(--acc) 55%, var(--line));
}
.article-card:hover { transform: translateY(-3px); }

.problem-num { font: 500 13px var(--m); color: var(--acc); margin-bottom: 36px; }
.problem-card-title { font-size: 21px; letter-spacing: -.02em; margin-bottom: 10px; }
.problem-card-desc { font-size: 15px; color: var(--mut); line-height: 1.55; }

.solution-box {
  background: var(--card);
  border: 1px solid var(--acc);
  box-shadow: 0 0 0 1px var(--acc), 0 24px 70px -34px var(--acc);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: center;
}
.solution-steps { list-style: none; display: grid; gap: 12px; }
.solution-step { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; color: var(--fg); }
.step-icon-check { color: var(--acc); font: 800 16px/1.6 var(--m); }

.solution-metric { background: var(--bg2); border: 1px solid var(--line); padding: 32px 24px; border-radius: var(--r); text-align: left; }
.metric-big { font: 800 clamp(40px, 4.6vw, 60px)/1 var(--f); letter-spacing: -.04em; color: var(--acc); margin-bottom: 10px; }
.metric-label { font-size: 15px; color: var(--mut); }

/* ---------- Скорость / видео ---------- */
.speed-box, .install-video-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.install-video-card { margin-top: 48px; padding: clamp(20px, 3vw, 36px); }

.speed-head-strip {
  padding: clamp(22px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px;
}
.speed-title-wrap { max-width: 680px; }
.speed-h3 { font-size: clamp(24px, 2.8vw, 36px); margin-top: 12px; }
.speed-digits-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.timer-display { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 20px; text-align: left; }
.timer-nums { font: 600 clamp(28px, 3vw, 40px)/1.1 var(--m); color: var(--acc); letter-spacing: -.03em; }
.timer-lbl { font: 500 11px var(--m); color: var(--mut); text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }

.speed-body-grid { display: grid; grid-template-columns: 1.25fr 1fr; padding: clamp(20px, 3vw, 40px); gap: clamp(24px, 4vw, 48px); align-items: center; }

.video-player-wrapper {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
.video-caption-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 14px; color: var(--mut); gap: 16px; flex-wrap: wrap; }
.video-rutube-link { color: var(--acc); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid currentColor; }
.video-rutube-link:hover { color: var(--fg); }

.video-poster-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 14%, transparent) 0%, var(--bg2) 70%);
  cursor: pointer;
}
.play-button {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--acc); color: var(--acc-ink);
  display: grid; place-items: center; font-size: 1.5rem; padding-left: 4px;
  transition: transform .25s, box-shadow .25s;
}
.video-poster-placeholder:hover .play-button { transform: scale(1.08); box-shadow: 0 10px 40px -8px var(--acc); }
.play-label { margin-top: 14px; font: 500 13px var(--m); color: var(--mut); }

.timeline-list { display: flex; flex-direction: column; gap: 16px; list-style: none; position: relative; }
.timeline-list::before { content: ''; position: absolute; left: 30px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline-item { display: flex; align-items: flex-start; gap: 18px; position: relative; }
.timeline-time {
  background: var(--card); border: 1px solid var(--line); color: var(--acc);
  font: 600 12px var(--m); padding: 4px 9px; border-radius: 99px; z-index: 1; flex-shrink: 0;
}
.timeline-content { flex: 1; }
.timeline-title { font-size: 16px; font-weight: 700; color: var(--fg); }
.timeline-desc { font-size: 14px; color: var(--mut); }

/* ---------- Возможности ---------- */
.features-direction { margin-bottom: 72px; }
.features-direction:last-child { margin-bottom: 0; }
.direction-header {
  margin-bottom: 32px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  border-bottom: 1px solid var(--line); padding-bottom: 20px;
}
.direction-title-wrap { max-width: 720px; }
.direction-h3 { font-size: clamp(24px, 3vw, 36px); margin-top: 12px; }

.features-cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-card { padding: 28px 24px; }
.feature-icon-box {
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--acc) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--line));
  display: grid; place-items: center; color: var(--acc); font-size: 1.2rem; margin-bottom: 28px;
}
.feature-title { font-size: 19px; letter-spacing: -.02em; margin-bottom: 10px; }
.feature-desc { font-size: 15px; color: var(--mut); line-height: 1.55; flex: 1; }

/* ---------- Безопасность ---------- */
.security-points-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 40px; }
.sec-card { border-left: 2px solid var(--acc); border-radius: 0 var(--r) var(--r) 0; }
.sec-card-title { font-size: 19px; margin: 14px 0 8px; }
.sec-card-desc { font-size: 15px; color: var(--mut); line-height: 1.55; }

.hardware-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hw-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.hw-table { width: 100%; border-collapse: collapse; }
.hw-table th {
  background: var(--bg2); text-align: left; padding: 14px 24px;
  font: 500 11.5px var(--m); color: var(--mut); text-transform: uppercase; letter-spacing: .1em;
  border-bottom: 1px solid var(--line);
}
.hw-table td { padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: 15px; }
.hw-table tr:last-child td { border-bottom: 0; }
.hw-env { font-weight: 700; color: var(--fg); }
.hw-specs { color: var(--mut); }
.hw-model { font: 13px var(--m); color: var(--acc); }
.hw-note { color: var(--acc2); }

/* ---------- Установка: шаги как на oneswitch.ru ---------- */
.install-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.step-card { border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 32px 28px; }
.step-card:last-child { border-right: 0; }
.step-card:hover { background: color-mix(in srgb, var(--acc) 5%, var(--card)); }
.step-num-big { font: 500 13px var(--m); color: var(--acc); margin-bottom: 40px; }
.step-title { font-size: 21px; margin-bottom: 10px; }
.step-desc { font-size: 15px; color: var(--mut); line-height: 1.55; }

/* ---------- Гарантия ---------- */
.guarantee-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 2px solid var(--acc);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: clamp(28px, 5vw, 56px);
}
.guarantee-quote { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; line-height: 1.25; color: var(--fg); margin: 20px 0 32px; max-width: 960px; letter-spacing: -.02em; }
.guarantee-conditions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.condition-item {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--fg);
  background: var(--bg2); padding: 16px 20px; border-radius: 14px; border: 1px solid var(--line);
}

/* ---------- Сравнение ---------- */
.comparison-wrapper { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.comp-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.comp-table th {
  background: var(--bg2); padding: 18px 24px; text-align: left;
  font: 500 12px var(--m); letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); color: var(--mut);
}
.comp-table th.col-highlight { background: color-mix(in srgb, var(--acc) 12%, var(--bg2)); color: var(--fg); box-shadow: inset 0 3px 0 var(--acc); }
.comp-table td { padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--mut); }
.comp-table tr:last-child td { border-bottom: 0; }
.comp-table td.col-highlight { background: color-mix(in srgb, var(--acc) 6%, transparent); color: var(--fg); font-weight: 700; }
.comp-param { color: var(--fg); font-weight: 700; }

/* ---------- FAQ: как на oneswitch.ru ---------- */
.faq-list { max-width: 860px; display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-question {
  width: 100%; background: transparent; border: none;
  padding: 24px 0; text-align: left;
  font-size: clamp(17px, 1.6vw, 20px); font-weight: 700; color: var(--fg);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq-icon { font: 400 28px/1 var(--m); color: var(--acc); transition: transform .3s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .3s ease-out;
  color: var(--mut); font-size: 16px; line-height: 1.65; max-width: 68ch;
}
.faq-item.open .faq-answer { max-height: 600px; padding-bottom: 24px; }

/* ---------- Финальный CTA ---------- */
.final-cta-section { padding: clamp(64px, 9vw, 110px) 0; }
.final-cta-card {
  background: var(--card);
  border: 1px solid var(--acc);
  border-radius: calc(var(--r) + 10px);
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 56px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--acc), 0 30px 90px -40px var(--acc);
}
.final-cta-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at 50% 0%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 65%);
}
.final-cta-card > * { position: relative; }
.cta-h2 { font-size: clamp(30px, 4.4vw, 54px); margin: 14px auto 16px; max-width: 20ch; }
.cta-sub { font-size: clamp(16px, 1.5vw, 19px); color: var(--mut); max-width: 60ch; margin: 0 auto 32px; }
.cta-buttons { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.cta-links-row { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; font: 13px var(--m); color: var(--mut); }
.cta-link-clean { color: var(--acc); border-bottom: 1px solid currentColor; }

/* ---------- База знаний ---------- */
.knowledge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.article-meta { display: flex; align-items: center; gap: 12px; font: 500 12px var(--m); color: var(--mut); margin-bottom: 18px; flex-wrap: wrap; }
.article-card-title { font-size: 21px; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 10px; }
.article-card-desc { font-size: 15px; color: var(--mut); line-height: 1.55; margin-bottom: 20px; flex: 1; }
.article-read-link { font: 600 13px var(--m); color: var(--acc); display: inline-flex; align-items: center; gap: 6px; }

.article-header { padding: clamp(40px, 6vw, 72px) 0 40px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 12.5px var(--m); color: var(--mut); margin-bottom: 22px; }
.breadcrumbs a { color: var(--mut); border-bottom: 1px solid var(--line); }
.breadcrumbs a:hover { color: var(--fg); border-color: var(--acc); }
.article-post-title { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 16px; max-width: 22ch; }

.article-body { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.75; color: color-mix(in srgb, var(--fg) 85%, var(--mut)); }
.article-body h2 { font-size: clamp(24px, 2.6vw, 32px); margin: 52px 0 18px; }
.article-body h3 { font-size: 22px; margin: 34px 0 14px; }
.article-body p { margin-bottom: 20px; }
.article-body a { color: var(--acc); border-bottom: 1px solid currentColor; }
.article-body strong { color: var(--fg); }
.article-body code { font: 14px var(--m); background: var(--bg2); padding: 1px 6px; border-radius: 5px; }
.article-body ul, .article-body ol { margin: 0 0 24px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--acc); }
.article-body blockquote { border-left: 2px solid var(--acc); padding: 4px 0 4px 20px; margin: 28px 0; color: var(--fg); }
.article-body table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 15px; }
.article-body th { background: var(--bg2); border: 1px solid var(--line); padding: 12px 16px; text-align: left; color: var(--fg); }
.article-body td { border: 1px solid var(--line); padding: 12px 16px; color: var(--mut); }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--bg2); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; margin-bottom: 48px; }
.footer-desc { font-size: 15px; color: var(--mut); max-width: 340px; margin: 16px 0 24px; line-height: 1.6; }
.footer-heading { font: 500 12px var(--m); color: var(--acc); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 15px; color: var(--mut); }
.footer-link:hover { color: var(--fg); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 24px; font: 13px var(--m); color: var(--mut);
}
.footer-bottom a:hover { color: var(--fg) !important; }

/* ---------- Модальные окна и формы ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px); max-width: 520px; width: 100%; position: relative;
  box-shadow: var(--shadow); max-height: calc(100vh - 40px); overflow-y: auto;
}
.modal-close { position: absolute; top: 16px; right: 18px; background: transparent; border: none; color: var(--mut); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: var(--fg); }
.modal-title { font-size: 26px; margin: 12px 0 8px; }
.modal-desc { font-size: 15px; color: var(--mut); margin-bottom: 24px; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font: 500 13px var(--m); color: var(--mut); margin-bottom: 7px; }
.form-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--fg);
  padding: 14px 16px; border-radius: 12px; font-size: 16px; outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--acc); }
input[type="range"] { accent-color: var(--acc); }

/* ---------- Адаптивность ---------- */
@media (max-width: 1140px) {
  .nav-menu {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--g) 20px;
  }
  .nav-menu.open { display: flex; }
  .nav-link { font-size: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-link.active::after { display: none; }
  .nav-link.active { color: var(--acc); }
  .mobile-toggle { display: grid; }
}

@media (max-width: 1024px) {
  .features-cards-grid, .security-points-grid { grid-template-columns: repeat(2, 1fr); }
  .install-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .step-card:nth-child(2) { border-right: 0; }
  .step-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-col-source { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-connector { display: none; }
  .solution-box, .speed-body-grid { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: 0; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .problem-grid, .features-cards-grid, .security-points-grid, .knowledge-grid { grid-template-columns: 1fr; }
  .install-steps-grid { grid-template-columns: 1fr; }
  .step-card { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .step-card:last-child { border-bottom: 0; }
  .guarantee-conditions-grid { grid-template-columns: 1fr; }
  .direction-header { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .one-c-fields-grid { grid-template-columns: 1fr; }
  /* Инлайн-сетки из шаблонов (калькулятор, контакты, триал и т.п.) — в одну колонку */
  main [style*="grid-template-columns"], footer [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  main [style*="display:flex"], main [style*="display: flex"], footer [style*="display:flex"], footer [style*="display: flex"] { flex-wrap: wrap; }
  .btn { white-space: normal; }
  /* Широкие таблицы — горизонтальная прокрутка внутри блока, а не всей страницы */
  .hardware-box { overflow-x: auto; }
  main table:not(.doc-table) { display: block; overflow-x: auto; max-width: 100%; }
}

@media (max-width: 640px) {
  .header-actions .btn { display: none; }
  .hero-header .badge::before { display: none; }
  .hero-header .badge { justify-content: center; letter-spacing: .1em; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .logo { font-size: 17px; }
  .header-actions .btn { padding: 8px 14px; font-size: 13px; }
  .stat-item { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
