/* Явные переменные темы: переключатель работает независимо от системной темы */
:root[data-theme="light"]{
  --bg:#f5f5f7; --bg-2:#ffffff; --bg2:#ffffff; --bg-3:#eef0f3;
  --text:#1a1a1a; --text-2:#6b6b73; --muted:#5f5f68;
  --border:#d6d8dd; --line:#e2e3e8;
  --primary:#5b4ae6; --primary-soft:rgba(91,74,230,.12);
  --ok:#16a34a; --err:#dc2626; --warn:#d97706;
  --gradient:linear-gradient(135deg,#5b4ae6,#3b82f6);
}
:root[data-theme="dark"]{
  --bg:#171522; --bg-2:#1f1b2e; --bg2:#1f1b2e; --bg-3:#29243b;
  --text:#eeeeee; --text-2:#8e8d96; --muted:#a3a2ab;
  --border:#3b3452; --line:#3b3452;
  --primary:#7c6bff; --primary-soft:rgba(124,107,255,.14);
  --ok:#4ade80; --err:#f87171; --warn:#f59e0b;
  --gradient:linear-gradient(135deg,#7c6bff,#3b82f6);
}


html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="light"] body{background:#f5f5f7;color:#1a1a1a}
html[data-theme="dark"] body{background:#171522;color:#eeeeee}

/* Таблицы в статьях */
.wrap table,.help-article-view table{width:100%;border-collapse:collapse;margin:14px 0;font-size:13.5px;
  display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:10px}
.wrap table th,.wrap table td,.help-article-view table th,.help-article-view table td{
  border:1px solid var(--line);padding:9px 11px;text-align:left;vertical-align:top;min-width:120px}
.wrap table th,.help-article-view table th{background:var(--bg-2);font-weight:700;color:var(--text)}
.wrap table tr:nth-child(even),.help-article-view table tr:nth-child(even){background:rgba(91,74,230,.04)}
@media(max-width:600px){
  .wrap table,.help-article-view table{font-size:12.5px}
  .wrap table th,.wrap table td,.help-article-view table th,.help-article-view table td{padding:8px 9px;min-width:110px}
}

.article-theme-host{position:fixed;top:12px;right:12px;z-index:9000;background:var(--bg-2);
  border:1px solid var(--border);border-radius:20px;padding:4px;box-shadow:0 6px 20px rgba(0,0,0,.12)}
