/*!
 * sokkanbazar — qa.css v1.0.1 (Phase 10 pre-launch QA fixes)
 * Loaded last (after sb-site, sb-cards, sb-single, sb-archive, sb-home, sb-pages) by inc/qa.php.
 * Every rule is scoped to a template root class. Delete a block once its source file carries the fix.
 */

/* D1 — /feeds/ and /advertise/: step numbers were Text (#0F172A) on the Primary disc (1.01:1).
   pages.css `html .ie .sp-steps span{color:var(--text)}` overrides `.sp-steps .n`. */
html .ie .sp-steps span.n { color: var(--on-primary, #FFFFFF); }

/* D2 — /newsletter/ sample: wordmark in the dark mail header was Text on Primary (1.01:1). */
.ie .sp-mail__hd .sh-wordmark { color: var(--on-primary, #FFFFFF); }
.ie .sp-mail__hd .sh-dot { background: var(--accent-on-dark, #2DD4BF); }

/* D3 — /editorial-policy/ TOC footer: print button inherited the kit button colour
   (Background #FFFFFF) on a transparent fill → invisible, empty bordered box. */
.sb-page .sp-toc__foot [data-sb-print] {
  color: var(--accent, #0F766E);
  background: transparent;
  border: 0;
  box-shadow: none;
}
.sb-page .sp-toc__foot [data-sb-print]:hover,
.sb-page .sp-toc__foot [data-sb-print]:focus-visible {
  color: var(--accent-hover, #115E59);
  background: var(--accent-soft, #F0FDFA);
}

/* D4 — /newsletter/ ≤767px: the boxed split container kept row direction on phones,
   squeezing form (≈190px) and sample (≈167px) side by side. Stack: form, then sample. */
@media (max-width: 767px) {
  .sb-page .sb-nl-split > .e-con-inner { flex-direction: column; }
  .sb-page .sb-nl-split > .e-con-inner > .e-con { width: 100%; max-width: 100%; }
}

/* D5 — Single templates (خبر 236, یادداشت/تحلیل 232) 768–1024px: no side gutter
   (text touched both viewport edges at 1024; comment textarea overflowed by 2px). */
@media (min-width: 768px) and (max-width: 1024px) {
  .sb-single > .e-con-boxed > .e-con-inner,
  .sb-single > .sb-band > .e-con-boxed > .e-con-inner { padding-inline: 24px; }
}
.sb-single #comment { box-sizing: border-box; max-width: 100%; }

/* D7 — Site-wide 1025–1247px (laptops, iPad landscape 1180/1194): desktop container padding
   is 0 and the content width is 1200, so header, footer and every boxed section touched the
   viewport edges, and the footer form's negative gutter caused 4px horizontal scroll.
   Cap top-level boxed content at viewport − 48px. Nested boxed containers are unaffected
   (their 100% is already narrower); containers with their own 24px padding don't change. */
@media (min-width: 1025px) and (max-width: 1247px) {
  body .e-con-boxed > .e-con-inner { max-width: min(100%, calc(100vw - 48px)); }
}

/* D6 — Astra scroll-to-top: was Astra blue #060097, 31.5px, radius 2.
   Restyled to the Global Shell «BackToTop» spec: Primary, 40×40 (44×44 on phones),
   radius 4, white 15% hairline, float shadow, hover/focus Accent, inline-end (left in RTL) 24px. */
#ast-scroll-top {
  width: 40px;
  height: 40px;
  line-height: 40px;
  padding: 0;
  text-align: center;
  left: 24px;
  right: auto;
  bottom: 24px;
  background: var(--primary, #111827);
  color: var(--on-primary, #FFFFFF);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .08);
  font-size: 20px;
}
#ast-scroll-top:hover,
#ast-scroll-top:focus-visible {
  background: var(--accent, #0F766E);
  color: var(--on-accent, #FFFFFF);
}
#ast-scroll-top:focus-visible { outline: 2px solid var(--accent, #0F766E); outline-offset: 2px; }
#ast-scroll-top .ast-icon,
#ast-scroll-top svg { width: 20px; height: 20px; fill: currentColor; vertical-align: middle; }
@media (max-width: 767px) {
  #ast-scroll-top { width: 44px; height: 44px; line-height: 44px; left: 16px; bottom: 16px; }
  .sb-article #ast-scroll-top { bottom: 80px; } /* above the article action bar (single.css) */
}
@media print { #ast-scroll-top { display: none !important; } }

/* D9 — /corrections/ tracking code «SB-HMZZ8VN» rendered as «SB-HMZZ۸VN» (ss02 maps 0–9 to
   Persian glyphs inside the Latin code). Readers must copy the code exactly: keep Latin digits. */
.sb-code { direction: ltr; unicode-bidi: isolate; font-feature-settings: normal; }
