/*
 * Live-UAE looks shared by every UAE page: the closing "Join 3M+" band
 * (`[data-raven-slot$=":join-cta"]`). Scoped to UAE slot bands only.
 */

/*
 * Live closer (`.seciton-footer-breaker`, measured 2026-11-01): who-we-are and
 * kyc-guide 672px at 1440 (Home is the taller standard band, 864px), 654px on
 * phones (Home 715px) with 70px avatars; headline spans the 16px-gutter
 * column; the button keeps its own width (165px) and live's slate
 * rgb(24,28,37) fill.
 */
[data-raven-slot$=":join-cta"] .ctab__hero .button.black_primary {
  background-color: #181c25;
}
@media (min-width: 992px) {
  /* Live's Arabic headline column is 960px (English 832px). */
  [dir="rtl"] [data-raven-slot$=":join-cta"] .ctab {
    --ctab-hero-max-width: 960px;
  }
  [data-raven-slot$=":join-cta"] .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$=":join-cta"] .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$=":join-cta"] .ctab {
    --ctab-hero-max-width: 960px;
  }
  [data-raven-slot$=":join-cta"] .ctab--compact {
    --ctab-stage-height: calc(100vw / 15 * 7);
    --ctab-section-min-height: calc(100vw / 15 * 7);
  }
  [data-raven-slot$=":join-cta"] .ctab__grid {
    background-position: 0 calc(1px - var(--ctab-grid-cell));
  }
  [data-raven-slot$=":join-cta"] .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$=":join-cta"] .ctab__hero {
    max-width: calc(100vw - 96px);
    flex-shrink: 0;
    top: 24px;
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__hero {
    top: 36px;
  }
  [data-raven-slot$=":join-cta"] .ctab__avatar {
    left: var(--av-d-left, auto);
    right: var(--av-d-right, auto);
    top: var(--av-d-top, auto);
  }
  [data-raven-slot$=":join-cta"] .ctab__avatar--desktop-only {
    display: block;
  }
  [data-raven-slot$=":join-cta"] .ctab__hero a,
  [data-raven-slot$=":join-cta"] .ctab__hero .button {
    width: auto;
  }
}
/*
 * ≥1280 (live at 1440, measured 2026-11-07 on who-we-are and MT5): the same
 * as the market closer in markets.css: 96px cells from the left edge and the
 * copy 24px below the middle. The 7-row band only: Home's 9-row band
 * already matched. Without it the heading sat 24px high (Who we
 * are −26px, MT5 −19px at 1440; checker r2 minor 6).
 */
@media (min-width: 1280px) {
  [data-raven-slot$=":join-cta"] .ctab--compact {
    --ctab-grid-cell: 96px;
    --ctab-avatar-size: 96px;
    --ctab-avatar-radius: 24px;
    --ctab-hero-max-width: 832px;
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__grid {
    background-position: calc(50vw - 624px) calc(1px - var(--ctab-grid-cell));
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__inner {
    max-width: 1248px;
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__hero {
    top: 24px;
  }
}
/* 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$=":join-cta"] .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 2)"],
  [data-raven-slot$=":join-cta"] .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 2)"],
  [data-raven-slot$=":join-cta"] .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 4)"],
  [data-raven-slot$=":join-cta"] .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 4)"],
  [data-raven-slot$=":join-cta"] .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 6)"],
  [data-raven-slot$=":join-cta"] .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 6)"],
  [data-raven-slot$=":join-cta"] .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$=":join-cta"] .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$=":join-cta"] .ctab--compact .ctab__avatar[style*="--av-d-top:calc(var(--ctab-grid-cell) * 3)"],
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar[style*="--av-d-top: calc(var(--ctab-grid-cell) * 3)"] {
    display: none;
  }
}
@media (max-width: 767px) {
  [data-raven-slot$=":join-cta"] .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="home:join-cta"] .ctab {
    --ctab-stage-height: 715px;
    --ctab-section-min-height: 715px;
  }
  [data-raven-slot$=":join-cta"] .ctab__inner {
    padding-inline: 16px;
  }
  [data-raven-slot$=":join-cta"] .ctab__hero a,
  [data-raven-slot$=":join-cta"] .ctab__hero .button {
    width: auto;
  }
}

/*
 * UAE footer (live `footer.footer-component`, measured 2026-11-01 at 390):
 * logo (24px tall) and social icons share the top row; the AI box is a faint
 * white wash; legal copy is white at 72%. The header carries
 * `.raven-ae-navbar` on UAE pages only, so `body:has()` keeps this off ROW/EU.
 */
body:has(header.raven-ae-navbar) .footer .footer__ai-bar {
  background-color: rgba(255, 255, 255, 0.04);
}
body:has(header.raven-ae-navbar) .footer .footer__license,
body:has(header.raven-ae-navbar) .footer .footer__license a {
  color: rgba(255, 255, 255, 0.72);
}
/* Live footer container: 1328px max with 24px gutters (1280px of content). */
@media (min-width: 992px) {
  body:has(header.raven-ae-navbar) .footer .footer__inner {
    max-width: 1328px;
    padding-inline: 24px;
  }
  /* Live's link headings start 35px below the header rule (DS gap: 43px). */
  body:has(header.raven-ae-navbar) .footer .footer__header {
    margin-bottom: -8px;
  }
  /*
   * Live link columns (`.footer_menu-slot-wrapper`, measured 2026-11-03):
   * four equal tracks, 20px apart, never narrower than 188px; the Deriv App
   * card (12rem) sits 8px after them and gives way first (156px at 1024).
   */
  body:has(header.raven-ae-navbar) .footer .footer__nav--columns {
    gap: 20px;
    justify-content: flex-start;
  }
  body:has(header.raven-ae-navbar) .footer .footer__column {
    flex: 1 1 0;
    min-width: 188px;
    max-width: none;
  }
  /* Each live link list is 188px wide inside its track, so long links wrap. */
  body:has(header.raven-ae-navbar) .footer .footer__column > .footer__nav-section {
    width: 188px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__sidebar {
    flex: 0 1 192px;
    width: auto;
    min-width: 0;
    margin-inline-start: -12px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-card {
    width: 100%;
  }
  /* Live links are 20px lines 16px apart (36px rows). */
  body:has(header.raven-ae-navbar) .footer .footer__nav-link {
    line-height: 20px;
  }
  /* Live rule under the link block: 48px below the links, 40px above the legal copy. */
  body:has(header.raven-ae-navbar) .footer .footer__legal-block {
    margin-top: 8px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}
/*
 * Live "Ask AI for a summary of Deriv" pill (`.footer_ai-wrapper`, 1440–768):
 * 372×48, padding 8/8/8/16, 14px label, four 32px icon slots 2px apart.
 */
@media (min-width: 768px) {
  /* Live header row: logo 24px tall plus 16px after it; social icons 4px apart. */
  body:has(header.raven-ae-navbar) .footer .footer__logo {
    height: 24px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__logo-wrapper {
    padding-inline-end: 16px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__social--in-header {
    gap: 4px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-card .footer__deriv-go-logo {
    width: 32px;
    height: 32px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar.footer__ai-bar--inline {
    padding: 8px 8px 8px 16px;
    gap: 16px;
  }
  [dir="rtl"] body:has(header.raven-ae-navbar) .footer .footer__ai-bar.footer__ai-bar--inline {
    padding: 8px 16px 8px 8px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar--inline .footer__ai-bar-label {
    font-size: 14px;
    line-height: 20px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar--inline .footer__ai-bar-icons {
    gap: 2px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar--inline .footer__ai-bar-icons > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }
}
/*
 * Tablet (768–991, live measured 2026-11-03): the header keeps the Ask AI
 * pill; the link accordion and the Deriv App card (with QR code, 192px)
 * sit side by side, 16px apart; a faint rule 40px below them, then the
 * legal copy. Live pads the footer 48px top and bottom; headings are 18px.
 */
@media (min-width: 768px) and (max-width: 991px) {
  body:has(header.raven-ae-navbar) .footer .footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 192px;
    column-gap: 16px;
    row-gap: 32px;
    align-items: start;
    padding-block: 48px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__inner > * {
    grid-column: 1 / -1;
  }
  body:has(header.raven-ae-navbar) .footer .footer__header {
    grid-row: 1;
  }
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar.footer__ai-bar--inline {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  body:has(header.raven-ae-navbar) .footer .footer__nav--accordion {
    grid-column: 1;
    grid-row: 2;
  }
  body:has(header.raven-ae-navbar) .footer .footer__accordion-label {
    font-size: 18px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__nav--columns {
    display: block;
    grid-column: 2;
    grid-row: 2;
  }
  body:has(header.raven-ae-navbar) .footer .footer__nav--columns > .footer__column {
    display: none;
  }
  body:has(header.raven-ae-navbar) .footer .footer__sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 192px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-card {
    width: 192px;
    padding: 16px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-card .footer__app-badges {
    grid-template-columns: 1fr;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-card .footer__deriv-go-qr {
    gap: 16px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-banner {
    display: none;
  }
  body:has(header.raven-ae-navbar) .footer .footer__legal-block {
    grid-row: 3;
    margin-top: 8px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}
@media (max-width: 767px) {
  /* Live's store badges are full-width 32px-tall images inside the 48px pill. */
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-banner .footer__app-badge img,
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-banner .footer__app-badge svg {
    width: 100%;
    height: 32px;
    object-fit: contain;
  }
  body:has(header.raven-ae-navbar) .footer .footer__header {
    justify-content: space-between;
  }
  body:has(header.raven-ae-navbar) .footer .footer__logo {
    height: 24px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__social--in-header {
    display: flex;
  }
  body:has(header.raven-ae-navbar) .footer .footer__social--standalone {
    display: none;
  }
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-banner {
    padding: 16px;
  }
}

/*
 * Footer details (live, measured 2026-11-05 at 390/768/1440).
 * Legal paragraphs are one 20px blank line apart on live (`<br>‍<br>`), not 16px.
 */
body:has(header.raven-ae-navbar) .footer .footer__license p:not(:last-child) {
  margin-bottom: 20px;
}
/*
 * Phone/tablet link menu: live's chevron is a 14x8 glyph with a 2px line in a
 * 16px-wide slot at the row's end (18px at tablet); the DS one is 10x6, 1.5px,
 * in a 24px slot. The third heading reads "Platforms" there (the desktop
 * column says "Platform"); both come from one AE_FOOTER_NAV_COLUMNS entry, so
 * only the English menu label gets the "s". Live Arabic has no phone menu.
 */
@media (max-width: 991px) {
  body:has(header.raven-ae-navbar) .footer .footer__accordion-chevron {
    width: 16px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__accordion-chevron svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  body:has(header.raven-ae-navbar) .footer .footer__accordion-chevron svg path {
    stroke-width: 1.33;
  }
  html:lang(en) body:has(header.raven-ae-navbar) .footer .footer__accordion-item:nth-child(3) .footer__accordion-label::after {
    content: "s";
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  body:has(header.raven-ae-navbar) .footer .footer__accordion-chevron {
    width: 18px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__accordion-chevron svg {
    width: 20px;
    height: 20px;
  }
}
/*
 * Phones: live pads the footer 48px at the bottom (DS 32px) and draws a faint
 * rule 40px below the app card, 32px above the legal copy (DS: none).
 */
@media (max-width: 767px) {
  body:has(header.raven-ae-navbar) .footer .footer__inner {
    padding-bottom: 48px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__legal-block {
    margin-top: 8px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/*
 * FAQ chevrons (live `.accordion_toggle-arrow`, every UAE FAQ, all widths):
 * a 14x8 glyph with a 2px line, centred in a 24px box. The DS draws 10x6 at
 * 1.5px. Same box, so the row layout doesn't move.
 */
body:has(header.raven-ae-navbar) .accordion__chevron svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
body:has(header.raven-ae-navbar) .accordion__chevron svg path {
  stroke-width: 1.33;
}

/*
 * FAQ text (live `.accordion_toggle-heading-3`, measured 2026-11-05, forex
 * 1440 and 390): questions black on 28px lines (DS slate, 27px), chevron
 * black at 72%; an open answer keeps 32px below it (DS 24px).
 */
body:has(header.raven-ae-navbar) .faq-accordion__list .accordion__header {
  color: #000;
}
body:has(header.raven-ae-navbar) .faq-accordion__list .accordion__title {
  color: #000;
  line-height: 28px;
}
body:has(header.raven-ae-navbar) .faq-accordion__list .accordion__chevron {
  color: rgba(0, 0, 0, 0.72);
}
body:has(header.raven-ae-navbar) .faq-accordion__list .accordion__body {
  padding-bottom: 32px;
}

/*
 * Footer details (live, measured 2026-11-05).
 * Desktop links are only as wide as their text (live `display:flex` items).
 * Phone/tablet menu: live groups Trade/Platforms/Payments/Tools and
 * Learning & support/Legal, with 4px between rows inside a group.
 * Phones: "Ask AI for a summary of Deriv" is 14px; icons 16px apart.
 * Arabic: live sets the column headings, the Ask AI label and the Deriv App
 * card text in "Inter, Arial", so Arabic draws in Arial and Latin in Inter
 * (browser used-font report, forex AR 1440); links and legal copy stay
 * Noto Sans Arabic.
 */
@media (min-width: 992px) {
  body:has(header.raven-ae-navbar) .footer .footer__nav-link {
    width: fit-content;
  }
}
@media (max-width: 991px) {
  body:has(header.raven-ae-navbar) .footer .footer__accordion-item:is(:nth-child(3), :nth-child(4), :nth-child(5), :nth-child(8)) {
    margin-top: 4px;
  }
}
@media (max-width: 767px) {
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar-label {
    font-size: 14px;
  }
  body:has(header.raven-ae-navbar) .footer .footer__ai-bar-icons {
    gap: 16px;
  }
}
body:has(header.raven-ae-navbar) :is([dir="rtl"] .footer) :is(.footer__nav-title, .footer__ai-bar-label, .footer__deriv-go-title, .footer__deriv-go-desc, .footer__deriv-go-qr-label) {
  --font-family-base: Inter, Arial, sans-serif;
  font-family: Inter, Arial, sans-serif;
}

/*
 * Closing band motion as live (same as the market `:trade-today` band in
 * markets.css): the heading, button and tiles never fade or slide; only the
 * tiles blur, 4px below the screen to 0 about 90% of the band in. The DS
 * block writes opacity/transform inline, hence !important; the blur is a
 * scroll-driven animation (without scroll timelines it ends at blur 0).
 */
[data-raven-slot$=":join-cta"] .ctab {
  view-timeline: --ae-join-cta-band block;
}
[data-raven-slot$=":join-cta"] :is(.ctab__grid, .ctab__hero, .ctab__avatar) {
  opacity: 1 !important;
  transform: none !important;
}
[data-raven-slot$=":join-cta"] .ctab__avatar {
  animation: ae-join-cta-tile-blur linear both;
  animation-timeline: --ae-join-cta-band;
  animation-range: entry 0% entry 90%;
}
@keyframes ae-join-cta-tile-blur {
  from { filter: blur(4px); }
  to { filter: blur(0); }
}

/*
 * Tile order in the 7-row closing band (X1, checker r2 minor 10; live
 * 2026-11-07 on forex, stocks, who-we-are and MT5). Live's tiles in page order
 * go top-left, top-centre, top-right; the design system puts the first avatar
 * top-centre and the second top-left, so the first two came out swapped (forex:
 * UK/CA where live shows US/JP). On phones live's top row is left, right,
 * centre. The avatars carry their places as inline variables; these win over
 * them. Home's 9-row band uses another layout and is not changed.
 */
:is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"]) .ctab--compact .ctab__avatar:nth-child(1) {
  --av-d-left: calc(var(--ctab-grid-cell) * 2) !important;
}
:is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"]) .ctab--compact .ctab__avatar:nth-child(2) {
  --av-d-left: calc(50% - var(--ctab-avatar-size) / 2) !important;
}
/*
 * Phones, the 7-row join-cta band (who-we-are, MT5; live at 390 2026-11-07):
 * the same tiles as the market closer (markets.css): six 65px cells, the top
 * row in page order left, right, then centre half a cell lower, the bottom
 * row at 7.5 and 8.5 cells. Ours had 70px tiles 37px and 107px lower.
 */
@media (max-width: 767px) {
  [data-raven-slot$=":join-cta"] .ctab--compact {
    --ctab-grid-cell: calc(100vw / 6);
    --ctab-avatar-size: calc(100vw / 6);
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .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$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(6) {
    top: calc(var(--ctab-grid-cell) * 8.5);
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(1),
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(2) {
    top: calc(var(--ctab-grid-cell) * 0.5);
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(4),
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(5) {
    top: calc(var(--ctab-grid-cell) * 7.5);
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(1),
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(4) {
    left: calc(var(--ctab-grid-cell) / 2 - 16px);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(2),
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__avatar:nth-child(5) {
    left: auto;
    right: calc(var(--ctab-grid-cell) / 2 - 16px);
  }
}

/*
 * Phones, "Join 3M+" band grid and photos (frame item 6, T5 checker M4; live
 * 2026-11-08 on Who we are and a market-news post at 390).
 * - Grid: live draws 1px rgb(255,126,136) lines on cells of 100vw / 6, starting
 *   half a cell in (the 7-row band's rows too; Home's rows start at the top),
 *   so they run along the tile edges, and fades them to the band colour
 *   towards the corners (a radial overlay). Ours kept the design system's
 *   faint white lines a whole cell in, masked at the edges.
 * - Photos: live shows six phone-only photos (`is-mobile`); PageRenderer adds
 *   them after the seven desktop tiles (`ctab--ae-phone-tiles`,
 *   lib/shared/site/ae-join-cta.ts). In the 7-row band they take the places
 *   the first six tiles had (Home's take the design system's phone places);
 *   they never show from 768px up.
 */
@media (max-width: 767px) {
  [data-raven-slot$=":join-cta"] .ctab__grid {
    background-image:
      linear-gradient(to right, transparent calc(100% - 1px), rgb(255, 126, 136) calc(100% - 1px)),
      linear-gradient(to bottom, transparent calc(100% - 1px), rgb(255, 126, 136) calc(100% - 1px));
    background-size: calc(100vw / 6) calc(100vw / 6);
    background-position: calc(100vw / -12) 0;
    -webkit-mask-image: radial-gradient(circle, #000, transparent);
    mask-image: radial-gradient(circle, #000, transparent);
  }
  /* The 7-row band's rows start half a cell down too (Home's start at the top). */
  [data-raven-slot$=":join-cta"] .ctab--compact .ctab__grid {
    background-position: calc(100vw / -12) calc(100vw / -12);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(10) {
    top: calc(var(--ctab-grid-cell) * 1.5);
    left: calc(50% - var(--ctab-avatar-size) / 2);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(13) {
    top: calc(var(--ctab-grid-cell) * 8.5);
    left: calc(50% - var(--ctab-avatar-size) / 2);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(8),
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(9) {
    top: calc(var(--ctab-grid-cell) * 0.5);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(11),
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(12) {
    top: calc(var(--ctab-grid-cell) * 7.5);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(8),
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(11) {
    left: calc(var(--ctab-grid-cell) / 2 - 16px);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(9),
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles .ctab__avatar:nth-child(12) {
    left: auto;
    right: calc(var(--ctab-grid-cell) / 2 - 16px);
  }
  /* Home: its 12 desktop tiles come first; the phone tiles (13-18) take the
     places tiles 1, 3, 4, 5, 7 and 8 had (rules further down), mirrored in Arabic. */
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(13), :nth-child(14)) {
    top: var(--ctab-grid-cell);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:nth-child(15) {
    top: calc(var(--ctab-grid-cell) * 2);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(16), :nth-child(17)) {
    top: calc(var(--ctab-grid-cell) * 8);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:nth-child(18) {
    top: calc(var(--ctab-grid-cell) * 9);
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(15), :nth-child(18)) {
    left: calc(50% - var(--ctab-avatar-size) / 2);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(13), :nth-child(16)),
  [dir="rtl"] [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(14), :nth-child(17)) {
    left: calc(var(--ctab-grid-cell) / 2 - 16px);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(14), :nth-child(17)),
  [dir="rtl"] [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:is(:nth-child(13), :nth-child(16)) {
    left: auto;
    right: calc(var(--ctab-grid-cell) / 2 - 16px);
  }
}
@media (min-width: 768px) {
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles.ctab--compact .ctab__avatar:nth-child(n + 8),
  [data-raven-slot$=":join-cta"] .ctab--ae-phone-tiles:not(.ctab--compact) .ctab__avatar:nth-child(n + 13) {
    display: none;
  }
}

/*
 * Closing band depth motion (S1 checker N1; live 2026-11-07 on who-we-are,
 * forex at 1440/1024/768/600/390): live's tiles sit under a 4000px perspective
 * centred on the band and start pushed 600px towards the viewer (300px on
 * phones), so they look ~18% larger and spread from the centre (7% on phones).
 * They settle, eased, from the moment the band enters until its centre reaches
 * about 70% of the viewport height (phones: 15vh past the middle of the band
 * entering). Ours were still. Scroll-driven, on the band's stage (the tiles'
 * parent); `translate` leaves the frozen DS `transform` alone. It also carries
 * the existing blur, so MT5 and the market band (which set their own) use one
 * timeline. Without scroll timelines or with reduced motion: no motion.
 */
@media (prefers-reduced-motion: no-preference) {
  /* `clip` clips like `hidden` but is not a scroll container, so the stage's
     view timeline follows the page scroll (with `hidden` it never moved). */
  :is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"]) .ctab {
    overflow: clip;
  }
  :is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"]) .ctab__stage {
    view-timeline: --ae-closer-stage block;
    perspective: 4000px;
    perspective-origin: 50% 50%;
    --ae-closer-depth: 600px;
    --ae-closer-end: calc(50% + 30vh);
  }
  :is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"])[data-raven-slot] .ctab__stage > .ctab__avatar {
    animation: ae-join-cta-tile-blur linear both, ae-closer-depth ease-in-out both;
    animation-timeline: --ae-closer-stage, --ae-closer-stage;
    animation-range: entry 0% entry 90%, entry 0% entry var(--ae-closer-end);
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  :is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"]) .ctab__stage {
    --ae-closer-depth: 300px;
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 479px) {
  :is([data-raven-slot$=":join-cta"], [data-raven-slot$=":trade-today"]) .ctab__stage {
    --ae-closer-end: calc(50% + 15vh);
  }
}
@keyframes ae-closer-depth {
  from { translate: 0 0 var(--ae-closer-depth); }
  to { translate: 0 0 0; }
}

/*
 * Footer link rows (S1 checker M6; live 2026-11-07 at 1440): every row is 20px
 * with 16px between. An external link (icon, inline-flex) sat on the list
 * item's 24px line, so each such row was 4px taller and pushed the rest of its
 * column down (Careers +3 … Deriv<ed> +11, the Learning & support and Legal
 * column +4).
 */
body:has(header.raven-ae-navbar) .footer .footer__nav-links > li {
  line-height: 20px;
}
/* Deriv App card (≥768): live puts the description 8px under the title row (ours used the card's 16px gap). */
@media (min-width: 768px) {
  body:has(header.raven-ae-navbar) .footer .footer__deriv-go-desc {
    margin-top: -8px;
  }
}
/* Links inside the licence and risk text: live's 24px line height (it opens up their line). */
body:has(header.raven-ae-navbar) .footer .footer__license a {
  line-height: 24px;
}
/*
 * Phones, Home's 9-row join-cta band (live 2026-11-07 at 390, EN and AR): the
 * same 65px tiles as the 7-row band, half a cell lower (tops 1, 2, 8 and 9
 * cells), and mirrored in Arabic (live's first tile is top-right there). The
 * phone shows avatars 1, 3, 4, 5, 7 and 8 (the rest are desktop-only); in that
 * order they go top-left, top-right, top-centre, bottom-left, bottom-right,
 * bottom-centre, as live's tiles do. Ours kept the DS layout (70px tiles, the
 * pattern inverted, the bottom one cut by the band's foot).
 */
@media (max-width: 767px) {
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) {
    --ctab-grid-cell: calc(100vw / 6);
    --ctab-avatar-size: calc(100vw / 6);
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(1), :nth-child(3)) {
    top: var(--ctab-grid-cell);
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:nth-child(4) {
    top: calc(var(--ctab-grid-cell) * 2);
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(5), :nth-child(7)) {
    top: calc(var(--ctab-grid-cell) * 8);
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:nth-child(8) {
    top: calc(var(--ctab-grid-cell) * 9);
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(4), :nth-child(8)) {
    left: calc(50% - var(--ctab-avatar-size) / 2);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(1), :nth-child(5)),
  [dir="rtl"] [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(3), :nth-child(7)) {
    left: calc(var(--ctab-grid-cell) / 2 - 16px);
    right: auto;
  }
  [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(3), :nth-child(7)),
  [dir="rtl"] [data-raven-slot$=":join-cta"] .ctab:not(.ctab--compact) .ctab__avatar:is(:nth-child(1), :nth-child(5)) {
    left: auto;
    right: calc(var(--ctab-grid-cell) / 2 - 16px);
  }
}

/*
 * "Live chat" in the closing band (S9 checker M3, live /ae/help-centre 2026-11-08): live
 * draws Font Awesome's two-bubbles glyph (U+F4B6, `.button_left-icon`, 16px tall, 8px
 * before the label). The glyph's outline is inlined here (from live's own
 * fa-regular-400 font), so no font or Webflow file is loaded.
 */
[data-raven-slot$=":join-cta"] a[href="#live-chat"] .button::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%20-64%20640%20512'%3E%3Cpath%20transform='matrix%281%200%200%20-1%200%20384%29'%20d='M48%20376Q50%20398%2072%20400H344Q366%20398%20368%20376V200Q366%20178%20344%20176H216Q209%20176%20203%20172L144%20133V152Q142%20174%20120%20176H72Q50%20178%2048%20200V376ZM72%20448Q41%20447%2021%20427Q1%20407%200%20376V200Q1%20169%2021%20149Q41%20129%2072%20128H96V88Q97%2074%20109%2067Q121%2061%20133%2068L223%20128H344Q375%20129%20395%20149Q415%20169%20416%20200V376Q415%20407%20395%20427Q375%20447%20344%20448H72ZM256%2072Q257%2041%20277%2021Q297%201%20328%200H417L507%20-60Q519%20-67%20531%20-61Q543%20-54%20544%20-40V0H568Q599%201%20619%2021Q639%2041%20640%2072V248Q639%20279%20619%20299Q599%20319%20568%20320H448V272H568Q590%20270%20592%20248V72Q590%2050%20568%2048H520Q498%2046%20496%2024V5L437%2044Q431%2048%20424%2048H328Q306%2050%20304%2072V96H256V72Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%20-64%20640%20512'%3E%3Cpath%20transform='matrix%281%200%200%20-1%200%20384%29'%20d='M48%20376Q50%20398%2072%20400H344Q366%20398%20368%20376V200Q366%20178%20344%20176H216Q209%20176%20203%20172L144%20133V152Q142%20174%20120%20176H72Q50%20178%2048%20200V376ZM72%20448Q41%20447%2021%20427Q1%20407%200%20376V200Q1%20169%2021%20149Q41%20129%2072%20128H96V88Q97%2074%20109%2067Q121%2061%20133%2068L223%20128H344Q375%20129%20395%20149Q415%20169%20416%20200V376Q415%20407%20395%20427Q375%20447%20344%20448H72ZM256%2072Q257%2041%20277%2021Q297%201%20328%200H417L507%20-60Q519%20-67%20531%20-61Q543%20-54%20544%20-40V0H568Q599%201%20619%2021Q639%2041%20640%2072V248Q639%20279%20619%20299Q599%20319%20568%20320H448V272H568Q590%20270%20592%20248V72Q590%2050%20568%2048H520Q498%2046%20496%2024V5L437%2044Q431%2048%20424%2048H328Q306%2050%20304%2072V96H256V72Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
