/*
 * UAE markets section types (batch 2, 2026-11-04). Linked on UAE pages only
 * (JURISDICTION_SETTINGS.ae.stylesheets). Scope every rule to a UAE slot.
 */

/* ------------------------------------------------------------------ */
/* hero: DS showcase hero (`.hero--showcase`)                          */
/* ------------------------------------------------------------------ */
/*
 * Live `.section_hero_markets` (measured 2026-11-04, forex + stocks, EN + AR):
 * the text column is only as wide as the heading, at most 992px; 16px from
 * heading to copy (4px on phones) and from copy to buttons. English copy is
 * capped at 768px (403.75px below 992px); Arabic copy is not capped. The
 * vertical layout (heading position, picture) is in "Hero layout" at the end
 * of this file.
 */
:is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__content {
  gap: 16px;
}
:is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__description {
  width: 100%;
  max-width: 403.75px;
}
[dir="rtl"] :is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__description {
  max-width: none;
}
/* Live's heading is a <strong> inside the h1: weight 700, -0.56px tracking
   (measured 2026-11-05, forex, commodities, crypto, EN + AR). At 800 with no
   tracking our lines break earlier (commodities EN @1024 wrapped). */
[data-raven-slot^="markets/"][data-raven-slot$=":hero"] .hero__title {
  font-weight: 700;
  letter-spacing: -0.56px;
}
@media (min-width: 768px) {
  :is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__text {
    width: auto;
    max-width: min(100%, 992px);
  }
}
@media (min-width: 992px) {
  /* Live container: 24px gutters (ours 32px). */
  :is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__inner {
    padding-inline: 24px;
  }
  :is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__description {
    max-width: 768px;
  }
}
@media (max-width: 767px) {
  :is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__text {
    gap: 4px;
  }
  :is([data-raven-slot^="markets/"], [data-raven-slot="derivlife:hero"])[data-raven-slot$=":hero"] .hero__buttons {
    gap: 16px;
  }
}

/* ------------------------------------------------------------------ */
/* why-trade: three feature cards (DS FeatureCards, `.fc-section`)     */
/* ------------------------------------------------------------------ */
/*
 * Live `.section-markets-features` (measured 2026-11-04): 1280px of content
 * (1328px container, 24px gutters), cards 16px apart. Card copy is padded
 * 32px with 8px between title and text; titles 32px/40px (24px/32px below
 * 992px). The picture keeps its 52:35 shape at the card's foot. Cards are
 * at least 472px tall on desktop (taller for long Arabic copy), as tall as their row at 768–991, and 448px on phones
 * with 24px between copy and picture. Band padding 112 / 80 / 56px; heading
 * 24px above the cards on phones.
 */
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .fc-container {
  max-width: 1328px;
}
/* Live heading: at most 768px wide, plain (not balanced) line breaks. */
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .fc-sectionTitle {
  max-width: 768px;
  text-wrap: wrap;
}
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .fc-grid {
  gap: 16px;
}
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary {
  height: auto;
  min-height: 472px;
}
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary .cp-content {
  flex: 1 0 auto;
  gap: 8px;
}
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary .cp-imageSection {
  height: auto;
  aspect-ratio: 52 / 35;
}
/* Live titles (`.heading-style-h5`) are tracked -0.24px at every size
   (measured 2026-11-05, etfs, 4 widths). Without it "Zero commission trading"
   is 296px wide in the 294px phone column and wraps to 2 lines (live 290px, 1). */
[data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary .cp-title {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.24px;
}
@media (max-width: 991px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary .cp-title {
    font-size: 24px;
    line-height: 32px;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .fc-container {
    padding: 80px 24px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary {
    min-height: 0;
  }
}
@media (max-width: 767px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .fc-container {
    gap: 24px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":why-trade"] .card-primary {
    height: 448px;
    min-height: 0;
    gap: 24px;
  }
}

/* Stock Indices only: live's band carries an extra `.section_market_features`
   class that pads its foot 148px from 768px up (56px on phones), so "What we
   offer" sits 36px lower at 1440/1024 and 68px lower at 768 (checker N3,
   measured 2026-11-05; no other market page has it). */
@media (min-width: 768px) {
  [data-raven-slot="markets/stock-indices:why-trade"][data-raven-slot$=":why-trade"] .fc-container {
    padding-bottom: 148px;
  }
}

/* ------------------------------------------------------------------ */
/* what-we-offer: stacked cards (DS StackedMarketCards, `.smc`)        */
/* ------------------------------------------------------------------ */
/*
 * Live `.section_markets_instruments` (measured 2026-11-04, forex + stocks):
 * cards 250px tall, 24px corners, 20px apart (16px below 992px), the last one
 * with the same space under it; heading 64px above the cards (32px on
 * phones); band padding 112 / 80 / 56px. Inside a card, a 40% title column
 * and a 60% copy column, each padded 48px; the title is 32px/40px and only as
 * wide as its words. Cards stick 126px from the top, 18px apart.
 */
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc {
  --smc-sticky-top: 126px;
  --smc-peek: 18px;
  --smc-gap: 20px;
  --smc-padding-v: 0px;
  --smc-padding-h: 0px;
  --smc-content-gap: 0px;
  --smc-min-height: 250px;
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__inner {
  gap: 64px;
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__track {
  padding-bottom: 20px;
}
/*
 * Stacking (measured 2026-11-05, stocks + etfs, 7 cards): live steps every
 * card 18px (126, 144 … 234px). The DS block only steps the last 4
 * (`--smc-card-index` 0,0,0,0,1,2,3), so cards 1–4 covered each other.
 * From 768px live's sticky box is the card plus the space under it (270px:
 * 250 + 20, 266px at 768–991); the cards land in the same place either way.
 * Cards are at least 250px and grow with long copy (etfs card 3: 256px); the
 * block's script writes the tallest card's height on every card, hence
 * !important.
 */
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card {
  top: calc(var(--smc-sticky-top) + var(--ae-smc-step, 0) * var(--smc-peek));
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(2) { --ae-smc-step: 1; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(3) { --ae-smc-step: 2; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(4) { --ae-smc-step: 3; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(5) { --ae-smc-step: 4; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(6) { --ae-smc-step: 5; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(7) { --ae-smc-step: 6; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(8) { --ae-smc-step: 7; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(9) { --ae-smc-step: 8; }
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card:nth-child(10) { --ae-smc-step: 9; }
@media (min-width: 768px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__track {
    gap: 0;
    padding-bottom: 0;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card {
    padding-bottom: var(--smc-gap);
  }
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-inner {
  height: auto;
  min-height: 250px !important;
  border-radius: 24px;
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-content {
  grid-template-columns: 40% 60%;
  height: 100%;
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-title-wrap,
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-desc-wrap {
  padding: 48px;
  box-sizing: border-box;
}
[data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-title {
  width: fit-content;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.24px;
}
@media (min-width: 768px) and (max-width: 991px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc {
    --smc-gap: 16px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__inner {
    padding-block: 80px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-title {
    font-size: 24px;
    line-height: 32px;
  }
}
/* Phones: centred heading 32px above the cards; title over copy, top-aligned (32px in, 8px apart). */
@media (max-width: 767px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc {
    --smc-gap: 16px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__inner {
    gap: 32px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__header-wrap {
    align-items: center;
    text-align: center;
  }
  /* Live's Arabic heading stays at the start (right) on phones. */
  [dir="rtl"] [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__header-wrap {
    align-items: flex-start;
    text-align: start;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__track {
    padding-bottom: 0;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-inner {
    padding: 0;
    align-items: flex-start;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-content {
    grid-template-columns: 100%;
    align-content: start;
    gap: 0;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-title-wrap {
    padding: 32px 32px 0;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-desc-wrap {
    padding: 8px 32px 32px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-title {
    font-size: 24px;
    line-height: 32px;
  }
}

/* ------------------------------------------------------------------ */
/* faq: DS FaqAccordion                                                */
/* ------------------------------------------------------------------ */
/*
 * Live `.faq_component` (measured 2026-11-04): on desktop the question list
 * is a centred 1064px column; at 768–991 the band is padded 80px with 24px
 * gutters and the heading sits 48px above the list. The trading calculators use the
 * same live FAQ band (`.section_markets_faq`, S4 measured 2026-11-07), so these rules
 * match `trading-calculators` slots too.
 */
@media (min-width: 992px) {
  :is([data-raven-slot^="markets/"], [data-raven-slot^="trading-calculators"], [data-raven-slot^="promotions/"])[data-raven-slot$=":faq"] .faq-accordion__list {
    max-width: 1064px;
    margin-inline: auto;
  }
}
/* Live's Arabic questions are set in "Inter, Arial" (Webflow class font), so
   the Arabic letters draw in Arial, narrower than Noto Sans Arabic (browser
   used-font report, forex AR, 2026-11-05). The DS title reads
   --font-family-base, so re-point it on the title only. */
[dir="rtl"] :is([data-raven-slot^="markets/"], [data-raven-slot^="trading-calculators"], [data-raven-slot^="promotions/"])[data-raven-slot$=":faq"] .accordion__title {
  --font-family-base: Inter, Arial, sans-serif;
}
@media (min-width: 768px) and (max-width: 991px) {
  :is([data-raven-slot^="markets/"], [data-raven-slot^="trading-calculators"], [data-raven-slot^="promotions/"])[data-raven-slot$=":faq"] .faq-accordion__container {
    padding: 80px 24px;
    gap: 48px;
  }
}

/* Promotions (T6, 2026-11-07): live's `.terms-text` under the questions,
   "Full terms and conditions apply" (recipe `disclaimer`, PageRenderer puts it
   in `.faq-accordion__container`): 32px below the list, centred, 14/20 in
   rgba(24,28,37,0.48), the link underlined in rgb(24,28,37), EN and AR (Noto
   Sans Arabic, the frame's RTL stack). */
[data-raven-slot^="promotions/"][data-raven-slot$=":faq"] .faq-accordion__container > .disclaimer-wrapper {
  align-self: center;
  /* live: 32px under the last question (the container's gap is 48) */
  margin: -16px 0 0;
  padding: 0;
}
@media (max-width: 767px) {
  /* the container's gap is 24 on phones */
  [data-raven-slot^="promotions/"][data-raven-slot$=":faq"] .faq-accordion__container > .disclaimer-wrapper {
    margin-top: 8px;
  }
}
/* Live's rows are 76px with their separator inside; the DS adds a 1px bottom
   border on top of a 76px row (checker minor 2: band 1067 vs live 996 at 1440). */
[data-raven-slot^="promotions/"][data-raven-slot$=":faq"] .accordion:not(:last-child) .accordion__header {
  padding-bottom: 23px;
}
[data-raven-slot^="promotions/"][data-raven-slot$=":faq"] .disclaimer-component {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
[data-raven-slot^="promotions/"][data-raven-slot$=":faq"] .disclaimer-text {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: rgba(24, 28, 37, 0.48);
  text-align: center;
}
[data-raven-slot^="promotions/"][data-raven-slot$=":faq"] .disclaimer-text a {
  color: rgb(24, 28, 37);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* trade-today: the closing band                                       */
/* ------------------------------------------------------------------ */
/*
 * Live market closer (`.footer-breaker_component`, measured 2026-11-04) is
 * the same 7-tile footer breaker as who-we-are's "Join 3M+" band: 672px at
 * 1440, 15 equal grid columns at 768–1279 (7 rows), 654px on phones with
 * 65px tiles; the button keeps its own width (165px) and live's slate fill.
 * Same values as the join-cta rules in shared.css, on the market slot.
 */
[data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero .button.black_primary {
  background-color: #181c25;
}
/*
 * Live's band never fades (measured 2026-11-05, forex 1440: heading, button
 * and tiles at opacity 1 below, entering, in view and below again) and
 * nothing slides; only the tiles blur, 4px with the band below the screen to
 * 0 about 90% of the band in. The DS block ties opacity 0→1, a 32–180px
 * slide and a 28px blur to scroll, so the band went blank whenever it was
 * below the screen. Inline motion styles, hence !important; the blur is a
 * scroll-driven animation (animations override inline styles; without
 * scroll timelines it ends at blur 0).
 */
[data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
  view-timeline: --ae-ctab-band block;
}
[data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] :is(.ctab__grid, .ctab__hero, .ctab__avatar) {
  opacity: 1 !important;
  transform: none !important;
}
[data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar {
  animation: ae-ctab-tile-blur linear both;
  animation-timeline: --ae-ctab-band;
  animation-range: entry 0% entry 90%;
}
@keyframes ae-ctab-tile-blur {
  from { filter: blur(4px); }
  to { filter: blur(0); }
}
@media (min-width: 992px) {
  /* Live's Arabic headline column is 960px (English 832px). */
  [dir="rtl"] [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
    --ctab-hero-max-width: 960px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab--compact {
    --ctab-stage-height: 42rem;
    --ctab-section-min-height: 42rem;
  }
}
/*
 * 768–1279 (live `.footer-breaker_grid`, measured 2026-11-03): the grid is
 * 15 equal columns across the full width (68px at 1024, 51px at 768), Home 9
 * rows tall, the other pages 7; avatars fill one cell, on the same
 * desktop layout at tablet as at 1024. Our 13-column avatar layout sits one
 * cell in from the left. Headline column: 48px gutters, at most 832px
 * (Arabic 960px); the button keeps its own width.
 */
@media (min-width: 768px) and (max-width: 1279px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
    --ctab-grid-cell: calc(100vw / 15);
    --ctab-avatar-size: calc(100vw / 15);
    --ctab-avatar-radius: calc(100vw / 60);
    --ctab-hero-max-width: 832px;
    --ctab-stage-height: calc(100vw / 15 * 9);
    --ctab-section-min-height: calc(100vw / 15 * 9);
  }
  [dir="rtl"] [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
    --ctab-hero-max-width: 960px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab--compact {
    --ctab-stage-height: calc(100vw / 15 * 7);
    --ctab-section-min-height: calc(100vw / 15 * 7);
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__grid {
    background-position: 0 calc(1px - var(--ctab-grid-cell));
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__inner {
    max-width: calc(100vw / 15 * 13);
    padding-inline: 0;
  }
  /* Live sets the copy a little below the middle: 24px on Home, 36px on the 7-row band. */
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero {
    max-width: calc(100vw - 96px);
    flex-shrink: 0;
    top: 24px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab--compact .ctab__hero {
    top: 36px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar {
    left: var(--av-d-left, auto);
    right: var(--av-d-right, auto);
    top: var(--av-d-top, auto);
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar--desktop-only {
    display: block;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero a,
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero .button {
    width: auto;
  }
}
/* Tablet: live keeps only the top and bottom rows of avatars (the inner ones stay transparent).
 * Matched on the inline position. Both spellings: the reveal animation rewrites
 * the style attribute with a space after each colon. */
@media (min-width: 768px) and (max-width: 991px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 2)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 2)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 4)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 4)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 6)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 6)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-left:calc(var(--ctab-grid-cell) * 6)"][style*="--av-d-top:calc(var(--ctab-grid-cell) * 7)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar[style*="--av-d-left: calc(var(--ctab-grid-cell) * 6)"][style*="--av-d-top: calc(var(--ctab-grid-cell) * 7)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab--compact .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 3)"],
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab--compact .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 3)"] {
    display: none;
  }
}
@media (max-width: 767px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
    --ctab-grid-cell: 70px;
    --ctab-avatar-size: 70px;
    --ctab-hero-max-width: 100%;
    --ctab-stage-height: 654px;
    --ctab-section-min-height: 654px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__inner {
    padding-inline: 16px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero a,
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero .button {
    width: auto;
  }
}
/*
 * ≥1280 (live at 1440): the same 15-column grid of 96px cells from the left
 * edge, tiles in cells 1–13, copy 24px below the middle (our 1280px inner box
 * would put the tiles 16px left of live's).
 */
@media (min-width: 1280px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
    --ctab-grid-cell: 96px;
    --ctab-avatar-size: 96px;
    --ctab-avatar-radius: 24px;
    --ctab-hero-max-width: 832px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__grid {
    background-position: calc(50vw - 624px) calc(1px - var(--ctab-grid-cell));
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__inner {
    max-width: 1248px;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__hero {
    top: 24px;
  }
}
/*
 * Phones (live at 390): six 65px columns; tiles sit half a cell in, two on
 * the top row with one half a row lower between them, mirrored at the bottom
 * (rows 7.5 and 8.5). Our order: 1 middle, 2–3 sides, 4–5 sides, 6 middle.
 */
@media (max-width: 767px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab {
    --ctab-grid-cell: calc(100vw / 6);
    --ctab-avatar-size: calc(100vw / 6);
  }
  /* Top row in page order as live: left, right, then centre (X1, 2026-11-07; was centre, left, right). */
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(3) {
    top: calc(var(--ctab-grid-cell) * 1.5);
    left: calc(50% - var(--ctab-avatar-size) / 2);
    right: auto;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(6) {
    top: calc(var(--ctab-grid-cell) * 8.5);
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(1),
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(2) {
    top: calc(var(--ctab-grid-cell) * 0.5);
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(4),
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(5) {
    top: calc(var(--ctab-grid-cell) * 7.5);
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(1),
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(4) {
    left: calc(var(--ctab-grid-cell) / 2 - 16px);
    right: auto;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(2),
  [data-raven-slot^="markets/"][data-raven-slot$=":trade-today"] .ctab__avatar:nth-child(5) {
    left: auto;
    right: calc(var(--ctab-grid-cell) / 2 - 16px);
  }
}

/* ------------------------------------------------------------------ */
/* Hero layout (market pages and Deriv MT5)                            */
/* ------------------------------------------------------------------ */
/*
 * Live (Webflow CSS read 2026-11-05: `.home-hero_content_align-centre` >
 * `.home-hero_text-wrapper-align-centre.is-full-height` >
 * header / `.home-hero_button` / `.home-hero_bottom-image-block`):
 * - a 100vh column (at least 564px; 758.4px at ≤479), padded 96px on top at
 *   ≤991 and 72px at ≤479;
 * - inside it, heading, buttons and picture are one flex column padded 136px
 *   on top (80px at ≤991, 24px at ≤479, 192px from 1920), 16px apart (0 at
 *   ≤479) and centred vertically. The heading has 16px above it;
 * - the picture box takes the space that is left (flex 1 1 0) but never less
 *   than the picture (52vh from 1280, 48vh below); the picture (contain,
 *   bottom) sits at its foot, pushed 1.5vh lower.
 * So a long heading lifts the whole block: derived-indices AR at 1440 starts
 * its h1 at 100px and ends its buttons at 468px, above the picture at 498px.
 * Ours pinned the heading at 152px and the picture at a fixed 446px, so the
 * picture covered the buttons there (checker B1, N1, N2).
 */
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero {
  position: relative;
  overflow: hidden;
  height: auto;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__inner {
  height: 100vh;
  min-height: 564px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__content {
  height: 100%;
  box-sizing: border-box;
  padding-top: 136px;
  padding-bottom: 0;
  justify-content: center;
  gap: 16px;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] :is(.hero__text, .hero__buttons) {
  flex-shrink: 0;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__text {
  padding-top: 16px;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__product-image {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
  width: 48vh;
  height: auto;
  min-height: 48vh;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: visible;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__product-image img {
  flex: none;
  position: relative;
  top: 1.5vh;
  width: 100%;
  height: 100%;
  min-height: 284.8px;
  max-height: 48vh;
  object-fit: contain;
  object-position: 50% 100%;
}
@media (min-width: 1280px) {
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__product-image {
    width: 52vh;
    min-height: 52vh;
  }
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__product-image img {
    max-height: 52vh;
  }
}
@media (min-width: 1920px) {
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__content {
    padding-top: 192px;
  }
}
@media (max-width: 991px) {
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__inner {
    padding-top: 96px;
  }
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__content {
    padding-top: 80px;
  }
}
/* 480–767: live's heading keeps 16px under it and the copy 24px. */
@media (max-width: 767px) {
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__text {
    gap: 16px;
    padding-bottom: 24px;
  }
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__buttons {
    gap: 16px;
  }
}
/* Phones (≤479): heading 4px over the copy, copy 16px over the buttons, no
   gaps; the picture box runs edge to edge, clips, and may shrink. */
@media (max-width: 479px) {
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__inner {
    min-height: 758.4px;
    padding-top: 72px;
  }
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__content {
    padding-top: 24px;
    gap: 0;
  }
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__text {
    gap: 4px;
    padding-bottom: 16px;
  }
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__product-image {
    align-self: stretch;
    width: auto;
    min-height: 0;
    margin-inline: -16px;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
  }
  /* Live's phone picture fills its box (cover), as before. */
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__product-image img {
    object-fit: cover;
  }
}

/*
 * Hero buttons as live (`.button-primary`, measured 2026-11-05): labels
 * tracked 0.56px, buttons 16px apart. At 992–1092 live shrinks the whole
 * button group to 90% from its right edge (`.auth_component`), so the
 * buttons are 43px tall at 1024 (checker N8).
 */
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__buttons {
  gap: 16px;
}
:is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"] .hero__buttons .button {
  letter-spacing: 0.56px;
}
@media (min-width: 992px) and (max-width: 1092px) {
  /* Not on /ae/derivlife: its button is not scaled at 1024 (S9, measured 2026-11-08). */
  :is([data-raven-slot^="markets/"], :is([data-raven-slot^="trading-platforms/deriv-mt5:"], [data-raven-slot^="trading/cfds:"], [data-raven-slot="derivlife:hero"]))[data-raven-slot$=":hero"]:not([data-raven-slot="derivlife:hero"]) .hero__buttons {
    transform: scale(0.9);
    transform-origin: right center;
  }
}

/*
 * ── Batch 2 leftovers (X1, measured on live 2026-11-07) ──
 * Live's English ETFs hero is a plain h1 (weight 800, no <strong>); its Arabic
 * one has the <strong> (700) like the other market heroes. On Stocks, the first
 * "What we offer" card title ("UAE stocks", EN and AR) is a <strong> at 700.
 */
[data-raven-slot^="markets/"][data-raven-slot="markets/etfs:hero"] .hero__title {
  font-weight: 800;
}
[dir="rtl"] [data-raven-slot^="markets/"][data-raven-slot="markets/etfs:hero"] .hero__title {
  font-weight: 700;
}
[data-raven-slot="markets/stocks:what-we-offer"] .smc__card:first-child .smc__card-title {
  font-weight: 700;
}
/*
 * "What we offer" cards (X1, checker r2 minor 8; live 2026-11-07): live's title
 * and description boxes are each at least 216px tall (48px padding, copy centred
 * in the 120px between). The pair is centred in a 250px card; a card a long
 * title (or Arabic) makes taller keeps the description at the top of its row.
 * Ours centred the description in the whole card (ETFs card 3: 20px low; Arabic
 * cards up to 40px low).
 */
@media (min-width: 768px) {
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] .smc__card-content {
    height: auto;
    align-items: start;
  }
  [data-raven-slot^="markets/"][data-raven-slot$=":what-we-offer"] :is(.smc__card-title-wrap, .smc__card-desc-wrap) {
    min-height: 216px;
    display: flex;
    align-items: center;
  }
}

/*
 * /ae/derivlife (S9, 2026-11-08): live's Deriv Life hero is the same
 * `.section_hero_markets` layout (heading at 152 / 192 / 112px, picture 468px
 * tall from 1280, 432px below, bottom-anchored), measured at 1440, 1024, 768 and
 * 390, EN and AR. Its heading is a plain h1 (weight 800, -0.56px) and its
 * picture is wider than the market ones (656×468), so the picture box keeps that
 * ratio instead of the square 48vh / 52vh.
 */
[data-raven-slot="derivlife:hero"] .hero__title {
  letter-spacing: -0.56px;
}
[data-raven-slot="derivlife:hero"][data-raven-slot$=":hero"] .hero__product-image {
  width: calc(48vh * 656 / 468);
}
@media (min-width: 1280px) {
  [data-raven-slot="derivlife:hero"][data-raven-slot$=":hero"] .hero__product-image {
    width: calc(52vh * 656 / 468);
  }
}
@media (max-width: 479px) {
  [data-raven-slot="derivlife:hero"][data-raven-slot$=":hero"] .hero__product-image {
    width: auto;
  }
  /* Live keeps the whole picture on phones (contain), unlike the market heroes. */
  [data-raven-slot="derivlife:hero"][data-raven-slot$=":hero"] .hero__product-image img {
    object-fit: contain;
  }
}
