/*
 * UAE section type `calculations` (S4, 2026-11-07): live `.section_calculations`. Linked on UAE pages
 * only (JURISDICTION_SETTINGS.ae.stylesheets); every rule is scoped to the slot.
 *
 * DS TradingCalculatorHowTo. Live measured 2026-11-07 (margin / pip / swap, EN + AR, 4 widths;
 * tmp/uae-batches/s4/measure/live-trading-calculators__*):
 * - Grey band, padding 112 / 80 at 768 / 56 on phones. Content 1280px (1328px container,
 *   24px gutters; 16px on phones).
 * - Intro at most 846px wide, centred from 768 (start-aligned on phones): heading 56/64
 *   (48/56, 40/48, letter-spacing -0.48px), 16px to a 16/24 intro; 48px to the card.
 * - White card, radius 24, no shadow, padding 48 (24 on phones). From 992 two columns 32px
 *   apart; below, one column with 24px between Formula and Example.
 * - Column titles 32/40 (24/32 at 768, 20/28 on phones, letter-spacing -0.24px), 16px to
 *   the text. Text blocks are one blank line (24px) apart; the bullet list is indented 40px
 *   with discs and 34px above the next footnote (live li carries a trailing break); footnotes and the note are 16/24 italic in
 *   the text colour (not the DS 14px grey).
 * - Example: live shows the worked calculation as a picture (576px wide at 1440, 32px empty
 *   band above and below, each equation a 74px pill with a dot-and-line connector down to a
 *   bold 16px label). Ours keeps the DS text tokens (decided) and draws them to the same
 *   boxes: full-width pill, 16/24 bold values, labels 24px under the pill, 32px above and
 *   below the strips, 43px between two strips. The DS strip still scales itself down when an
 *   equation is wider than the column (live's picture scales with the column instead).
 * - Arabic: live sets the bullet items in "Inter, Arial" (used font Arial for Arabic).
 */
[data-raven-slot$=":calculations"] .tchow-container {
  max-width: 1328px;
  padding: 56px 16px;
  gap: 48px;
  align-items: stretch;
}
[data-raven-slot$=":calculations"] .tchow-intro {
  max-width: 846px;
  width: 100%;
  margin-inline: auto;
  align-items: flex-start;
  text-align: start;
}
[data-raven-slot$=":calculations"] .tchow-title {
  letter-spacing: -0.48px;
  text-wrap: wrap;
}
[data-raven-slot$=":calculations"] .tchow-description {
  font-size: 16px;
  line-height: 24px;
}
[data-raven-slot$=":calculations"] .tchow-card {
  box-shadow: none;
  border-radius: 24px;
  padding: 24px;
  gap: 24px;
}
[data-raven-slot$=":calculations"] .tchow-column {
  gap: 24px;
}
/* Live's Formula column ends with an empty paragraph (24px); shows below 992px where
   Example stacks under it. */
[data-raven-slot$=":calculations"] .tchow-column:first-child {
  padding-bottom: 24px;
}
[data-raven-slot$=":calculations"] .tchow-columnTitle {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.24px;
}
[data-raven-slot$=":calculations"] .tchow-columnTitle + * {
  margin-top: -8px;
}
[data-raven-slot$=":calculations"] .tchow-footnote,
[data-raven-slot$=":calculations"] .tchow-note {
  font-size: 16px;
  line-height: 24px;
  color: rgb(24, 28, 37);
  margin: 0;
}
[data-raven-slot$=":calculations"] .tchow-bullets {
  gap: 0;
  padding: 0;
  padding-inline-start: 40px;
  list-style: disc;
}
[data-raven-slot$=":calculations"] .tchow-bulletItem {
  display: list-item;
}
[data-raven-slot$=":calculations"] .tchow-bullets + * {
  margin-top: 10px;
}
[dir="rtl"] [data-raven-slot$=":calculations"] .tchow-bulletItem {
  --font-family-base: Inter, Arial, sans-serif;
  font-family: Inter, Arial, sans-serif;
}

/* Worked calculation: DS tokens drawn to live's picture boxes. */
[data-raven-slot$=":calculations"] .tchow-stripWrap {
  margin-top: 8px;
}
[data-raven-slot$=":calculations"] .tchow-stripWrap + .tchow-stripWrap {
  margin-top: 19px;
}
[data-raven-slot$=":calculations"] .tchow-stripWrap + :not(.tchow-stripWrap) {
  margin-top: 8px;
}
[data-raven-slot$=":calculations"] .tchow-strip {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-rows: 74px auto;
  justify-content: space-between;
  column-gap: 8px;
  row-gap: 0;
  padding: 0 40px;
  background: transparent;
  border-radius: 0;
}
[data-raven-slot$=":calculations"] .tchow-strip::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 74px;
  box-sizing: border-box;
  border: 1px solid rgb(219, 221, 224);
  border-radius: 37px;
  background: rgb(246, 247, 248);
}
[data-raven-slot$=":calculations"] .tchow-stripValue {
  position: relative;
  align-self: center;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: rgb(24, 28, 37);
}
[data-raven-slot$=":calculations"] .tchow-stripValueText--labeled {
  min-width: 0;
}
[data-raven-slot$=":calculations"] .tchow-stripCaption {
  position: relative;
  padding-top: 24px;
}
[data-raven-slot$=":calculations"] .tchow-stripCaption--labeled {
  width: auto;
  max-width: none;
}
[data-raven-slot$=":calculations"] .tchow-stripCaption--labeled::before,
[data-raven-slot$=":calculations"] .tchow-stripCaption--labeled::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(200, 203, 208);
}
[data-raven-slot$=":calculations"] .tchow-stripCaption--labeled::before {
  top: -16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
[data-raven-slot$=":calculations"] .tchow-stripCaption--labeled::after {
  top: -8px;
  width: 1px;
  height: 32px;
}
[data-raven-slot$=":calculations"] .tchow-stripArrow {
  display: none;
}
[data-raven-slot$=":calculations"] .tchow-stripLabel {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: rgb(24, 28, 37);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 768px) {
  [data-raven-slot$=":calculations"] .tchow-container {
    padding: 80px 24px;
  }
  [data-raven-slot$=":calculations"] .tchow-intro {
    align-items: center;
    text-align: center;
  }
  [data-raven-slot$=":calculations"] .tchow-card {
    padding: 48px;
  }
  [data-raven-slot$=":calculations"] .tchow-columnTitle {
    font-size: 24px;
    line-height: 32px;
  }
}
@media (min-width: 992px) {
  [data-raven-slot$=":calculations"] .tchow-container {
    padding-block: 112px;
  }
  [data-raven-slot$=":calculations"] .tchow-card {
    padding: 48px;
    gap: 32px;
  }
  [data-raven-slot$=":calculations"] .tchow-columnTitle {
    font-size: 32px;
    line-height: 40px;
  }
}
/* From 768 live's picture scales with the column (576px wide at 1440 = the px sizes
   above). Scale the strip boxes the same way: 100cqw = column width, so every size is
   its 1440 value × width / 576 (pill 74, labels 24 under it, 43 between strips). */
@media (min-width: 768px) {
  [data-raven-slot$=":calculations"] .tchow-column {
    container-type: inline-size;
  }
  [data-raven-slot$=":calculations"] .tchow-stripWrap + .tchow-stripWrap {
    margin-top: calc(7.465cqw - 24px);
  }
  [data-raven-slot$=":calculations"] .tchow-strip {
    grid-template-rows: 12.847cqw auto;
    column-gap: 1.389cqw;
    padding: 0 6.944cqw;
  }
  [data-raven-slot$=":calculations"] .tchow-strip::before {
    height: 12.847cqw;
    border-radius: 6.424cqw;
  }
  [data-raven-slot$=":calculations"] .tchow-stripValue,
  [data-raven-slot$=":calculations"] .tchow-stripLabel {
    font-size: 2.778cqw;
    line-height: 4.167cqw;
  }
  [data-raven-slot$=":calculations"] .tchow-stripCaption {
    padding-top: 4.167cqw;
  }
  [data-raven-slot$=":calculations"] .tchow-stripCaption--labeled::before {
    top: -2.778cqw;
    width: 1.389cqw;
    height: 1.389cqw;
  }
  [data-raven-slot$=":calculations"] .tchow-stripCaption--labeled::after {
    top: -1.389cqw;
    height: 5.556cqw;
  }
}
/* Arabic: live indents the bullet list 40px on both sides (Webflow's padding-left plus
   the RTL padding-right): 496px wide items at 1440, 230px at 390. */
[dir="rtl"] [data-raven-slot$=":calculations"] .tchow-bullets {
  padding-inline: 40px;
}
/* Live's worked calculation is the same left-to-right picture in Arabic (English labels):
   keep the equation in reading order 0.25 × 100,000 … = result on Arabic pages too. */
[data-raven-slot$=":calculations"] .tchow-strip {
  direction: ltr;
}

/* Worked example as live's picture (DS patch labels.exampleImage, S4 2026-11-07): live pads
   the picture 32px above and below (24px on phones, where live swaps in the phone file at
   <=479px, as the <source> does), full column width, no gap to the text around it. */
[data-raven-slot$=":calculations"] .tchow-exampleImage {
  display: block;
  margin: 0;
}
[data-raven-slot$=":calculations"] .tchow-column > .tchow-exampleImage,
[data-raven-slot$=":calculations"] .tchow-column > .tchow-exampleImage + * {
  margin-top: -24px;
}
[data-raven-slot$=":calculations"] .tchow-exampleImage img {
  display: block;
  box-sizing: content-box;
  width: 100%;
  height: auto;
  padding: 32px 0;
}
@media (max-width: 479px) {
  [data-raven-slot$=":calculations"] .tchow-exampleImage img {
    padding: 24px 0;
  }
}

/* Swap tabs (live `.calculations_tabs-menu`, measured 2026-11-07): 34px tall at every width;
   centred in one row from 768; on phones they wrap one per line at the start side (English
   10px from the screen edge; Arabic ends 29px from the right edge). */
[data-raven-slot$=":calculations"] .tchow-tabs [role="tab"] {
  min-height: 34px;
}
@media (max-width: 767px) {
  [data-raven-slot$=":calculations"] .tchow-tabs {
    justify-content: flex-start;
    margin-inline-start: -6px;
  }
  [dir="rtl"] [data-raven-slot$=":calculations"] .tchow-tabs {
    margin-inline-start: 13px;
  }
}

/* Below 992 live draws a 1px rgba(0,0,0,.08) rule under the Formula column (24px under its
   text), where Example stacks below it (checker s4 N3; measured 768/390, 2026-11-07). */
@media (max-width: 991px) {
  [data-raven-slot$=":calculations"] .tchow-column:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}
/* Live's bold lead ("Swap =", "Pip value USD:") and raised exponent (DS patch runs). */
[data-raven-slot$=":calculations"] :is(.tchow-text, .tchow-footnote) strong {
  font-weight: 700;
}
[data-raven-slot$=":calculations"] :is(.tchow-text, .tchow-footnote) sup {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: super;
}
