/* ==========================================================
   theme-dark.css — тёмная тема контентных страниц
   ========================================================== */
html[data-theme="dark"] {
  --page-bg: #0b1118;
  --content-bg: #111a24;
  --content-soft: #16212d;
  --content-soft-2: #1a2735;
  --text-main: #e7eef7;
  --text-strong: #f6f9fc;
  --text-muted: #a8b8c9;
  --text-subtle: #7f93a8;
  --line: #2b3d51;
  --line-strong: #385069;
  --brand: #69b1ff;
  --brand-strong: #8bc4ff;
  --brand-soft: #183a5c;
  --success-bg: #102c22;
  --success-text: #8fe1bd;
  --warning-bg: #332912;
  --warning-text: #ffd878;
  --danger-bg: #341a1d;
  --danger-text: #ffadad;
  --code-bg: #0d151e;
}

html[data-theme="dark"] body {
  background: var(--page-bg) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .main-area,
html[data-theme="dark"] .page-main,
html[data-theme="dark"] .page-wrap,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .content {
  background: var(--page-bg) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] article,
html[data-theme="dark"] .article,
html[data-theme="dark"] .content-article,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .instruction-page,
html[data-theme="dark"] .rich-article {
  color: var(--text-main) !important;
  background: var(--content-bg) !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] article h1,
html[data-theme="dark"] article h2,
html[data-theme="dark"] article h3,
html[data-theme="dark"] article h4,
html[data-theme="dark"] article h5,
html[data-theme="dark"] article h6,
html[data-theme="dark"] .article h1,
html[data-theme="dark"] .article h2,
html[data-theme="dark"] .article h3,
html[data-theme="dark"] .article h4,
html[data-theme="dark"] .article h5,
html[data-theme="dark"] .article h6,
html[data-theme="dark"] .article-hero h1,
html[data-theme="dark"] .article-hero h2,
html[data-theme="dark"] .article-hero h3,
html[data-theme="dark"] .article-hero h4,
html[data-theme="dark"] .section-title {
  color: var(--text-strong) !important;
}

html[data-theme="dark"] article p,
html[data-theme="dark"] article li,
html[data-theme="dark"] article dd,
html[data-theme="dark"] article dt,
html[data-theme="dark"] article label,
html[data-theme="dark"] article span,
html[data-theme="dark"] .article p,
html[data-theme="dark"] .article li,
html[data-theme="dark"] .article dd,
html[data-theme="dark"] .article dt,
html[data-theme="dark"] .step-content,
html[data-theme="dark"] .step-content p,
html[data-theme="dark"] .step-content li,
html[data-theme="dark"] .firmware-intro p,
html[data-theme="dark"] .subhead {
  color: var(--text-main) !important;
}

html[data-theme="dark"] article .muted,
html[data-theme="dark"] article .subtle,
html[data-theme="dark"] article .eyebrow,
html[data-theme="dark"] article .lead,
html[data-theme="dark"] article .hint,
html[data-theme="dark"] .article-hero p,
html[data-theme="dark"] .files-hero-eyebrow {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] article a,
html[data-theme="dark"] .article a,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .nav-footer a {
  color: var(--brand-strong) !important;
}

html[data-theme="dark"] article a:hover,
html[data-theme="dark"] .article a:hover,
html[data-theme="dark"] .breadcrumb a:hover,
html[data-theme="dark"] .nav-footer a:hover {
  color: var(--brand) !important;
}

html[data-theme="dark"] .article-hero,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .warning,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .note,
html[data-theme="dark"] .tip,
html[data-theme="dark"] .callout,
html[data-theme="dark"] .step,
html[data-theme="dark"] .instruction-card,
html[data-theme="dark"] .download-card,
html[data-theme="dark"] .api-endpoint,
html[data-theme="dark"] .firmware-ad,
html[data-theme="dark"] .seo-cluster-card {
  background: var(--content-soft) !important;
  border-color: var(--line) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .warning {
  background: var(--warning-bg) !important;
  color: var(--warning-text) !important;
}

html[data-theme="dark"] .step-num {
  background: var(--brand) !important;
  color: #07111b !important;
}

html[data-theme="dark"] .inline-code,
html[data-theme="dark"] code,
html[data-theme="dark"] pre,
html[data-theme="dark"] .code,
html[data-theme="dark"] .api-code {
  background: var(--code-bg) !important;
  border-color: var(--line) !important;
  color: #d9eaff !important;
}

html[data-theme="dark"] table {
  background: var(--content-bg) !important;
  color: var(--text-main) !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] th {
  background: var(--content-soft-2) !important;
  color: var(--text-strong) !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] td {
  color: var(--text-main) !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] blockquote {
  background: var(--content-soft) !important;
  border-left-color: var(--brand) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0e161f !important;
  color: var(--text-main) !important;
  border-color: var(--line-strong) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--text-subtle) !important;
}

html[data-theme="dark"] img {
  background: #0f1720;
}

html[data-theme="dark"] .screenshot,
html[data-theme="dark"] .article-image,
html[data-theme="dark"] .content-image,
html[data-theme="dark"] figure {
  background: #0f1720 !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .divider {
  border-color: var(--line) !important;
  background: var(--line) !important;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .section,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .files-hero,
html[data-theme="dark"] .firmware-intro {
  color: var(--text-main) !important;
}
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .hero h2,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .page-header h1 {
  color: var(--text-strong) !important;
}
html[data-theme="dark"] .hero .accent {
  color: var(--brand) !important;
}
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .section-header p {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] .instruction-card h3,
html[data-theme="dark"] .instruction-card p,
html[data-theme="dark"] .download-card h3,
html[data-theme="dark"] .download-card p,
html[data-theme="dark"] .instruction-card .arrow,
html[data-theme="dark"] .download-card .arrow {
  color: var(--text-main) !important;
}
html[data-theme="dark"] .instruction-card h3,
html[data-theme="dark"] .download-card h3 {
  color: var(--text-strong) !important;
}
