:root {
  --article-max: 1120px;
  --article-accent: #1fbf72;
  --article-border: rgba(255, 255, 255, .14);
}

body.article-page {
  min-height: 100vh;
  background: #080a0c;
}

.article-shell {
  width: min(100% - 32px, var(--article-max));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.article-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
}

.article-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -30px 0 30px;
  color: #7f8b92;
  font-size: .86rem;
}

.article-breadcrumbs a {
  color: #aeb8be;
  text-decoration: none;
}

.article-breadcrumbs a:hover,
.article-breadcrumbs a:focus-visible {
  color: var(--article-accent);
}

.article-brand,
.article-back {
  color: var(--text);
  text-decoration: none;
}

.article-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.article-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: invert(1);
}

.article-back {
  color: var(--muted);
  font-size: .95rem;
}

.article-back:hover,
.article-back:focus-visible {
  color: var(--text);
}

.article-hero {
  display: block;
  max-width: 1040px;
  margin-bottom: 64px;
}

.article-kicker {
  margin: 0 0 14px;
  color: var(--article-accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1;
  letter-spacing: 0;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

.article-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d4dce1;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
}

.article-content {
  min-width: 0;
}

.article-content h2 {
  margin: 52px 0 16px;
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content section {
  scroll-margin-top: 24px;
}

.article-content h3 {
  margin: 28px 0 10px;
  font-size: 1.18rem;
}

.article-content p,
.article-content li {
  color: #c2cbd1;
  font-size: 1.05rem;
  line-height: 1.72;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content ul,
.article-content ol {
  margin: 12px 0 24px;
  padding-left: 1.4em;
}

.article-content li + li {
  margin-top: 8px;
}

.article-content a {
  color: #7addad;
  text-underline-offset: 3px;
}

.wire-color {
  white-space: nowrap;
}

.wire-color::before {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 50%;
  vertical-align: -3px;
  background: var(--wire-color, #879198);
  content: "";
}

.wire-yellow { --wire-color: #f0c51c; }
.wire-green { --wire-color: #25a65a; }
.wire-blue { --wire-color: #238bd2; }
.wire-white { --wire-color: #f4f6f7; }
.wire-black { --wire-color: #111416; }
.wire-brown { --wire-color: #87522f; }
.wire-red { --wire-color: #d9252a; }
.wire-pink { --wire-color: #f48fb1; }
.wire-orange { --wire-color: #ed7d22; }
.wire-grey { --wire-color: #9aa2a7; }
.wire-white-black { --wire-color: linear-gradient(90deg, #f4f6f7 0 50%, #111416 50%); }
.wire-white-blue { --wire-color: linear-gradient(90deg, #f4f6f7 0 50%, #238bd2 50%); }
.wire-white-red { --wire-color: linear-gradient(90deg, #f4f6f7 0 50%, #d9252a 50%); }
.wire-white-green { --wire-color: linear-gradient(90deg, #f4f6f7 0 50%, #25a65a 50%); }
.wire-white-brown { --wire-color: linear-gradient(90deg, #f4f6f7 0 50%, #87522f 50%); }

.knowledge-intro {
  max-width: 760px;
  margin-bottom: 42px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.knowledge-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: rgba(16, 20, 24, .76);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}

.knowledge-grid-text .knowledge-card {
  min-height: 178px;
}

.knowledge-grid-text .knowledge-card:first-child,
.knowledge-grid-text .knowledge-card:nth-child(2) {
  border-color: rgba(31, 191, 114, .38);
}

.knowledge-card:hover,
.knowledge-card:focus-visible {
  border-color: rgba(31, 191, 114, .75);
  transform: translateY(-2px);
}

.knowledge-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.knowledge-card img.knowledge-card-media-low {
  object-position: center 76%;
}

.knowledge-card-body {
  padding: 20px;
}

.knowledge-card-body span {
  color: var(--article-accent);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.knowledge-card-body h2 {
  margin: 8px 0 10px;
  font-size: 1.45rem;
  line-height: 1.1;
}

.knowledge-card-body p {
  margin: 0;
  color: #aeb8be;
  line-height: 1.55;
}

.article-related {
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--article-border);
}

.article-related h2 {
  margin-top: 0;
}

.article-related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.article-related-links a {
  padding: 16px;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: rgba(16, 20, 24, .72);
  color: #dce3e7;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.article-related-links a:hover,
.article-related-links a:focus-visible {
  border-color: rgba(31, 191, 114, .75);
  color: #fff;
}

.pinout-table td:first-child,
.pinout-table th:first-child {
  width: 72px;
  text-align: center;
}

.pinout-table td:first-child {
  color: var(--article-accent);
  font-weight: 850;
}

.pinout-diagram {
  margin: 28px 0 34px;
}

.pinout-diagram img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: #101418;
}

.pinout-diagram figcaption {
  margin-top: 12px;
  color: #8f9ba3;
  font-size: .88rem;
  line-height: 1.5;
}

.pinout-technical-drawing {
  padding: 10px;
  background: #fff !important;
  object-fit: contain;
}

.wire-section {
  white-space: nowrap;
}

.diagnosis-table-wrap {
  margin: 28px 0 40px;
  overflow-x: auto;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: rgba(16, 20, 24, .72);
}

.diagnosis-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.diagnosis-table th,
.diagnosis-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: #c2cbd1;
  font-size: .98rem;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.diagnosis-table th {
  color: var(--text);
  font-size: .86rem;
  text-transform: uppercase;
}

.diagnosis-table tbody tr:last-child td {
  border-bottom: 0;
}

.diagnosis-table td:first-child {
  width: 38%;
  color: #eef3f5;
  font-weight: 750;
}

.diagnosis-table.pinout-table {
  min-width: 0;
  table-layout: fixed;
}

.diagnosis-table.pinout-table th:first-child,
.diagnosis-table.pinout-table td.pin-number {
  width: 92px;
  text-align: center;
}

.diagnosis-table.pinout-table td.pin-number {
  padding: 16px 10px;
  background: var(--wire-color, #879198);
  color: #0a0c0d;
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.diagnosis-table.pinout-table td.pin-number.wire-black,
.diagnosis-table.pinout-table td.pin-number.wire-blue,
.diagnosis-table.pinout-table td.pin-number.wire-brown,
.diagnosis-table.pinout-table td.pin-number.wire-red {
  color: #fff;
}

.diagnosis-table.pinout-table td.pin-number[class*="wire-white-"] {
  color: #111;
  -webkit-text-stroke: .35px rgba(255, 255, 255, .9);
}

.pinout-table td:nth-child(2) strong {
  display: block;
  color: #eef3f5;
  font-size: 1rem;
  line-height: 1.45;
}

.pin-wire-details {
  display: block;
  margin-top: 5px;
  color: #94a0a7;
  font-size: .88rem;
  line-height: 1.35;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.connector-card {
  padding: 20px;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: rgba(16, 20, 24, .72);
}

.connector-card h3 {
  margin-top: 0;
}

.connector-card p:last-child {
  margin-bottom: 0;
}

.connector-card-link {
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.connector-card-link:hover,
.connector-card-link:focus-visible {
  border-color: rgba(31, 191, 114, .75);
  background: rgba(31, 191, 114, .08);
}

.connector-card-action {
  display: block;
  margin-top: 18px;
  color: var(--article-accent);
  font-size: .92rem;
}

.article-source {
  color: #8f9ba3 !important;
  font-size: .9rem !important;
}

.article-inline-media {
  margin: 48px 0;
}

.article-inline-media img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: #101418;
}

.article-inline-media-wide img {
  max-height: 440px;
}

.article-inline-media figcaption {
  margin-top: 12px;
  color: #8f9ba3;
  font-size: .88rem;
  line-height: 1.5;
}

.fault-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 14px;
}

.fault-photo {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: #101418;
  color: var(--text);
  cursor: zoom-in;
  font: inherit;
  text-align: left;
}

.fault-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.fault-photo span {
  display: block;
  min-height: 58px;
  padding: 12px;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.35;
}

.fault-photo:hover,
.fault-photo:focus-visible {
  border-color: rgba(31, 191, 114, .75);
}

.mistake-list {
  border-top: 1px solid var(--article-border);
}

.mistake-list details {
  border-bottom: 1px solid var(--article-border);
}

.mistake-list summary {
  padding: 18px 36px 18px 0;
  color: #eef3f5;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
}

.mistake-list details p {
  max-width: 700px;
  padding: 0 0 18px;
}

.case-study {
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: rgba(16, 20, 24, .72);
}

.case-study summary {
  display: grid;
  gap: 6px;
  padding: 20px;
  cursor: pointer;
  list-style-position: inside;
}

.case-study summary span {
  color: var(--article-accent);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.case-study summary strong {
  color: var(--text);
  font-size: 1.15rem;
}

.case-study-body {
  padding: 0 20px 4px;
}

.repair-checklist {
  border-top: 1px solid var(--article-border);
}

.repair-checklist > label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--article-border);
  color: #cbd4d9;
  cursor: pointer;
  line-height: 1.45;
}

.repair-checklist input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--article-accent);
}

.repair-checklist label:has(input:checked) span {
  color: #758189;
  text-decoration: line-through;
}

.checklist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
}

.checklist-footer output {
  color: var(--article-accent);
  font-weight: 800;
}

.checklist-footer button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--article-border);
  border-radius: 7px;
  background: #101418;
  color: #cbd4d9;
  cursor: pointer;
  font: inherit;
}

.article-lightbox {
  width: min(920px, calc(100% - 28px));
  max-width: none;
  padding: 12px;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: #0b0e10;
  color: var(--text);
}

.article-lightbox::backdrop {
  background: rgba(0, 0, 0, .84);
}

.article-lightbox img {
  display: block;
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 5px;
}

.article-lightbox p {
  margin: 12px 48px 4px 4px;
  color: #a9b3b9;
  line-height: 1.45;
}

.article-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(8, 10, 12, .86);
  color: #fff;
  cursor: pointer;
  font: 700 1.5rem/1 sans-serif;
}

.article-note {
  margin: 30px 0;
  padding: 20px 22px;
  border-left: 3px solid var(--article-accent);
  border-radius: 0 8px 8px 0;
  background: rgba(31, 191, 114, .09);
}

.article-note p:last-child {
  margin-bottom: 0;
}

.article-warning {
  margin: 30px 0;
  padding: 20px 22px;
  border-left: 3px solid #ff565d;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 86, 93, .08);
}

.article-warning p:last-child {
  margin-bottom: 0;
}

.article-aside {
  position: sticky;
  top: 24px;
  padding: 20px;
  border: 1px solid var(--article-border);
  border-radius: 8px;
  background: rgba(16, 20, 24, .76);
}

.article-aside strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.article-aside ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-aside a {
  color: #c8d1d6;
  text-decoration: none;
  line-height: 1.35;
}

.article-aside a:hover,
.article-aside a:focus-visible {
  color: var(--article-accent);
}

.article-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--article-border);
}

.article-cta a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--article-accent);
  color: #07110c;
  font-weight: 800;
  text-decoration: none;
}

.article-cta p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .article-shell {
    width: min(100% - 24px, var(--article-max));
    padding-top: 18px;
  }

  .article-nav {
    margin-bottom: 38px;
  }

  .article-nav-links {
    gap: 12px;
  }

  .article-back-library {
    color: var(--article-accent);
    font-weight: 750;
  }

  .article-breadcrumbs {
    margin-top: -18px;
  }

  .article-hero,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-hero {
    gap: 28px;
    margin-bottom: 42px;
  }

  .article-hero h1 {
    font-size: clamp(2rem, 9.6vw, 2.65rem);
  }

  .article-hero-media,
  .article-hero-media img {
    min-height: 280px;
  }

  .article-aside {
    position: static;
    order: -1;
  }

  .connector-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-grid,
  .article-related-links {
    grid-template-columns: 1fr;
  }

  .knowledge-card {
    min-height: 0;
  }

  .fault-gallery {
    grid-template-columns: 1fr;
  }

  .fault-photo {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
  }

  .fault-photo img {
    aspect-ratio: 1;
  }

  .fault-photo span {
    min-height: 0;
  }

  .diagnosis-table {
    min-width: 0;
  }

  .diagnosis-table thead {
    display: none;
  }

  .diagnosis-table tbody,
  .diagnosis-table tr,
  .diagnosis-table td {
    display: block;
    width: auto;
  }

  .diagnosis-table tr {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
  }

  .diagnosis-table tbody tr:last-child {
    border-bottom: 0;
  }

  .diagnosis-table td {
    padding: 0;
    border: 0;
  }

  .diagnosis-table td:first-child {
    width: auto;
    margin-bottom: 8px;
  }

  .diagnosis-table td:last-child::before {
    content: "Проверить: ";
    color: #8f9ba3;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .pinout-table td.wire-color::before {
    content: "";
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
  }

  .pinout-table td.wire-section::before {
    content: "Сечение: ";
    color: #8f9ba3;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .diagnosis-table.pinout-table tr {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 0;
  }

  .diagnosis-table.pinout-table td.pin-number {
    display: flex;
    width: auto;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 12px 8px;
  }

  .diagnosis-table.pinout-table td:nth-child(2) {
    padding: 13px 15px;
  }

  .diagnosis-table.pinout-table td:last-child::before {
    content: none;
  }


  .article-inline-media {
    margin: 36px 0;
  }

  .checklist-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
