/* Принципы оформления пульта (все 5 тем держатся на них, разметка разделов не копируется):
   1. Контраст: текст и статусы читаются на фоне своей темы (светлый текст на светлом и тёмный на тёмном не используются).
   2. Иерархия: шапка и меню тише карточек, заголовок раздела с полосой семейства, главное действие — primary-кнопка.
   3. Сетка 8px: отступы, радиусы и промежутки кратны 8 (4px — только для плотных подписей и пилюль).
   4. Focus: видимое кольцо на кнопках, полях, ссылках и карточках выбора; не убирать обводку.
   5. Читаемый текст: основной 15px, вторичный через --mut, заголовки 16–23px, без серого на сером.
   6. Статусы: --ok хорошо, --warn внимание, --bad проблема. Смысл цвета не меняется между темами.
   Семейства разделов (body[data-fam] → --fam) сохраняются, но палитра --ds-* подстраивается под тему.
   Тема standard не переопределяет токены: это текущий тёмный indigo/slate из :root (ds.css + hub.css).
   В мини-приложении Telegram (body.tg / html.tg-light) эти темы не включаются. */

html[data-theme=standard]:not(.tg-light) body:not(.tg){
  /* дефолт: правила ниже стандарт не перекрашивают */
}

/* ----- Классика светлая: белый кабинет, чёткие границы, мягкая тень ----- */
html[data-theme=classic-light]:not(.tg-light){color-scheme:light}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg){
  --ds-bg:#f3f5f8;--bg:#f3f5f8;--ds-card:#ffffff;--card:#ffffff;--ds-card2:#f8fafc;
  --ds-line:#d5dce6;--line:#d5dce6;--ds-txt:#152033;--txt:#152033;--ds-mut:#5c6b80;--mut:#5c6b80;
  --ds-blue:#1d4ed8;--ds-violet:#6d28d9;--ds-teal:#0f766e;--ds-green:#15803d;--ds-amber:#b45309;--ds-gold:#a16207;
  --ds-red:#b91c1c;--ds-cyan:#0e7490;--ds-indigo:#4338ca;--ds-pink:#be185d;--ds-slate:#475569;--ds-purple:#7e22ce;
  --acc:#1d4ed8;--ok:#157347;--warn:#b45309;--bad:#b42318;--link:#1d4ed8;
  --ds-shadow:0 1px 2px #0f172a0d,0 8px 24px #0f172a12;--ds-r:12px;
  --header-bg:#ffffff;--header-line:#d5dce6;--header-shine-op:0;
  --header-shadow:0 1px 0 #e8edf4,0 8px 22px #0f172a0e;
  --nav-bg:#f7f8fb;--nav-mix:#f3f5f8;--nav-on-fg:#152033;--nav-on-mix:#ffffff;--nav-hover:#e8eef6;
  --input-bg:#ffffff;--input-fg:#152033;--input-line:#c5d0de;
  --code-bg:#f4f7fb;--code-fg:#152033;--toast-bg:#152033;--toast-fg:#f8fafc;
  --chip-bg:#ffffff;--chip-on:#e7eefc;--chip-on-mix:#ffffff;
  --ghost-bg:#ffffff;--ghost-hover:#f3f6fb;--ghost-fg:#152033;
  --btn-primary:linear-gradient(180deg,#3b82f6,#1d4ed8);--btn-primary-fg:#fff;
  --btn-success:linear-gradient(180deg,#22a35a,#157347);--btn-success-fg:#fff;
  --btn-warn:linear-gradient(180deg,#e0a024,#b45309);--btn-warn-fg:#1b1200;
  --btn-danger:linear-gradient(180deg,#e5484d,#b42318);--btn-danger-fg:#fff;
  --btn-shadow:0 1px 0 #ffffffcc inset,0 1px 2px #0f172a14;
  --pill-ok-bg:#dcfce7;--pill-ok-fg:#166534;--pill-warn-bg:#fef3c7;--pill-warn-fg:#92400e;
  --pill-bad-bg:#fee2e2;--pill-bad-fg:#991b1b;--pill-demo-bg:#ede9fe;--pill-demo-fg:#5b21b6;
  --pill-mut-bg:#e8edf3;--pill-mut-fg:#334155;
  --zebra:#f6f8fb;--row-hover:#e8eef8;--th-bg:#eef3f9;--th-mix:#1e293b;--card-h-mix:#102033;
  --focus:#1d4ed8;--bell-bg:#f4f7fb;--bell-fg:#152033;--prog-bg:#eef4fd;
  --danger-bg:#fff5f5;--danger-line:#fca5a5;--demo-bg:#f5f3ff;--demo-fg:#4c1d95;--demo-line:#c4b5fd;
  --sev-critical:#dc2626;--sev-warning:#b45309;--sev-ok:#15803d;--money:#a16207;
  --hdr-time:#64748b;--hdr-time-strong:#1e293b;--hdr-zone:#1d4ed8;
  --speed-fg:#92400e;--speed-bg:#fffbeb;--speed-line:#f59e0b;--speed-hover:#fef3c7;
  --srv-bg:#ffffff;--srv-line:#d5dce6;--bar:#ffffff;--modal-bg:rgba(15,23,42,.45);
  --badge-ok-fg:#166534;--badge-ok-bg:#dcfce7;--badge-ok-line:#86efac;
  --badge-warn-fg:#92400e;--badge-warn-bg:#fef3c7;--badge-warn-line:#fcd34d;
  --badge-bad-fg:#991b1b;--badge-bad-bg:#fee2e2;--badge-bad-line:#fca5a5;
  --badge-info-fg:#1e40af;--badge-info-bg:#dbeafe;--badge-info-line:#93c5fd;--badge-mut-bg:#e8edf3;
  --ghost-danger-fg:#b42318;--ghost-danger-line:#f1a8a8;--ghost-ok-fg:#157347;--ghost-ok-line:#86efac;
  --pfx-g-bg:rgba(15,23,42,.04);--pfx-g-line:rgba(15,23,42,.12);
  --pfx-diag-fg:#0369a1;--pfx-diag-line:rgba(3,105,161,.45);--pfx-diag-hover:rgba(3,105,161,.08);
  --pfx-speed-fg:#92400e;--pfx-speed-line:rgba(180,83,9,.4);--pfx-speed-hover:rgba(180,83,9,.08);
  --g-main:#64748b;--g-sites:#0f766e;--g-manage:#1d4ed8;--g-monitor:#b45309;--g-analytics:#6d28d9;--g-personal:#be185d;--g-help:#0e7490;
}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) .card{box-shadow:var(--ds-shadow)}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) .card:hover{border-color:#b7c3d4}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) th{color:#1e293b;background:#eef3f9}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) .kpi .card{box-shadow:var(--ds-shadow)}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg).hdr201 .hdrstat{background:color-mix(in srgb,var(--hc) 12%,#fff);color:#152033}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) .nbed,
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) .diag-log{background:var(--code-bg);color:var(--txt)}
html[data-theme=classic-light]:not(.tg-light) body:not(.tg) nav a.nav-infodrive{color:var(--link)}

/* ----- Спокойный нейтрал: тёплый камень и шалфей, низкий цветовой шум ----- */
html[data-theme=calm-neutral]:not(.tg-light){color-scheme:light}
html[data-theme=calm-neutral]:not(.tg-light) body:not(.tg){
  --ds-bg:#e7e3d8;--bg:#e7e3d8;--ds-card:#f7f4ec;--card:#f7f4ec;--ds-card2:#efece3;
  --ds-line:#d3cec1;--line:#d3cec1;--ds-txt:#2a312b;--txt:#2a312b;--ds-mut:#667064;--mut:#667064;
  --ds-blue:#4d6d86;--ds-violet:#6e6480;--ds-teal:#4f7368;--ds-green:#5d7350;--ds-amber:#8a6a3d;--ds-gold:#8d7344;
  --ds-red:#8a4e48;--ds-cyan:#4e7374;--ds-indigo:#5d6578;--ds-pink:#8a5d6c;--ds-slate:#6d675c;--ds-purple:#6e5e78;
  --acc:#4f6f56;--ok:#3d6a4a;--warn:#8d6232;--bad:#8a4540;--link:#3d5c4a;
  --ds-shadow:0 1px 2px #3a34280f,0 10px 28px #3a342814;--ds-r:12px;
  --header-bg:#ddd8cb;--header-line:#cfc8b8;--header-shine-op:0;
  --header-shadow:0 1px 0 #fff6,0 8px 20px #3a342812;
  --nav-bg:#e3dfd4;--nav-mix:#e7e3d8;--nav-on-fg:#243028;--nav-on-mix:#f7f4ec;--nav-hover:#ddd8cb;
  --input-bg:#fbf9f4;--input-fg:#2a312b;--input-line:#c9c2b2;
  --code-bg:#efeae0;--code-fg:#2a312b;--toast-bg:#2f3832;--toast-fg:#f4f1ea;
  --chip-bg:#efece3;--chip-on:#e0ddd2;--chip-on-mix:#f7f4ec;
  --ghost-bg:#f7f4ec;--ghost-hover:#efe8da;--ghost-fg:#2a312b;
  --btn-primary:linear-gradient(180deg,#6d8b72,#4f6f56);--btn-primary-fg:#f7f4ec;
  --btn-success:linear-gradient(180deg,#5e8a66,#3d6a4a);--btn-success-fg:#f7f4ec;
  --btn-warn:linear-gradient(180deg,#c49a62,#8d6232);--btn-warn-fg:#2a2116;
  --btn-danger:linear-gradient(180deg,#b56d66,#8a4540);--btn-danger-fg:#fff;
  --btn-shadow:0 1px 0 #ffffffa8 inset;
  --pill-ok-bg:#e3f0e4;--pill-ok-fg:#245533;--pill-warn-bg:#f6ead4;--pill-warn-fg:#6b4a1e;
  --pill-bad-bg:#f6e4e1;--pill-bad-fg:#7a332e;--pill-demo-bg:#ece6f2;--pill-demo-fg:#534560;
  --pill-mut-bg:#e7e2d6;--pill-mut-fg:#5c564c;
  --zebra:#f1eee6;--row-hover:#e7efe6;--th-bg:#e6e1d4;--th-mix:#2a312b;--card-h-mix:#243028;
  --focus:#3d5c46;--bell-bg:#f7f4ec;--bell-fg:#2a312b;--prog-bg:#efece3;
  --danger-bg:#f8efec;--danger-line:#c9a19c;--demo-bg:#f3efe6;--demo-fg:#3d4638;--demo-line:#8a917c;
  --sev-critical:#8a3e38;--sev-warning:#8a5a20;--sev-ok:#2f6a42;--money:#7a5b24;
  --hdr-time:#5c675c;--hdr-time-strong:#2a312b;--hdr-zone:#4f6f56;
  --speed-fg:#7a5420;--speed-bg:#f6edd9;--speed-line:#c4a36a;--speed-hover:#f3e2c2;
  --srv-bg:#ddd8cb;--srv-line:#cfc8b8;--bar:#ddd8cb;--modal-bg:rgba(42,49,43,.45);
  --badge-ok-fg:#245533;--badge-ok-bg:#e3f0e4;--badge-ok-line:#b7d7bc;
  --badge-warn-fg:#6b4a1e;--badge-warn-bg:#f6ead4;--badge-warn-line:#e2c89a;
  --badge-bad-fg:#7a332e;--badge-bad-bg:#f6e4e1;--badge-bad-line:#e4b8b2;
  --badge-info-fg:#3d5348;--badge-info-bg:#e4eee6;--badge-info-line:#c5d6c8;--badge-mut-bg:#efece3;
  --ghost-danger-fg:#8a3e38;--ghost-danger-line:#c98983;--ghost-ok-fg:#2f6a42;--ghost-ok-line:#8fb89a;
  --pfx-g-bg:rgba(79,111,86,.08);--pfx-g-line:rgba(79,111,86,.22);
  --pfx-diag-fg:#3d5c4a;--pfx-diag-line:rgba(79,111,86,.45);--pfx-diag-hover:rgba(79,111,86,.12);
  --pfx-speed-fg:#7a5420;--pfx-speed-line:rgba(141,98,50,.45);--pfx-speed-hover:rgba(141,98,50,.12);
  --g-main:#6d675c;--g-sites:#4f6f56;--g-manage:#4d6d86;--g-monitor:#8a6a3d;--g-analytics:#6e6480;--g-personal:#8a5d6c;--g-help:#4e7374;
}
html[data-theme=calm-neutral]:not(.tg-light) body:not(.tg) th{color:#2a312b;background:#e6e1d4}
html[data-theme=calm-neutral]:not(.tg-light) body:not(.tg).hdr201 .hdrstat{background:color-mix(in srgb,var(--hc) 16%,#f7f4ec);color:#2a312b}
html[data-theme=calm-neutral]:not(.tg-light) body:not(.tg) .nbed,
html[data-theme=calm-neutral]:not(.tg-light) body:not(.tg) .diag-log{background:var(--code-bg);color:var(--txt)}
html[data-theme=calm-neutral]:not(.tg-light) body:not(.tg) nav a.nav-infodrive{color:var(--link)}

/* ----- Хакерская консоль: сетка, моно, неон. Анимации только здесь ----- */
html[data-theme=hacker]:not(.tg-light){color-scheme:dark}
html[data-theme=hacker]:not(.tg-light) body:not(.tg){
  --ds-bg:#05080c;--bg:#05080c;--ds-card:#071410;--card:#071410;--ds-card2:#0b1c16;
  --ds-line:#134033;--line:#134033;--ds-txt:#c8ffe4;--txt:#c8ffe4;--ds-mut:#6fbf97;--mut:#6fbf97;
  --ds-blue:#3ee0ff;--ds-violet:#c084fc;--ds-teal:#2ee6a6;--ds-green:#39ff88;--ds-amber:#e7ff5a;--ds-gold:#d6ff4a;
  --ds-red:#ff4d6a;--ds-cyan:#3ee0ff;--ds-indigo:#67e8f9;--ds-pink:#ff7ab6;--ds-slate:#7d8c86;--ds-purple:#d8b4fe;
  --acc:#3ee0ff;--ok:#39ff88;--warn:#e7ff5a;--bad:#ff4d6a;--link:#7af6ff;
  --ds-shadow:0 0 0 1px #39ffb014,0 10px 28px #000a;--ds-r:8px;
  --header-bg:linear-gradient(90deg,#030605,#06140f 50%,#031018);--header-line:#145c45;
  --header-shine:linear-gradient(90deg,transparent,#39ffb0 30%,#3ee0ff 70%,transparent);--header-shine-op:.7;
  --header-shadow:0 0 18px #39ffb022;
  --nav-bg:#040a08;--nav-mix:#05080c;--nav-on-fg:#eafff6;--nav-on-mix:#071410;--nav-hover:#0c2218;
  --input-bg:#040c09;--input-fg:#d8ffe9;--input-line:#1c6b52;
  --code-bg:#030806;--code-fg:#b6ffd8;--toast-bg:#03110c;--toast-fg:#d8ffe9;
  --chip-bg:#07140f;--chip-on:#0e2a20;--chip-on-mix:#071410;
  --ghost-bg:#07140f;--ghost-hover:#0e2a20;--ghost-fg:#c8ffe4;
  --btn-primary:linear-gradient(180deg,#5dffe0,#14c8a0);--btn-primary-fg:#04140c;
  --btn-success:linear-gradient(180deg,#5dff9a,#18c964);--btn-success-fg:#04140c;
  --btn-warn:linear-gradient(180deg,#f4ff7a,#c6e032);--btn-warn-fg:#141800;
  --btn-danger:linear-gradient(180deg,#ff7a90,#e11d48);--btn-danger-fg:#fff;
  --btn-shadow:0 0 0 1px #39ffb055;
  --pill-ok-bg:#06331c;--pill-ok-fg:#7dffa8;--pill-warn-bg:#2c3208;--pill-warn-fg:#f4ff7a;
  --pill-bad-bg:#3a0c16;--pill-bad-fg:#ff9aab;--pill-demo-bg:#1a1030;--pill-demo-fg:#e9d5ff;
  --pill-mut-bg:#0c1a14;--pill-mut-fg:#8fbfa6;
  --zebra:transparent;--row-hover:#39ffb014;--th-bg:#39ffb00f;--th-mix:#b7f7d4;--card-h-mix:#eafff6;
  --focus:#3ee0ff;--bell-bg:#07140f;--bell-fg:#c8ffe4;--prog-bg:#07140f;
  --danger-bg:linear-gradient(180deg,#240810,#071410);--danger-line:#ff4d6a;
  --demo-bg:#100818;--demo-fg:#f5d0fe;--demo-line:#c084fc;
  --sev-critical:#ff8fa3;--sev-warning:#f4ff7a;--sev-ok:#7dffa8;--money:#f4ff7a;
  --hdr-time:#6fbf97;--hdr-time-strong:#d8ffe9;--hdr-zone:#3ee0ff;
  --speed-fg:#e7ff5a;--speed-bg:#101806;--speed-line:#c6e032;--speed-hover:#e7ff5a22;
  --srv-bg:linear-gradient(90deg,#030605,#06140f);--srv-line:#145c45;--bar:#030605;--modal-bg:rgba(0,0,0,.72);
  --badge-ok-fg:#7dffa8;--badge-ok-bg:#39ff8818;--badge-ok-line:#39ff8866;
  --badge-warn-fg:#f4ff7a;--badge-warn-bg:#e7ff5a18;--badge-warn-line:#e7ff5a66;
  --badge-bad-fg:#ff9aab;--badge-bad-bg:#ff4d6a18;--badge-bad-line:#ff4d6a66;
  --badge-info-fg:#9aefff;--badge-info-bg:#3ee0ff18;--badge-info-line:#3ee0ff66;--badge-mut-bg:#0c1a14;
  --ghost-danger-fg:#ff9aab;--ghost-danger-line:#ff4d6a88;--ghost-ok-fg:#7dffa8;--ghost-ok-line:#39ff8888;
  --pfx-g-bg:rgba(57,255,176,.06);--pfx-g-line:rgba(57,255,176,.28);
  --pfx-diag-fg:#7af6ff;--pfx-diag-line:rgba(62,224,255,.6);--pfx-diag-hover:rgba(62,224,255,.12);
  --pfx-speed-fg:#e7ff5a;--pfx-speed-line:rgba(231,255,90,.5);--pfx-speed-hover:rgba(231,255,90,.12);
  --g-main:#6fbf97;--g-sites:#39ff88;--g-manage:#3ee0ff;--g-monitor:#e7ff5a;--g-analytics:#c084fc;--g-personal:#ff7ab6;--g-help:#2ee6a6;
  font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono",Menlo,Consolas,monospace;
  background-color:#05080c;
  background-image:linear-gradient(rgba(80,255,190,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(80,255,190,.05) 1px,transparent 1px);
  background-size:24px 24px,24px 24px;
  background-attachment:fixed;
}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main{position:relative}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main::after{
  content:"";pointer-events:none;position:absolute;left:0;right:0;top:0;height:96px;
  background:linear-gradient(to bottom,transparent,rgba(57,255,176,.07),transparent);
  animation:hackerSweep 3.6s linear infinite;
}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main.theme-enter{animation:hackerIn .42s ease}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main.hacker-tab{animation:hackerTab .32s ease}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .hub-loading{
  position:relative;overflow:hidden;display:block;padding:16px 12px;border:1px solid var(--line);
  background:color-mix(in srgb,var(--acc) 8%,var(--card));
}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .hub-loading-bar{
  display:block;position:absolute;left:0;top:0;bottom:0;width:42%;
  background:linear-gradient(90deg,transparent,var(--acc),transparent);animation:hackerScan 1.15s linear infinite;
}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .pfx-dot,
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .hdot{animation:hackerLive 1.15s ease-in-out infinite}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) button:not(.ghost):hover,
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .btn:not(.ghost):hover,
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .tabs button:hover,
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .theme-opt:hover,
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .glue-site:hover{
  box-shadow:0 0 0 1px color-mix(in srgb,var(--acc) 70%,transparent),0 0 16px color-mix(in srgb,var(--acc) 35%,transparent);
}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) nav a:hover,
html[data-theme=hacker]:not(.tg-light) body:not(.tg) nav a.on{
  box-shadow:inset 3px 0 0 var(--acc),0 0 12px color-mix(in srgb,var(--acc) 28%,transparent);
}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .tabs button{transition:box-shadow .2s,background .2s,border-color .2s}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) .tabs button.on{box-shadow:0 0 12px color-mix(in srgb,var(--gcur,var(--acc)) 45%,transparent)}
html[data-theme=hacker]:not(.tg-light) body:not(.tg) #srvBar .pfx-g{
  background:linear-gradient(180deg,rgba(57,255,176,.1),rgba(57,255,176,.03));
}
@keyframes hackerIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes hackerTab{from{opacity:.35;transform:translateX(8px)}to{opacity:1;transform:none}}
@keyframes hackerScan{from{transform:translateX(-120%)}to{transform:translateX(280%)}}
@keyframes hackerSweep{from{transform:translateY(-120px)}to{transform:translateY(70vh)}}
@keyframes hackerLive{
  0%,100%{box-shadow:0 0 0 0 rgba(57,255,176,.65)}
  70%{box-shadow:0 0 0 8px rgba(57,255,176,0)}
}
@media (prefers-reduced-motion:reduce){
  html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main::after,
  html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main.theme-enter,
  html[data-theme=hacker]:not(.tg-light) body:not(.tg) #main.hacker-tab,
  html[data-theme=hacker]:not(.tg-light) body:not(.tg) .hub-loading-bar,
  html[data-theme=hacker]:not(.tg-light) body:not(.tg) .pfx-dot,
  html[data-theme=hacker]:not(.tg-light) body:not(.tg) .hdot{animation:none}
}

/* ----- Строгий: плоский графит, один латунный акцент, без декора ----- */
html[data-theme=strict]:not(.tg-light){color-scheme:dark}
html[data-theme=strict]:not(.tg-light) body:not(.tg){
  --ds-bg:#1c1e22;--bg:#1c1e22;--ds-card:#26282d;--card:#26282d;--ds-card2:#2e3136;
  --ds-line:#3c3f46;--line:#3c3f46;--ds-txt:#eceae6;--txt:#eceae6;--ds-mut:#a3a097;--mut:#a3a097;
  --ds-blue:#8d97a3;--ds-violet:#9a93a1;--ds-teal:#8aa399;--ds-green:#8fa58a;--ds-amber:#b79a72;--ds-gold:#a68462;
  --ds-red:#b58984;--ds-cyan:#8aa3a6;--ds-indigo:#9197a3;--ds-pink:#a89098;--ds-slate:#8e8c88;--ds-purple:#9a93a1;
  --acc:#a68462;--ok:#8fa58a;--warn:#c4a36a;--bad:#c47c74;--link:#cbb89a;
  --ds-shadow:none;--ds-r:2px;
  --header-bg:#16181b;--header-line:#3c3f46;--header-shine-op:0;--header-shadow:none;
  --nav-bg:#191b1e;--nav-mix:#1c1e22;--nav-on-fg:#f4f1ea;--nav-on-mix:#26282d;--nav-hover:#2a2d31;
  --input-bg:#1a1c1f;--input-fg:#eceae6;--input-line:#4a4e56;
  --code-bg:#141618;--code-fg:#e4e1db;--toast-bg:#141618;--toast-fg:#eceae6;
  --chip-bg:#222428;--chip-on:#32353b;--chip-on-mix:#26282d;
  --ghost-bg:transparent;--ghost-hover:#2a2d31;--ghost-fg:#eceae6;
  --btn-primary:#a68462;--btn-primary-fg:#1a140e;
  --btn-success:#6e866c;--btn-success-fg:#10140f;
  --btn-warn:#b79a72;--btn-warn-fg:#1a140e;
  --btn-danger:#9a5e58;--btn-danger-fg:#fff8f6;
  --btn-shadow:none;
  --pill-ok-bg:#2a3329;--pill-ok-fg:#d5e2d2;--pill-warn-bg:#332c22;--pill-warn-fg:#f0e2c8;
  --pill-bad-bg:#332624;--pill-bad-fg:#f0d2ce;--pill-demo-bg:#2c2a30;--pill-demo-fg:#e4e0e6;
  --pill-mut-bg:#2a2c30;--pill-mut-fg:#c8c6c0;
  --zebra:#222428;--row-hover:#30333a;--th-bg:#222428;--th-mix:#eceae6;--card-h-mix:#f4f1ea;
  --focus:#a68462;--bell-bg:#222428;--bell-fg:#eceae6;--prog-bg:#222428;
  --danger-bg:#2a2222;--danger-line:#6e4542;--demo-bg:#242328;--demo-fg:#e4e0e6;--demo-line:#5c5854;
  --sev-critical:#e2b2ac;--sev-warning:#e6d2ae;--sev-ok:#c5d4c2;--money:#e6d2ae;
  --hdr-time:#a3a097;--hdr-time-strong:#eceae6;--hdr-zone:#a68462;
  --speed-fg:#e6d2ae;--speed-bg:#26231e;--speed-line:#a68462;--speed-hover:#3a342c;
  --srv-bg:#16181b;--srv-line:#3c3f46;--bar:#16181b;--modal-bg:rgba(0,0,0,.55);
  --badge-ok-fg:#d5e2d2;--badge-ok-bg:#8fa58a22;--badge-ok-line:#8fa58a55;
  --badge-warn-fg:#f0e2c8;--badge-warn-bg:#c4a36a22;--badge-warn-line:#c4a36a55;
  --badge-bad-fg:#f0d2ce;--badge-bad-bg:#c47c7422;--badge-bad-line:#c47c7455;
  --badge-info-fg:#e4e0d8;--badge-info-bg:#a6846222;--badge-info-line:#a6846255;--badge-mut-bg:#2a2c30;
  --ghost-danger-fg:#e2b2ac;--ghost-danger-line:#9a5e58;--ghost-ok-fg:#d5e2d2;--ghost-ok-line:#6e866c;
  --pfx-g-bg:rgba(236,234,230,.04);--pfx-g-line:rgba(236,234,230,.14);
  --pfx-diag-fg:#cbb89a;--pfx-diag-line:rgba(166,132,98,.55);--pfx-diag-hover:rgba(166,132,98,.12);
  --pfx-speed-fg:#e6d2ae;--pfx-speed-line:rgba(166,132,98,.55);--pfx-speed-hover:rgba(166,132,98,.12);
  --g-main:#8e8c88;--g-sites:#8d97a3;--g-manage:#a68462;--g-monitor:#b79a72;--g-analytics:#9a93a1;--g-personal:#a89098;--g-help:#8aa3a6;
  background:#1c1e22;background-image:none;letter-spacing:.01em;
}
html[data-theme=strict]:not(.tg-light) body:not(.tg) .card{
  background:var(--ds-card);border-radius:2px;border-top-width:1px;border-top-color:var(--line);box-shadow:none;
}
html[data-theme=strict]:not(.tg-light) body:not(.tg) button,
html[data-theme=strict]:not(.tg-light) body:not(.tg) .btn,
html[data-theme=strict]:not(.tg-light) body:not(.tg) input,
html[data-theme=strict]:not(.tg-light) body:not(.tg) textarea,
html[data-theme=strict]:not(.tg-light) body:not(.tg) select,
html[data-theme=strict]:not(.tg-light) body:not(.tg) .pill{border-radius:2px}
html[data-theme=strict]:not(.tg-light) body:not(.tg) main>h1{font-weight:650;letter-spacing:0}
html[data-theme=strict]:not(.tg-light) body:not(.tg) main>h1::before,
html[data-theme=strict]:not(.tg-light) body:not(.tg) main>h2::before{width:2px;border-radius:0;background:var(--acc)}
html[data-theme=strict]:not(.tg-light) body:not(.tg).hdr201 #app header::after{opacity:0}

/* переключатель в шапке и блок на главной — во всех темах, кроме Telegram */
body.tg #themeSwitch,body.tg .theme-home{display:none!important}
#app>header,.hdrright,.hdrbtns,.theme-switch{overflow:visible}
.theme-switch{position:relative;flex:none}
#themeBtn{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.theme-dot{width:8px;height:8px;border-radius:50%;box-shadow:0 0 0 1px color-mix(in srgb,var(--txt) 25%,transparent)}
.theme-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:40;min-width:240px;padding:8px;
  background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:var(--ds-shadow),0 16px 40px #0006}
.theme-menu.hidden{display:none!important}
button.theme-opt{display:flex!important;align-items:center;gap:8px;width:100%;text-align:left;margin:0;padding:8px!important;
  background:transparent!important;color:var(--txt)!important;border:1px solid transparent!important;box-shadow:none!important}
button.theme-opt.on,button.theme-opt[aria-selected=true]{border-color:var(--acc)!important;background:color-mix(in srgb,var(--acc) 12%,var(--card))!important}
button.theme-opt:hover{background:var(--ghost-hover,#ffffff12)!important}
.theme-swatch{display:inline-flex;width:40px;height:16px;border-radius:4px;overflow:hidden;flex:none;border:1px solid var(--line)}
.theme-swatch i{flex:1}
.theme-home{margin-top:8px}
.theme-home h3{margin-top:0}
.theme-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
button.theme-card{display:flex!important;flex-direction:column;align-items:flex-start;gap:6px;width:100%;margin:0;padding:8px!important;
  text-align:left;background:var(--card)!important;color:var(--txt)!important;border:1px solid var(--line)!important;
  box-shadow:var(--ds-shadow)!important;border-radius:12px!important;font-weight:600}
button.theme-card:hover{border-color:color-mix(in srgb,var(--acc) 55%,var(--line))!important}
button.theme-card.on,button.theme-card[aria-pressed=true]{border-color:var(--acc)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--acc) 45%,transparent)!important}
.theme-prev{display:block;width:100%;height:64px;border-radius:8px;overflow:hidden;border:1px solid color-mix(in srgb,var(--txt) 12%,transparent)}
.theme-prev-bar{display:block;height:14px}
.theme-prev-row{display:flex;height:50px}
.theme-prev-nav{width:22%;flex:none}
.theme-prev-main{flex:1;display:flex;flex-direction:column;gap:4px;padding:6px}
.theme-prev-main span{display:block;height:8px;border-radius:2px}
.theme-prev-main span:last-child{height:16px}
.theme-name{font-size:13px;line-height:1.3}
.theme-note{font-size:12px;font-weight:400;color:var(--mut)}
.hub-loading-bar{display:none}
@media(max-width:900px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.theme-grid{grid-template-columns:1fr}}
