/* Альтоматика — общее для всех страниц: цвета (светлая и тёмная тема), шапка с меню, подвал, окно заявки. Версия 1.1.0
   Шапка одна и та же на каждой странице: одинаковые ширина, высота, логотип и пункты — при переходах ничего не прыгает. */
:root {
  --bg: #ffffff; --surface: #ffffff; --tile: #f5f6fa; --ink: #1c1f2e; --soft: #4a4f63; --muted: #70758a; --line: #e4e6ef;
  --brand: #33398a; --brand-2: #4a62a4; --brand-ink: #33398a; --yellow: #ffe600; --yellow-2: #f7d900;
  --field: #ffffff; --field-line: #cfd3e2; --head-bg: #ffffff; --shadow: rgba(28, 31, 46, .08);
  --page: 1296px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  /* Ступени тёмной темы: фон → карточка → плитка внутри карточки, у карточек постоянная голубая обводка */
  :root {
    --bg: #0e1230; --surface: #1f285e; --tile: #2a3474; --ink: #eef0fb; --soft: #c5cbe8; --muted: #9aa2ca; --line: #36428a;
    --brand-ink: #b3c1ff; --field: #161d48; --field-line: #4656a8; --head-bg: #141a42; --shadow: rgba(0, 0, 0, .45);
    --card-line: #4a5cb8; --card-hover: #a9b9ff;
    --ink-soft: #c5cbe8; --bg-soft: #1f285e;          /* имена переменных страниц решений */
    color-scheme: dark;
  }
  /* Страницы решений (altonik.html и др.): блоки, заданные белым */
  .mode, .price__box, .chat, .node { background: var(--surface); border-color: var(--card-line); }
  .mode:hover, .price__box:hover, .node:hover { border-color: var(--card-hover); }
  .msg--bot { background: var(--tile); border-color: var(--card-line); color: var(--soft); }
  .msg--bot b, article strong, .day b, .mode b { color: var(--ink); }
  .msg-btn { background: transparent; color: var(--brand-ink); border-color: var(--brand-ink); }
  .msg-btn--main { background: var(--brand); color: #fff; border-color: var(--brand); }
  .label { background: #2f3a80; color: var(--brand-ink); }
  .btn--ghost { background: transparent; color: var(--brand-ink); box-shadow: inset 0 0 0 1.5px var(--brand-ink); }
  .mode__tag, .mode a, article a:not(.btn) { color: var(--brand-ink); }
  .btn--y { color: #1c1f2e; }
  .day { border-left-color: var(--brand-ink); }
  figure, .zoom img { background: #e9ecf7; }
}
/* Полоса прокрутки всегда занимает своё место — ширина страницы не меняется при переходах */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
body { background: var(--bg); color: var(--ink); }

/* ---------- Шапка ---------- */
.sh { position: sticky; top: 0; z-index: 800; background: var(--head-bg); border-bottom: 1px solid var(--line); transition: transform .25s ease, box-shadow .25s ease; font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sh.is-float { box-shadow: 0 6px 18px var(--shadow); }
.sh.is-hidden { transform: translateY(-100%); box-shadow: none; }
.sh__in { max-width: var(--page); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; min-height: 78px; }
.sh__logo img { height: 54px; width: auto; display: block; border-radius: 4px; }
.sh__nav { display: flex; align-items: center; gap: 24px; font-size: 16px; }
.sh__nav > a, .sh__top { text-decoration: none; color: var(--ink); white-space: nowrap; padding: 6px 0; display: inline-flex; align-items: center; gap: 5px; }
.sh__nav > a:hover, .sh__top:hover, .sh__dd:focus-within .sh__top { color: var(--brand-ink); }
/* Текущий раздел — цветом и подчёркиванием, без жирного: ширина пунктов одинаковая на всех страницах */
.sh__nav a[aria-current="page"], .sh__dd.is-current .sh__top { color: var(--brand-ink); box-shadow: inset 0 -3px 0 var(--yellow); }
.sh__top i { font-style: normal; font-size: .7em; opacity: .7; transition: transform .15s; }
.sh__dd { position: relative; }
.sh__dd:hover .sh__top i, .sh__dd:focus-within .sh__top i { transform: rotate(180deg); }
.sh__menu { position: absolute; left: -14px; top: 100%; min-width: 320px; padding: 8px; margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.sh__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }  /* мостик: меню не закрывается, пока ведёшь мышь */
.sh__dd:hover .sh__menu, .sh__dd:focus-within .sh__menu, .sh__dd.is-open .sh__menu { opacity: 1; visibility: visible; transform: none; }
.sh__menu a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.sh__menu a:hover, .sh__menu a:focus-visible { background: var(--tile); outline: none; }
.sh__menu b { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.sh__menu span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.sh__tel { margin-left: auto; font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--ink); }
.sh__cta { background: var(--yellow); color: #1c1f2e; font-weight: 700; font-size: 15px; text-decoration: none; padding: 11px 20px; border-radius: 4px; white-space: nowrap; }
.sh__cta:hover { background: var(--yellow-2); }
.sh__burger { display: none; margin-left: auto; font: inherit; font-size: 15px; font-weight: 700; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.sh__panel { display: none; }

@media (max-width: 1300px) { .sh__in { gap: 22px; } .sh__nav { gap: 18px; font-size: 15px; } }
@media (max-width: 1180px) { .sh__tel { display: none; } .sh__cta { margin-left: auto; } }
@media (max-width: 1040px) { .sh__in { gap: 16px; } .sh__nav { gap: 14px; font-size: 14.5px; } .sh__cta { display: none; } }
@media (max-width: 880px) {
  .sh__nav { display: none; }
  .sh__burger { display: inline-block; }
  .sh__in { padding: 10px 16px; min-height: 72px; }
  .sh__logo img { height: 50px; }
  .sh__panel { display: block; max-height: 0; overflow: hidden; transition: max-height .25s ease; background: var(--head-bg); }
  .sh.is-menu .sh__panel { max-height: 80vh; overflow: auto; border-top: 1px solid var(--line); }
  .sh__panel nav { padding: 6px 16px 14px; display: grid; }
  .sh__panel a { padding: 11px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 16px; }
  .sh__panel a.sub { padding-left: 20px; font-size: 15px; color: var(--soft); }
  .sh__panel a[aria-current="page"] { color: var(--brand-ink); font-weight: 700; }
  .sh__panel .sh__cta { margin-top: 12px; text-align: center; border-bottom: 0; color: #1c1f2e; }
}

/* ---------- «Будьте с нами»: закладки и Telegram — один раз, не чаще раза в неделю ---------- */
.join { position: fixed; left: 20px; bottom: 20px; z-index: 850; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px var(--shadow), 0 2px 8px var(--shadow); padding: 16px 16px 12px; font: 15px/1.4 "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s; }
.join.is-on { opacity: 1; transform: none; }
.join h3 { font-size: 16.5px; font-weight: 800; margin: 0 26px 4px 0; color: var(--brand-ink); }
.join p { font-size: 13.5px; color: var(--soft); margin: 0 0 10px; }
.join__x { position: absolute; right: 8px; top: 6px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 6px; cursor: pointer; }
.join__x:hover { color: var(--ink); }
.join a, .join__fav { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; text-decoration: none; color: var(--ink); background: var(--tile); border: 0; border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.join a:hover, .join__fav:hover { box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.join a i, .join__fav i { font-style: normal; font-size: 18px; width: 22px; text-align: center; }
.join a span, .join__fav span { display: block; }
.join small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.join kbd { font: inherit; font-size: 12px; border: 1px solid var(--field-line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--field); color: var(--ink); }
.join__later { display: block; margin: 4px auto 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
@media (prefers-color-scheme: dark) { .join { border-color: var(--card-line); } }
@media (max-width: 640px) { .join { left: 16px; right: 16px; bottom: 16px; width: auto; } }
@media print { .join { display: none; } }

/* ---------- Подвал ---------- */
.sf { max-width: var(--page); margin: 0 auto; padding: 28px 24px 18px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid var(--line); font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sf a { color: inherit; }
/* Подписка на почту — в подвале и в карточке «Будьте с нами» */
.subs { flex: 1 1 100%; margin-bottom: 10px; }
.subs label { display: block; font-size: 14px; color: var(--soft); margin-bottom: 6px; }
.subs label b { color: var(--ink); }
.subs__row { display: flex; gap: 8px; max-width: 520px; }
.subs input[type=email] { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); }
.subs input[type=email]:focus { outline: 2px solid var(--brand-2); border-color: var(--brand-2); }
.subs button { font: inherit; font-size: 15px; font-weight: 700; border: 0; border-radius: 10px; padding: 9px 16px; background: var(--brand); color: #fff; cursor: pointer; white-space: nowrap; }
.subs button:disabled { opacity: .6; cursor: default; }
.subs__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.subs__msg { font-size: 13.5px; margin-top: 6px; min-height: 0; }
.subs__msg.ok { color: #0a8a5c; } .subs__msg.err { color: #c0392b; }
@media (prefers-color-scheme: dark) { .subs__msg.ok { color: #5fe0a8; } .subs__msg.err { color: #ff8a80; } .subs button { background: #4a5cb8; } }
.join .subs { margin: 2px 0 6px; } .join .subs label { font-size: 13px; } .join .subs__row { max-width: none; }
.sf a:hover { color: var(--brand-ink); }
@media (max-width: 640px) { .sf { padding: 22px 16px 14px; } }
@media print { .sh { display: none; } }

/* ---------- Окно заявки со страницы решения (site.js 1.1.0) ---------- */
html.ldm-open { overflow: hidden; }
.ldm-bg { position: fixed; inset: 0; z-index: 900; background: rgba(14, 18, 48, .55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.ldm { position: relative; width: 440px; max-width: 100%; margin: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px var(--shadow); padding: 20px 20px 16px; font: 15px/1.45 "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.ldm h3 { margin: 0 30px 4px 0; font-size: 19px; font-weight: 800; color: var(--brand-ink); line-height: 1.25; }
.ldm__sub { margin: 0 0 12px; font-size: 14px; color: var(--soft); }
.ldm__x { position: absolute; right: 8px; top: 6px; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; padding: 6px 8px; cursor: pointer; }
.ldm__x:hover { color: var(--ink); }
.ldm__acts { border: 0; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ldm__acts legend { font-size: 13px; font-weight: 600; color: var(--soft); margin-bottom: 6px; padding: 0; }
.ldm__act { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 14px; background: var(--field); }
.ldm__act input { margin: 0; accent-color: var(--brand); }
.ldm__act:has(input:checked) { border-color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ink); font-weight: 600; }
.ldm__f { display: block; margin: 0 0 9px; }
.ldm__f span { display: block; font-size: 13px; font-weight: 600; color: var(--soft); margin-bottom: 3px; }
.ldm__f input, .ldm__f textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: var(--field); border: 1.5px solid var(--field-line); border-radius: 10px; padding: 9px 11px; }
.ldm__f textarea { resize: vertical; min-height: 54px; }
.ldm__f input:focus, .ldm__f textarea:focus { outline: none; border-color: var(--brand-ink); }
.ldm__f.bad input { border-color: #c0392b; }
.ldm__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ldm__send { display: block; width: 100%; margin-top: 4px; border: 0; border-radius: 10px; padding: 12px 16px; background: var(--yellow); color: #1c1f2e; font: inherit; font-weight: 700; cursor: pointer; }
.ldm__send:hover { background: var(--yellow-2); }
.ldm__send:disabled { opacity: .7; cursor: default; }
.ldm__msg { margin: 8px 0 0; font-size: 13.5px; min-height: 0; }
.ldm__msg.err { color: #c0392b; }
.ldm__alt { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.ldm__alt a { color: var(--brand-ink); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .ldm { border-color: var(--card-line); } .ldm__msg.err, .ldm__f.bad input { color: #ff8a80; border-color: #ff8a80; } }
@media (max-width: 420px) { .ldm__acts { grid-template-columns: 1fr; } .ldm { padding: 18px 16px 14px; } }