/* ==========================================================================
   ARTICLE EDITORIAL — UI v1 component
   Reading-body layout, paragraphs, headings, links, quotes and WP tables.
   Final font sizes and line heights remain in typography.css.
   ========================================================================== */

@media (min-width:1001px){
  .article-body .entry-content{
    font-size:16px;
    line-height:1.7;
  }
  .article-body .entry-content h2{
    margin-top:40px;
    font-size:27px;
  }
  .article-body .entry-content h3{
    margin-top:27px;
    font-size:20px;
  }
}

.article-body .entry-content{
  color:#263a43;
}
.article-body .entry-content>p,
.article-body .entry-content>ul:not(.article-mistake-list):not(.article-tip-list),
.article-body .entry-content>ol,
.article-body .entry-content>blockquote,
.article-body .entry-content>h2,
.article-body .entry-content>h3{
  max-width:820px;
}
.article-body .entry-content>p:first-child{margin-top:0}
.article-body .entry-content h2{
  scroll-margin-top:24px;
  margin:36px 0 13px;
  color:var(--ink);
  letter-spacing:-.2px;
}
.article-body .entry-content h3{
  scroll-margin-top:24px;
  margin:24px 0 10px;
  color:var(--ink);
}
.article-body .entry-content p,
.article-body .entry-content ul,
.article-body .entry-content ol{
  margin-top:0;
  margin-bottom:16px;
}
.article-body .entry-content a{
  color:#087145;
  text-decoration:underline;
  text-underline-offset:3px;
}
.article-body .entry-content strong{color:#203740}
.article-body .entry-content blockquote{
  margin:24px 0;
  padding:15px 18px;
  border:1px solid var(--line);
  border-left:3px solid #c9d5d0;
  border-radius:8px;
  background:#fafbfa;
  color:#40515a;
}

.article-body .entry-content .wp-block-table{
  width:100%;
  max-width:none;
  margin:18px 0 28px;
  overflow-x:auto;
  border-radius:9px;
}
.article-body .entry-content .wp-block-table table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--line);
  background:#fff;
}
.article-body .entry-content .wp-block-table th,
.article-body .entry-content .wp-block-table td{
  padding:10px 11px;
  border:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}
.article-body .entry-content .wp-block-table th{
  background:#f8faf9;
  color:var(--ink);
  font-weight:800;
}

@media(max-width:700px){
  .article-body .entry-content>p,
  .article-body .entry-content>ul:not(.article-mistake-list):not(.article-tip-list),
  .article-body .entry-content>ol,
  .article-body .entry-content>blockquote,
  .article-body .entry-content>h2,
  .article-body .entry-content>h3{
    max-width:none;
  }
  .article-body .entry-content .wp-block-table table{
    min-width:720px;
  }
}

/* Compact editorial photo: normal paragraph flow continues beside it and
   returns to the full text width below. Existing #42 markup needs no rewrite. */
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo){
  float:left;
  width:min(300px,36%);
  max-width:100%;
  margin:0 24px 16px 0;
}
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)>img{
  display:block;
  width:100%;
  height:auto;
  margin:0;
  border-radius:8px;
}
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)>figcaption{
  margin:8px 0 0;
}
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)+p{
  max-width:none;
}
/* Each checklist item finds the available width beside the floated photo.
   A two-column grid would create narrow nested columns at this point. */
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)+p+.article-tip-list{
  display:block;
}
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)+p+.article-tip-list>li{
  display:flow-root;
}
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)~h2,
.article-body .entry-content :is(.thread-inline-photo,.article-inline-photo)~section{
  clear:both;
}
.article-body .entry-content::after{
  content:"";
  display:block;
  clear:both;
}
@media(max-width:700px){
  .article-body .entry-content :is(.thread-inline-photo,.article-inline-photo){
    float:none;
    width:min(280px,100%);
    margin:0 0 16px;
  }
}



/* Compact comparison and diagnosis tables share the approved mobile row cards. */
:is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table){
  table-layout:fixed;
}
:is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) caption{
  padding:0 0 9px;
  text-align:left;
  color:var(--muted);
  font-size:var(--type-body-small,13px);
}
:is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) thead th:first-child{
  width:24%;
}
:is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) th[scope="row"]{
  background:#fff;
  color:var(--ink);
}
@media(max-width:700px){
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-wrap,.brake-check-wrap){overflow:visible}
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table){
    display:block;
    min-width:0;
    border:0;
  }
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) caption{display:block}
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) thead{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    overflow:hidden;
    clip-path:inset(50%);
  }
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) tbody{
    display:grid;
    gap:9px;
  }
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) tbody tr{
    display:block;
    border:1px solid var(--line);
    border-radius:9px;
    padding:12px;
  }
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) tbody :is(th,td){
    display:block;
    width:auto;
    border:0;
    padding:0;
  }
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) td{margin-top:10px}
  :is(#post-44,#post-24,.article-editorial-comparison) .entry-content :is(.thread-comparison-table,.brake-check-table) td:before{
    content:attr(data-label);
    display:block;
    margin-bottom:3px;
    color:var(--ink);
    font-weight:700;
  }
}



/* Existing tool-card layout, with complete working parts visible. */
.article-editorial-comparison .article-tool-card>img{object-fit:contain}


/* Compact anatomy diagram for the solder-seal guide only. */
.article-solder-seal .entry-content .article-connector-diagram{
  clear:both;
  width:min(640px,100%);
  margin:28px auto;
}
.article-solder-seal .entry-content .article-connector-diagram>img{
  display:block;
  width:100%;
  height:auto;
}

/* New solder-paste article: diagram stays readable without full-column stretch. */
.article-solder-paste .entry-content .article-paste-bridge{clear:both;width:min(720px,100%);margin:25px auto;}
.article-solder-paste .entry-content .article-paste-bridge>img{display:block;width:100%;height:auto;border-radius:9px;}
.article-solder-paste .entry-content .article-paste-bridge>figcaption{margin-top:9px;color:#5b6f6a;font-size:13px;}

/* Solder paste #544 — visual v3. All changes are scoped to this article. */
.article-solder-paste .article-hero-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 57%;
}
.article-solder-paste .article-hero-overlay{
  background:linear-gradient(90deg,
    rgba(255,255,255,.91) 0%,
    rgba(255,255,255,.87) 20%,
    rgba(255,255,255,.72) 38%,
    rgba(255,255,255,.30) 55%,
    rgba(255,255,255,0) 76%);
}
.article-solder-paste .article-choice-card>img{
  display:block;
  aspect-ratio:16/9;
  object-fit:cover;
  background:#f6faf7;
}
.article-solder-paste .article-choice-card[data-choice-index="2"]>img,
.article-solder-paste .article-choice-card[data-choice-index="3"]>img{
  object-fit:contain;
}
.article-solder-paste .article-tool-card>img{
  display:block;
  object-fit:cover;
  background:#f6faf7;
}
.article-solder-paste .article-step-card>img{
  display:block;
  object-fit:contain;
  background:#f4f8f5;
}
.article-solder-paste .entry-content .article-paste-infographic{
  clear:both;
  width:min(760px,100%);
  margin:16px 0 24px;
}
.article-solder-paste .entry-content .article-paste-infographic>img{
  display:block;
  width:100%;
  height:auto;
  border-radius:12px;
}
.article-solder-paste .entry-content .article-paste-infographic>figcaption,
.article-solder-paste .entry-content .article-paste-bridge>figcaption{
  margin-top:9px;
  color:#5c7068;
}
.article-solder-paste .entry-content .article-paste-bridge{width:min(820px,100%);}
@media(max-width:700px){
  .article-solder-paste .article-hero-media img{object-position:68% center;}
  .article-solder-paste .article-hero-overlay{
    background:linear-gradient(90deg,
      rgba(255,255,255,.97) 0%,
      rgba(255,255,255,.94) 36%,
      rgba(255,255,255,.77) 66%,
      rgba(255,255,255,.47) 100%);
  }
  .article-solder-paste .article-choice-card>img{aspect-ratio:auto;}
  .article-solder-paste .article-tool-card>img{object-fit:contain;}
  .article-solder-paste .article-step-card>img{object-fit:contain;}
}


/* Editorial article #3: diagrams remain readable, don't stretch over full text column. */
.article-hot-stapler .entry-content .article-stapler-figure {
 width:min(760px, 100%);
 margin:25px auto;
 clear:both;
}
.article-hot-stapler .entry-content .article-stapler-figure>img {
 display:block;
 width:100%;
 height:auto;
 border-radius:10px;
}
.article-hot-stapler .entry-content .article-stapler-figure>figcaption {
 font-size:13px;
 color:#627570;
 margin-top:9px;
}


/* ==========================================================================
   Hot-stapler visual v2 (#559), 26.10.2026.
   Four unique technical SVG illustrations for native cards: no reuse of inline
   photos. V2 photos exclusively occupy 4 article figures + first tool card,
   while each step has its own V2 illustration. No shared UI v1 selectors.
   HERO MUST REMAIN A SINGLE 100%-WIDE BACKGROUND (see HERO contract).
   ========================================================================== */
.article-hot-stapler .article-choice-card::before{
 content:"";
 display:block;
 width:100%;
 aspect-ratio:16/8.4;
 background-color:#e9f5ed;
 background-repeat:no-repeat;
 background-position:center;
 background-size:cover;
}
.article-hot-stapler .article-choice-card[data-choice-index="1"]::before{
 background-image:url("images/hot-stapler-choice-flat-v2.svg");
}
.article-hot-stapler .article-choice-card[data-choice-index="2"]::before{
 background-image:url("images/hot-stapler-choice-corner-v2.svg");
}
.article-hot-stapler .article-choice-card[data-choice-index="3"]::before{
 background-image:url("images/hot-stapler-choice-safety-v2.svg");
}
.article-hot-stapler #article-tool-2::before{
 content:"";
 grid-column:1;
 grid-row:1 / span 6;
 display:block;
 width:156px;
 height:132px;
 border-radius:8px;
 background:#eef6f0 url("images/hot-stapler-tool-safety-v3-1100.webp") center/cover no-repeat;
}
.article-hot-stapler .article-tool-card>img{
 object-fit:cover;
 background:#eef6f0;
}
.article-hot-stapler .article-step-card>img{
 display:block;
 height:175px;
 object-fit:cover;
 object-position:center 62%;
 background:#16393c;
}
.article-hot-stapler .article-step-number{
 display:none; /* Stage images already carry explicit "Шаг 1–4" headings. */
}
.article-hot-stapler .entry-content .article-inline-photo{
 float:none;
 width:min(760px,100%);
 margin:19px 0 21px;
}
.article-hot-stapler .entry-content .article-inline-photo>img{
 width:100%;
 height:auto;
 border-radius:11px;
}
.article-hot-stapler .entry-content .article-inline-photo>figcaption{
 color:#60736d;
 font-size:13px;
}
.article-hot-stapler .entry-content .article-stapler-figure{
 width:min(820px,100%);
 margin:20px 0 30px;
}
.article-hot-stapler .entry-content .article-stapler-figure>img{
 width:100%;
 height:auto;
 border-radius:11px;
}
@media(max-width:700px){
 .article-hot-stapler .article-choice-card::before{
  width:112px;
  height:100%;
  min-height:142px;
  aspect-ratio:auto;
  grid-column:1;
  grid-row:1;
  background-size:cover;
 }
 .article-hot-stapler #article-tool-2::before{
  width:112px;
  height:104px;
  grid-row:1 / span 5;
 }
 .article-hot-stapler .article-step-card>img{
  height:82px;
  object-fit:cover;
  object-position:center 61%;
 }
}
@media(max-width:430px){
 .article-hot-stapler .article-choice-card::before{width:100px;}
 .article-hot-stapler #article-tool-2::before{width:92px;height:92px;}
 .article-hot-stapler .article-step-card>img{height:80px;}
}


/* ROSE-ALLOY / article #4: three ORIGINAL svg choices, two different photo tools. */
.article-rose-alloy .article-choice-card::before{
 content:"";display:block;width:100%;aspect-ratio:1000/525;
 background-color:#edf7f0;background-repeat:no-repeat;background-size:cover;
 background-position:center;border-radius:8px;
}
.article-rose-alloy .article-choice-card[data-choice-index="1"]::before{
 background-image:url("images/rose-alloy-choice-smd-v2.webp");
}
.article-rose-alloy .article-choice-card[data-choice-index="2"]::before{
 background-image:url("images/rose-alloy-choice-pcb-v2.webp");
}
.article-rose-alloy .article-choice-card[data-choice-index="3"]::before{
 background-image:url("images/rose-alloy-choice-workshop-v2.webp");
}
.article-rose-alloy .article-step-card>img{
 display:block;object-fit:cover;object-position:center 46%;height:170px;
 background:#15383c;border-radius:9px;
}
.article-rose-alloy .article-step-number{display:none;}
.article-rose-alloy .entry-content .article-inline-photo,
.article-rose-alloy .entry-content .article-rose-diagram{
 float:none;clear:both;margin:20px 0 26px;width:min(820px,100%);
}
.article-rose-alloy .entry-content .article-inline-photo>img,
.article-rose-alloy .entry-content .article-rose-diagram>img{
 width:100%;height:auto;display:block;border-radius:10px;
}
.article-rose-alloy .entry-content .article-inline-photo figcaption,
.article-rose-alloy .entry-content .article-rose-diagram figcaption{
 color:#61736d;font-size:13px;margin-top:8px;
}
@media(max-width:700px){
 .article-rose-alloy .article-choice-card::before{
  width:112px;height:100%;min-height:132px;aspect-ratio:auto;grid-column:1;grid-row:1;
 }
 .article-rose-alloy .article-step-card>img{height:85px;}
}
@media(max-width:430px){
 .article-rose-alloy .article-choice-card::before{width:99px;}
 .article-rose-alloy .article-step-card>img{height:80px;}
}


/* ==========================================================================
   ROSE ALLOY #585 — EDITORIAL MEDIA LAYOUT V4
   Five images in true paired photo+text sections, not floats or big gaps.
   Scoped to single article. Fullwidth dedicated HERO stays untouched.
   ========================================================================== */
.article-rose-alloy .entry-content .rose-media {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(18px, 2.5vw, 28px);
  row-gap: 14px;
  width: 100%;
  clear: both;
  margin: 18px 0 32px;
}
.article-rose-alloy .entry-content .rose-media--image-left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}
.article-rose-alloy .entry-content .rose-media .rose-media__text {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}
.article-rose-alloy .entry-content .rose-media--image-left .rose-media__text {
  grid-column: 2;
}
.article-rose-alloy .entry-content .rose-media > figure.wp-block-image {
  display: block;
  float: none;
  clear: none;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.article-rose-alloy .entry-content .rose-media--image-left > figure.wp-block-image {
  grid-column: 1;
}
.article-rose-alloy .entry-content .rose-media > figure.wp-block-image > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.article-rose-alloy .entry-content .rose-media > figure.wp-block-image > figcaption {
  font-size: 12px;
  line-height: 1.5;
  color: #61736d;
  margin: 8px 0 0;
}
.article-rose-alloy .entry-content .rose-media__text > p:first-child {
  margin-top: 0;
}
.article-rose-alloy .entry-content .rose-media__text > p:last-child {
  margin-bottom: 0;
}
@media (max-width: 760px) {
  .article-rose-alloy .entry-content .rose-media,
  .article-rose-alloy .entry-content .rose-media--image-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin: 16px 0 28px;
  }
  .article-rose-alloy .entry-content .rose-media > figure.wp-block-image {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

/* ==========================================================================
   OLOVOOTSOS / Wordstat article #6 — standalone editorial photo+text blocks.
   Strictly scoped: does not modify shared photo floats or Rose layout.
   Full-background HERO is controlled by the already-approved article meta.
   ========================================================================== */
.article-body .entry-content .olovootsos-media {
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(0, 1fr);
  gap:clamp(18px, 2.6vw, 28px);
  align-items:start;
  width:100%;
  clear:both;
  margin:20px 0 32px;
}
.article-body .entry-content .olovootsos-media--image-left {
  grid-template-columns:minmax(0, 1fr) minmax(0, 1.35fr);
}
.article-body .entry-content .olovootsos-media__text {
  grid-column:1;
  grid-row:1;
  min-width:0;
}
.article-body .entry-content .olovootsos-media--image-left .olovootsos-media__text {
  grid-column:2;
}
.article-body .entry-content .olovootsos-media__photo {
  grid-column:2;
  grid-row:1;
  float:none;
  clear:none;
  min-width:0;
  width:100%;
  margin:0;
  padding:0;
}
.article-body .entry-content .olovootsos-media--image-left .olovootsos-media__photo {
  grid-column:1;
}
.article-body .entry-content .olovootsos-media__photo img {
  display:block;
  width:100%;
  height:auto;
  margin:0;
  border-radius:12px;
}
.article-body .entry-content .olovootsos-media__photo figcaption {
  margin:8px 0 0;
  font-size:12px;
  line-height:1.5;
  color:#61736d;
}
.article-body .entry-content .olovootsos-media__text> :first-child {margin-top:0}
.article-body .entry-content .olovootsos-media__text> :last-child {margin-bottom:0}
.article-body .entry-content .olovootsos-media__text>h3:first-child {margin-top:0}
@media (max-width:760px) {
  .article-body .entry-content .olovootsos-media,
  .article-body .entry-content .olovootsos-media--image-left {
    display:flex;
    flex-direction:column;
    gap:15px;
    margin:16px 0 28px;
  }
  .article-body .entry-content .olovootsos-media__photo {
    width:100%;
    max-width:100%;
    order:0;
  }
  .article-body .entry-content .olovootsos-media__text {order:1}
}
