/* Part 140 — step cards, glossary words and the calculators in an article
   (config/article-extras.php, extras140.js). Part 141 removed «در یک نگاه» and the picker.

   ⚠ .text_news_div resets font-size, colour, line-height, background, direction and alignment
   on every div, span, p and li of the body with !important. The step cards
   are body markup written as ol / li (so the owner can edit them in the panel), so THEIR
   rules carry !important at a higher specificity; everything the script builds avoids those
   four tags and needs none. ⚠ No flex `gap` (iOS before 14.5): margins space everything. */

/* ---- step cards ------------------------------------------------------------------- */
.text_news_div ol.sd140-steps{
  list-style: none;
  counter-reset: sd140;
  margin: 18px 0 !important;
  padding: 0 !important;
}
.text_news_div ol.sd140-steps > li{
  counter-increment: sd140;
  position: relative;
  margin: 0 0 10px !important;
  padding: 12px 56px 12px 14px !important;
  border: 1px solid var(--sd-teal-100, #d1ebe4);
  border-radius: 12px;
  background: #fff !important;
  font-size: 15px !important;
  line-height: 1.95 !important;
  text-align: start !important;
}
/* RTL: the number sits on the RIGHT, which is where the padding above makes room */
.text_news_div ol.sd140-steps > li::before{
  content: counter(sd140);
  position: absolute;
  top: 12px;
  inset-inline-start: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sd-teal-600, #0e8a72);
  color: #fff;
  font-family: 'iransansbold', 'iransans', sans-serif;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
}
.text_news_div ol.sd140-steps > li + li::after{
  content: "";
  position: absolute;
  top: -11px;
  inset-inline-start: 28px;
  width: 2px; height: 10px;
  background: var(--sd-teal-100, #d1ebe4);
}

/* ---- glossary word and its box ------------------------------------------------------ */
.sd23-content-body button.sd140-term{
  display: inline;
  margin: 0; padding: 0;
  border: 0;
  border-bottom: 1.5px dotted var(--sd-teal-600, #0e8a72);
  background: none;
  font: inherit;
  color: inherit;
  line-height: inherit;
  cursor: help;
}
.sd23-content-body button.sd140-term:focus-visible{ outline: 2px solid var(--sd-teal-600, #0e8a72); outline-offset: 2px; }
aside.sd140-pop{
  position: absolute; z-index: 60;
  padding: 10px 12px;
  border: 1px solid var(--sd-teal-100, #d1ebe4);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 83, 68, .16);
  direction: rtl; text-align: start;
}
aside.sd140-pop[hidden]{ display: none; }
aside.sd140-pop b{ display: block; margin: 0 0 2px; font-size: 13.5px; color: var(--sd-teal-800, #0b5344); }
aside.sd140-pop small{ display: block; font-size: 13px; line-height: 1.9; color: #2b3a35; }

/* ---- the calculator's box ---------------------------------------------------------- */
.sd140-calc{
  display: block;
  margin: 22px 0;
  padding: 16px 16px 12px;
  border: 1px solid var(--sd-teal-100, #d1ebe4);
  border-radius: 14px;
  background: #fff;
}
.sd140-calc-title{
  display: block; margin: 0 0 10px;
  font-family: 'iransansbold', 'iransans', sans-serif;
  font-size: 15.5px; font-weight: 700; color: var(--sd-teal-800, #0b5344);
}

/* ---- calculators ------------------------------------------------------------------ */
.sd140-calc-help,
.sd140-calc-note{ display: block; margin: 0 0 10px; font-size: 13.5px; line-height: 1.9; color: #3f4d48; }
.sd140-calc-note{ margin: 8px 0 0; font-size: 12.5px; color: var(--sd-muted, #6b7c78); }
.sd140-field{ display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.sd140-field-label{ flex: 1 1 100%; margin: 0 0 4px; font-size: 13px; font-weight: 700; color: #2b3a35; }
.sd140-input{
  width: 9em; max-width: 60%;
  padding: 8px 10px;
  border: 1px solid var(--sd-teal-100, #d1ebe4);
  border-radius: 10px;
  font: inherit; font-size: 16px; /* 16px: iOS zooms into a smaller field */
  text-align: center; direction: ltr;
}
.sd140-input:focus{ outline: 2px solid var(--sd-teal-600, #0e8a72); outline-offset: 1px; }
.sd140-field-unit{ margin-inline-start: 8px; font-size: 13px; color: var(--sd-muted, #6b7c78); }
.sd140-out{
  display: block; min-height: 1.9em;
  font-size: 14.5px; line-height: 1.9; font-weight: 700; color: var(--sd-teal-800, #0b5344);
}
