/* iFixit style — внутренние страницы (руководства) */
:root {
  --ifx-bg: #fff;
  --ifx-bg-alt: #f5f5f5;
  --ifx-text: #1a1a1a;
  --ifx-text-muted: #666;
  --ifx-border: #e0e0e0;
  --ifx-accent: #0066cc;
  --ifx-accent-hover: #004c99;
  --ifx-radius: 4px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  background: var(--ifx-bg) !important;
  color: var(--ifx-text) !important;
  line-height: 1.6;
}

.container { max-width: 1200px; }

.page-header {
  width: 100%;
  margin-bottom: 24px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--ifx-border);
  background: var(--ifx-bg);
}
.page-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header a {
  text-decoration: none;
  color: var(--ifx-text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  transition: color .2s;
}

.page-header a:hover { color: var(--ifx-accent); }

.page-header img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.lead {
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  color: var(--ifx-text-muted) !important;
  margin-top: 8px !important;
}

.ad-row { margin-bottom: 24px; }
#yandex_rtb_R-A-1578815-1 { min-height: 100px; }

.article-row { align-items: start; }
.article-col { margin-bottom: 24px; }

.article-card {
  background: var(--ifx-bg);
  border: 1px solid var(--ifx-border);
  border-radius: var(--ifx-radius);
  overflow: hidden;
}

.article-body {
  padding: 32px 32px 28px;
  line-height: 1.7;
}

.article-body h1.center,
.article-body h1:first-child {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ifx-text);
  margin: 0 0 1.25em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ifx-accent);
  line-height: 1.3;
}

.article-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ifx-text);
  margin: 1.75em 0 0.5em;
  line-height: 1.35;
}
.article-body h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5em 0 0.4em; }
.article-body h4 { font-size: 1rem; font-weight: 600; margin: 1.25em 0 0.35em; }

.article-body p { margin: 0 0 1em; color: var(--ifx-text); font-size: 0.9375rem; }
.article-body p:last-child { margin-bottom: 0; }

.article-body ul, .article-body ol { margin: 0 0 1em; padding-left: 1.5em; }
.article-body li { margin-bottom: 0.35em; font-size: 0.9375rem; }

.article-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ifx-border);
  border-radius: var(--ifx-radius);
  margin: 1em 0;
  display: block;
}
.article-body a {
  color: var(--ifx-accent);
  text-decoration: none;
  transition: color .2s;
}
.article-body a:hover {
  color: var(--ifx-accent-hover);
  text-decoration: underline;
}

.article-body .text { display: block; margin: 0 0 1em; }
.article-body .text span {
  display: block;
  position: static;
  font-size: 0.8125rem;
  color: var(--ifx-text-muted);
  margin-top: 6px;
  padding: 0;
  background: none;
}

.article-body blockquote {
  margin: 1.25em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--ifx-accent);
  background: var(--ifx-bg-alt);
  border-radius: 0 var(--ifx-radius) var(--ifx-radius) 0;
  color: var(--ifx-text-muted);
  font-size: 0.9rem;
}

.article-body table { width: 100%; border-collapse: collapse; margin: 1.25em 0; font-size: 0.9rem; }
.article-body th, .article-body td {
  border: 1px solid var(--ifx-border);
  padding: 10px 12px;
  text-align: left;
}
.article-body th {
  background: var(--ifx-bg-alt);
  font-weight: 600;
}

.ad-in-article {
  margin: 24px 32px 32px;
  min-height: 90px;
  padding: 16px;
  background: var(--ifx-bg-alt);
  border: 1px solid var(--ifx-border);
  border-radius: var(--ifx-radius);
}

.col-sm-7 { margin-bottom: 20px; }

.col-sm-3 {
  background: var(--ifx-bg);
  border: 1px solid var(--ifx-border);
  border-radius: var(--ifx-radius);
  padding: 18px !important;
  position: sticky;
  top: 20px;
  align-self: start;
  height: fit-content;
}

.site-footer,
footer {
  margin-top: 40px;
  padding: 24px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ifx-text-muted);
  border-top: 1px solid var(--ifx-border);
}
.site-footer p, footer p { margin-top: 12px; color: var(--ifx-text-muted); }
.site-footer a, footer a { color: var(--ifx-accent); }
.site-footer a:hover, footer a:hover { text-decoration: underline; }

/* Bootstrap text utilities — сохраняем цвета */
.text-danger { color: #dc3545 !important; }
.text-success { color: #198754 !important; }
.text-warning { color: #fd7e14 !important; }
.text-info { color: #0dcaf0 !important; }
.text-primary { color: #0d6efd !important; }
.text-muted { color: #6c757d !important; }
.text-secondary { color: #6c757d !important; }
.text-dark { color: #212529 !important; }
.text-body { color: #212529 !important; }

@media (max-width: 768px) {
  .col-sm-3 { position: static; }
  .article-body { padding: 24px 20px; }
  .ad-in-article { margin: 20px; }
}
