/* Part 128 — the firing curve that firing128.js draws beside a firing table, the panel
   above the programs (temperature correction and summary) and the printed sheet of one
   program.

   Every size here is on a class: front.css sets a font-size on bare type selectors, so
   an inherited one would lose (rule 17).

   ⚠ THE !important IN THIS FILE ARE FORCED. .text_news_div resets background, colour,
   font-size, line-height, alignment and direction on every div, span, p and li of a
   body with !important of its own, and only an !important of higher specificity answers
   that. Where a tag outside that list would do (small, label, button, figcaption) it is.

   ⚠ No flex `gap` anywhere in this file: it does not exist before iOS 14.5, where the
   chart would sit flush against its table. Margins space everything. */

.sd128-pair{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
  margin:11px 0;
}
/* the table keeps its own look; only the auto margin goes, which in a flex row would
   swallow the free space and push the chart to the edge */
.sd23-content-body .sd128-pair > table{ margin:7px 11px; flex:0 1 auto; }

.sd128-fig{ flex:1 1 330px; max-width:574px; min-width:0; margin:7px 11px; }
@media (max-width:640px){
  .sd23-content-body .sd128-pair > table,
  .sd128-fig{ margin-inline:0; }
}
.sd128-box{
  position:relative; direction:ltr;
  border:1px solid var(--sd-teal-100, #d1ebe4); border-radius:14px;
  background:#fff !important; padding:8px 6px 4px; cursor:crosshair; touch-action:pan-y;
}
.sd128-box:focus-visible{ outline:2px solid #14a386; outline-offset:2px; }
.sd128-svg{ display:block; width:100%; height:auto; overflow:visible; font-family:inherit; }

/* the page is RTL and SVG text inherits it, which turns text-anchor round. ⚠ Safari then
   MIRRORS the brackets of a Persian label inside it: no SVG text carries a bracket. */
.sd128-svg text{ direction:ltr; unicode-bidi:isolate; }
.sd128-grid{ stroke:#e9eeec; stroke-width:1; }
.sd128-axis{ stroke:#9aa8a3; stroke-width:1; }
.sd128-sep{ stroke:#b9c7c2; stroke-width:1; stroke-dasharray:2 4; }
.sd128-tick{ font-size:11px; fill:#5d6b66; }
.sd128-unit{ font-size:11px; fill:#5d6b66; }
.sd128-stage{ font-size:11.5px; font-weight:700; fill:#0a6e5a; }
.sd128-area{ fill:#e7f6f2; opacity:.75; }
.sd128-line{ fill:none; stroke:#0e8a72; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.sd128-cool{ stroke-dasharray:6 5; opacity:.75; }
.sd128-dot{ fill:#fff; stroke:#0a6e5a; stroke-width:2; }
.sd128-val{ font-size:12px; font-weight:700; fill:#084637; paint-order:stroke; stroke:#fff; stroke-width:3px; }
/* the vacuum window: a band down the plot, its name inside it at the top */
.sd128-vac{ fill:#cadf78; opacity:.28; }
.sd128-vac-t{ font-size:11px; font-weight:700; fill:#4c5503; }
.sd128-cross{ stroke:#0a6e5a; stroke-width:1; stroke-dasharray:3 3; }
.sd128-cdot{ fill:#0e8a72; stroke:#fff; stroke-width:2; }

/* «زمان کل برنامه …» inside the frame, under «زمان به دقیقه» */
.sd128-box .sd128-cap,
.text_news_div .sd128-box .sd128-cap{
  direction:rtl !important; text-align:center !important;
  font-size:12px !important; line-height:1.8 !important; color:#33413c !important;
  margin:0 0 4px; padding:0;
}

/* the readout sits ABOVE the plot, so it never covers the curve it describes */
.sd128-tip,
.text_news_div .sd23-content-body .sd128-tip{
  position:absolute; bottom:calc(100% - 10px); transform:translateX(-50%);
  direction:rtl; text-align:center !important; white-space:nowrap; pointer-events:none; z-index:2;
  background:#084637 !important; border-radius:10px; padding:5px 11px;
  box-shadow:0 4px 14px rgba(8,70,55,.18);
}
.sd128-tip[hidden]{ display:none !important; }
.sd23-content-body .sd128-tip b{ display:block; font-size:13.5px !important; line-height:1.6 !important; color:#fff !important; background:none !important; text-align:center; }
.sd23-content-body .sd128-tip span{ display:block; font-size:11.5px !important; line-height:1.7 !important; color:#d1ebe4 !important; background:none !important; text-align:center !important; }

/* «چاپ این برنامه» in its own row under the table and the chart, outside both frames */
.sd23-content-body .sd128-actions,
.text_news_div .sd23-content-body .sd128-actions{ flex:0 0 100%; text-align:center !important; margin:2px 0 4px; }
.sd23-content-body .sd128-print,
.sd23-content-body .sd128-reset{
  font:inherit; font-size:12.5px; font-weight:700; line-height:1.6; color:#084637; background:#d1ebe4;
  border:1px solid #6ec9b3; border-radius:999px; padding:3px 14px; cursor:pointer;
}
.sd23-content-body .sd128-print:hover,
.sd23-content-body .sd128-reset:hover{ background:#a7d9cd; }
.sd23-content-body .sd128-reset[hidden]{ display:none; }

/* Round 8 — «دکمه‌ی چاپ در دسکتاپ دقیقا وسط نیست. یکمم دکمش رو بزرگتر و زیباتر کن».
   firing128.js moves the row under the SEAM between the table and the chart (they are not
   the same width, so the row's own centre is not the middle the eye sees). */
.sd23-content-body .sd128-actions,
.text_news_div .sd23-content-body .sd128-actions{ margin:10px 0 6px; }
.sd23-content-body .sd128-print{
  display:inline-flex; align-items:center; gap:8px;
  font-size:14px; line-height:1.6; color:#fff; background:#0a6e5a;
  border:0; padding:8px 20px 8px 24px;
  box-shadow:0 2px 8px rgba(8,70,55,.22);
  transition:background-color .15s, box-shadow .15s, transform .15s;
}
.sd23-content-body .sd128-print::before{
  content:""; flex:0 0 auto; width:18px; height:18px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6'/%3E%3Crect x='3' y='9' width='18' height='8' rx='2'/%3E%3Cpath d='M6 14h12v7H6z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6'/%3E%3Crect x='3' y='9' width='18' height='8' rx='2'/%3E%3Cpath d='M6 14h12v7H6z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sd23-content-body .sd128-print:hover{ background:#084637; box-shadow:0 4px 14px rgba(8,70,55,.28); transform:translateY(-1px); }
.sd23-content-body .sd128-print:focus-visible{ outline:2px solid #0a6e5a; outline-offset:3px; }

/* the Kavosh number, under «زمان کل برنامه …»: there, but quiet */
.text_news_div .sd128-box .sd128-cap .sd128-cap-k,
.sd128-box .sd128-cap .sd128-cap-k{
  display:block; font-size:10.5px !important; line-height:1.6 !important; color:#7a8a84 !important;
}

/* ---- the firing table itself ------------------------------------------------------- */
/* «نوشته‌هایی مثل "دمای شروع (Start Temp)" بهتره همش غیر بولد باشه و نوشته‌های ردیف "مرحله"
   و "مقدار" بولد باشن». The English is a <strong> in the seeds; .text_news_div makes every
   strong 800 with !important, so this needs one class more. */
.text_news_div .sd23-content-body .sd128-pair > table td strong,
.sd128-printsheet table td strong{ font-weight:400 !important; }
.text_news_div .sd23-content-body .sd128-pair > table th,
.sd128-printsheet table th{ font-weight:700 !important; font-family:'iransansbold','iransans',sans-serif !important; }

/* Round 6 — «منظورم قبلا این بود کل ردیف مرحله و مقدار بولد باشه یا پشت خونه‌های جدول یکی
   درمیون پس‌زمینه‌ی کمرنگ باشه تا راحت‌تر بشه عدد رو پیدا کرد». Both: the stage column and the
   value column are bold, and every other row of parameters has a faint tint. The stage cell
   spans its rows, so it stays white and only the parameter and the value are striped. */
.text_news_div .sd23-content-body .sd128-pair > table td:last-child,
.text_news_div .sd23-content-body .sd128-pair > table td:first-child:not(:nth-last-child(-n+2)),
.sd128-printsheet table td:last-child,
.sd128-printsheet table td:first-child:not(:nth-last-child(-n+2)){
  font-weight:700 !important; font-family:'iransansbold','iransans',sans-serif !important;
}
.sd23-content-body .sd128-pair > table tbody tr:nth-child(even) > td:nth-last-child(-n+2),
.sd128-printsheet table tbody tr:nth-child(even) > td:nth-last-child(-n+2){ background:#f3f9f7; }
.sd23-content-body .sd128-pair > table tbody td:first-child:not(:nth-last-child(-n+2)){ background:#fff; }

/* the rows the pointed-at stage comes from: after the stripes, so it shows on them too */
.sd23-content-body .sd128-pair > table tbody tr.sd128-on > td:nth-last-child(-n+2){ background:#d7efe8; }
/* a temperature the reader's correction has moved */
.sd23-content-body table td.sd128-shifted{ color:#a35a00; font-weight:700; }

/* the heading a summary row jumps to must clear the sticky header */
.sd128-anchor{ scroll-margin-top:120px; }

/* «هنوزم توی موبایلم نوشته‌های جدول در یک خط نیستن»: on a phone the cells lose half their
   padding and a point of size, the English name sits on its own line, smaller and grey,
   and a value never wraps. */
@media (max-width:640px){
  .text_news_div .sd23-content-body .sd128-pair > table td,
  .text_news_div .sd23-content-body .sd128-pair > table th{
    font-size:13px !important; line-height:1.7 !important; padding:5px 6px !important;
  }
  .text_news_div .sd23-content-body .sd128-pair > table td strong{
    display:block; direction:ltr; text-align:right !important; unicode-bidi:isolate;
    font-size:11px !important; line-height:1.5 !important; color:#5d6b66 !important;
  }
  .sd23-content-body .sd128-pair > table td:last-child{ white-space:nowrap; }
  .sd23-content-body .sd128-pair > table td[rowspan]{ word-break:normal; overflow-wrap:normal; }
}

/* ---- the panel ---------------------------------------------------------------------- */
.sd23-content-body .sd128-panel{
  border:1px solid #d1ebe4; border-radius:16px; background:#f6fbf9 !important;
  padding:14px 14px 10px; margin:22px 0;
}
.sd23-content-body .sd128-panel-h,
.text_news_div .sd23-content-body .sd128-panel-h{
  font-size:16px !important; font-weight:700; line-height:1.8 !important; color:#084637 !important;
  text-align:center !important; margin-bottom:8px;
}
.sd23-content-body .sd128-cal,
.text_news_div .sd23-content-body .sd128-cal{
  background:#fff !important; border:1px solid #d1ebe4; border-radius:12px; padding:8px 10px;
  text-align:center !important;
}
.sd23-content-body .sd128-cal-n{ display:block; text-align:center; font-size:12.5px; line-height:1.9; color:#5d6b66; margin-bottom:4px; }
/* label, +, the number, −, «درجه»: one line down to a 320px phone */
.sd23-content-body .sd128-cal-row{
  display:flex !important; flex-wrap:nowrap; align-items:center; justify-content:center;
  white-space:nowrap;
}
.sd23-content-body .sd128-cal-row > *{ margin:0 3px; }
.sd23-content-body .sd128-cal-l{ font-size:13px; font-weight:700; color:#084637; }
.sd23-content-body .sd128-step{
  width:26px; height:26px; flex:0 0 26px; border-radius:50%; border:1px solid #6ec9b3; background:#d1ebe4;
  color:#084637; font:inherit; font-size:16px; font-weight:700; line-height:1; cursor:pointer; padding:0;
}
.sd23-content-body .sd128-step:hover{ background:#a7d9cd; }
.sd23-content-body .sd128-off{
  width:46px; height:26px; flex:0 0 46px; text-align:center; direction:ltr; font:inherit; font-size:14px;
  border:1px solid #a7d9cd; border-radius:8px; background:#fff; color:#084637; padding:0 2px;
  -moz-appearance:textfield;
}
.sd23-content-body .sd128-off::-webkit-inner-spin-button,
.sd23-content-body .sd128-off::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0; }
.sd23-content-body .sd128-cal-u{ font-size:12.5px; color:#5d6b66; }
@media (max-width:360px){
  .sd23-content-body .sd128-cal-l{ font-size:11.5px; }
  .sd23-content-body .sd128-cal-u{ font-size:11.5px; }
  .sd23-content-body .sd128-cal-row > *{ margin:0 1.5px; }
  .sd23-content-body .sd128-off{ width:40px; flex-basis:40px; }
  .sd23-content-body .sd128-step{ width:24px; height:24px; flex-basis:24px; }
}
.sd23-content-body .sd128-cal .sd128-reset{ margin-top:6px; }
.sd23-content-body .sd128-corrected .sd128-cal{ border-color:#e3b36b; background:#fff8ec !important; }
.sd23-content-body .sd128-corrected .sd128-cal-n{ color:#a35a00; font-weight:700; }
.sd23-content-body .sd128-how{ text-align:start; margin-top:6px; }
.sd23-content-body .sd128-how summary{
  font-size:12.5px; font-weight:700; color:#0a6e5a; cursor:pointer; text-align:center; line-height:2;
}
.sd23-content-body .sd128-how-l{ display:block; font-size:12.5px; line-height:1.9; color:#33413c; margin:4px 0; text-align:start; }
.sd23-content-body .sd128-how-a{ display:inline-block; font-size:12.5px; line-height:1.9; margin-top:2px; }

.sd23-content-body .sd128-panel .sd128-sum{ margin:12px auto 4px; background:#fff; }
.sd23-content-body .sd128-sum td,
.sd23-content-body .sd128-sum th{ white-space:nowrap; text-align:center; }
.sd23-content-body .sd128-sum td.sd128-c-name{ text-align:start; white-space:normal; min-width:150px; }
.sd23-content-body .sd128-sort{
  font:inherit; font-weight:700; color:inherit; background:none; border:0; padding:0; cursor:pointer;
}
.sd23-content-body .sd128-sort::after{ content:" ↕"; opacity:.45; font-weight:400; }
.sd23-content-body th[aria-sort="ascending"] .sd128-sort::after{ content:" ↑"; opacity:1; }
.sd23-content-body th[aria-sort="descending"] .sd128-sort::after{ content:" ↓"; opacity:1; }

/* on a phone the summary keeps the three columns a reader starts from — which program,
   how hot, how long; the rest is one tap away in the program itself */
@media (max-width:640px){
  .sd23-content-body .sd128-sum .sd128-c-start,
  .sd23-content-body .sd128-sum .sd128-c-rate,
  .sd23-content-body .sd128-sum .sd128-c-hold,
  .sd23-content-body .sd128-sum .sd128-c-vac{ display:none; }
  .sd23-content-body .sd128-sum{ width:100% !important; display:table !important; font-size:12.5px; }
  .sd23-content-body .sd128-sum td,
  .sd23-content-body .sd128-sum th{ padding:6px 5px !important; font-size:12.5px !important; line-height:1.7 !important; }
  .sd23-content-body .sd128-sum td.sd128-c-name{ min-width:0; }
  .sd23-content-body .sd128-sum .sd128-jump{ font-size:12.5px !important; }
  .sd23-content-body .sd128-panel{ padding:10px 8px 8px; }
  .sd23-content-body .sd128-cal{ padding:8px 6px; }
}

/* ---- the printed sheet of ONE program --------------------------------------------------
   firing128.js builds it as a direct child of <body> and lays it out here, hidden, at the
   sheet's own size, so the table's printed height can be measured and the curve drawn to
   it. `position:fixed` keeps it out of the page's scroll width; `visibility:hidden` still
   lays it out. While printing, everything else in <body> is hidden and `@page{margin:0}`
   (added by the script for this print only) leaves the browser no room for its header and
   footer. */
.sd128-printsheet{
  position:fixed; top:0; left:0; z-index:-1; visibility:hidden; pointer-events:none;
  width:297mm; box-sizing:border-box; padding:11mm 14mm 9mm;
  background:#fff; color:#111; direction:rtl; font-family:'iransans',sans-serif;
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
}
.sd128-sh-head{
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1.5px solid #0e8a72; padding:0 0 3mm; margin:0 0 5mm;
}
.sd128-sh-logo{ height:15mm; width:auto; display:block; }
.sd128-sh-titles{ flex:1 1 auto; text-align:center; padding:0 6mm; }
.sd128-sh-title{ font-family:'iransansbold','iransans',sans-serif; font-size:16pt; font-weight:700; line-height:1.5; color:#084637; }
.sd128-sh-sub{ font-size:9.5pt; color:#5d6b66; line-height:1.6; }
.sd128-sh-site{ direction:ltr; font-family:'iransansbold','iransans',sans-serif; font-size:13pt; font-weight:700; color:#0a6e5a; }
.sd128-sh-row{ display:flex; align-items:flex-start; justify-content:space-between; }
/* «در هنگام چاپ دور جدول تیزه و مثل نمودار گرد نیست». A collapsed table cannot round its
   corners, so the sheet's table is SEPARATE with no spacing: the frame and the radius are
   the table's, each cell draws only its top line and the line toward the next column
   (its left, in RTL), and the value column — always the last cell of a row, at the left
   edge — draws none. The radius matches the chart's 14px frame. */
.sd128-printsheet .sd128-sh-row > table{
  display:table !important; width:auto !important; flex:0 0 auto; margin:0 !important;
  border-collapse:separate !important; border-spacing:0; border:1px solid #d1ebe4;
  border-radius:14px; overflow:hidden; font-size:10pt; background:#fff;
}
.sd128-printsheet .sd128-sh-row > table th,
.sd128-printsheet .sd128-sh-row > table td{
  font-size:10pt !important; line-height:1.55 !important; padding:4px 8px !important;
  border:0; border-top:1px solid #d6e6e1; border-left:1px solid #d6e6e1;
  text-align:right; color:#111;
}
.sd128-printsheet .sd128-sh-row > table thead th{ background:#e7f6f2; border-top:0; }
.sd128-printsheet .sd128-sh-row > table tr > *:last-child{ border-left:0; }
.sd128-printsheet .sd128-sh-row > table td strong{ font-size:8.5pt !important; color:#5d6b66; }
.sd128-sh-chart{ flex:1 1 0; min-width:0; margin-inline-start:7mm; }
.sd128-printsheet .sd128-box{ cursor:default; }
.sd128-sh-notes{ margin:5mm 0 0; padding:0 5mm 0 0; font-size:9.5pt; line-height:1.9; color:#222; }
.sd128-sh-notes li{ margin:0; }
.sd128-sh-foot{ margin-top:3mm; font-size:8pt; color:#777; text-align:left; }
/* round 8: the address laid out like the browser's address bar: host on the left, each segment isolated */
.sd128-sh-foot .sd128-addr{ direction:ltr !important; unicode-bidi:isolate !important; margin-right:2.5mm; }
.sd128-sh-foot .sd128-addr bdi{ direction:rtl !important; unicode-bidi:isolate !important; }

@media print{
  .sd128-tip, .sd128-cursor, .sd128-actions{ display:none !important; }
  html, body.sd128-printing{ background:#fff !important; }
  body.sd128-printing{ margin:0 !important; padding:0 !important; }
  body.sd128-printing > *:not(.sd128-printsheet){ display:none !important; }
  /* util32.css and base32.css print `*{background:0 0!important;color:#000!important}`:
     the sheet's tints and colours answer with !important at a higher specificity */
  body.sd128-printing .sd128-printsheet .sd128-sh-row > table thead th{ background:#e7f6f2 !important; }
  body.sd128-printing .sd128-printsheet .sd128-sh-row > table tbody tr:nth-child(even) > td:nth-last-child(-n+2){ background:#f3f9f7 !important; }
  body.sd128-printing .sd128-printsheet .sd128-sh-title{ color:#084637 !important; }
  body.sd128-printing .sd128-printsheet .sd128-sh-site{ color:#0a6e5a !important; }
  body.sd128-printing .sd128-printsheet .sd128-sh-sub,
  body.sd128-printing .sd128-printsheet .sd128-cap,
  body.sd128-printing .sd128-printsheet .sd128-sh-foot,
  body.sd128-printing .sd128-printsheet td strong{ color:#5d6b66 !important; }
  body.sd128-printing .sd128-printsheet .sd128-box,
  body.sd128-printing .sd128-printsheet .sd128-sh-row > table{ background:#fff !important; }
  body.sd128-printing > .sd128-printsheet{
    position:static; visibility:visible; z-index:auto; display:block;
    width:297mm; height:209mm; overflow:hidden; break-inside:avoid; page-break-inside:avoid;
  }
}
