/* FxMoody iOS parity: BrokerListView, BrokerDetailView, BrokerRankingView,
 * BrokerCompareView and RegulatorListView/RegulatorDetailStyle.
 * The desktop cascade is intentionally outside this media query. */
@media (max-width: 767.98px) {
  :is(.fxm-broker-directory, .fxm-regulator-directory, [data-fxm-broker-detail-page],
      [data-fxm-regulator-detail-page], [data-fxm-rankings-page],
      [data-fxm-broker-compare-page], [data-fxm-disclosure-detail-page]) {
    --color-primary: var(--fxm-ios-brand, #6040c0);
    --broker-ink: var(--fxm-ios-ink, #1c1c21);
    --broker-muted: var(--fxm-ios-secondary, #6b7380);
    --broker-line: var(--fxm-ios-border, #e9edf2);
    --regulator-ink: var(--fxm-ios-ink, #1c1c21);
    --regulator-muted: var(--fxm-ios-secondary, #6b7380);
    --regulator-line: var(--fxm-ios-border, #e9edf2);
    background: var(--fxm-ios-page, #f8f9fb);
    color: var(--fxm-ios-ink, #1c1c21);
    font-family: var(--fxm-ios-font, -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 14px;
    line-height: 1.5;
  }

  /* Native list chrome: one quiet search field and a compact filter toolbar. */
  .fxm-broker-directory, .fxm-regulator-directory {
    padding-top: calc(var(--fxm-m-header, 56px) + 12px);
    background: linear-gradient(150deg, #eee6fa 0, #eef7f4 150px, #fff 320px);
    background-repeat: no-repeat;
    background-color: #fff;
  }
  .fxm-broker-directory__container, .fxm-regulator-directory__container { padding-inline: 16px; }
  .fxm-broker-breadcrumb, .fxm-regulator-breadcrumb { display: none; }
  .fxm-broker-search, .fxm-regulator-search { gap: 10px; margin: 0 0 8px; }
  .fxm-broker-search__field, .fxm-regulator-search__field {
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.75);
    background: rgba(255,255,255,.64);
    border-radius: 24px;
    padding-inline: 12px;
    gap: 8px;
    box-shadow: none;
  }
  .fxm-broker-search input[type=search], .fxm-regulator-search input[type=search] {
    height: 44px;
    font-size: 16px;
    color: var(--fxm-ios-ink, #1c1c21);
  }
  .fxm-broker-search > button, .fxm-regulator-search > button {
    min-width: 64px;
    min-height: 44px;
    padding-inline: 12px;
    border: 1px solid var(--fxm-ios-brand, #6040c0);
    background: rgba(255,255,255,.45);
    color: var(--fxm-ios-brand, #6040c0);
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
    box-shadow: none;
  }
  .fxm-broker-directory__layout, .fxm-regulator-directory__layout { gap: 0; }
  .fxm-broker-filters__mobile-summary, .fxm-regulator-filters__mobile-summary {
    min-height: 44px;
    height: auto;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--fxm-ios-ink, #1c1c21);
    border: 0;
    border-radius: 22px;
    background: var(--fxm-ios-field, #f2f3f5);
  }
  .fxm-broker-results__toolbar, .fxm-regulator-results__toolbar {
    min-height: 48px;
    margin-bottom: 0;
    gap: 8px;
    border-bottom: .5px solid var(--fxm-ios-border, #e9edf2);
  }
  .fxm-broker-results__toolbar > p, .fxm-regulator-results__toolbar > p {
    font-size: 12px;
    white-space: normal;
    line-height: 1.5;
    color: var(--fxm-ios-secondary, #6b7380);
  }
  .fxm-broker-results__toolbar strong, .fxm-regulator-results__toolbar strong {
    font-family: var(--fxm-ios-number-font, 'FxBarlow', sans-serif);
    font-size: 16px;
    font-weight: 500;
  }
  .fxm-broker-sort, .fxm-regulator-sort {
    min-height: 44px;
    padding-inline: 10px 2px;
    border: 0;
    border-radius: 24px;
    background: var(--fxm-ios-field, #f2f3f5);
  }
  .fxm-broker-sort :is(select, button), .fxm-regulator-sort :is(select, a),
  .fxm-broker-sort .fxm-directory-select-trigger, .fxm-regulator-sort .fxm-directory-select-trigger { min-height: 44px; font-size: 14px; }
  .fxm-broker-sort > button[data-fxm-sort-direction], .fxm-regulator-sort > a { min-width: 44px; }
  .fxm-broker-data-notice { font-size: 11px; margin: 8px 0 0; color: var(--fxm-ios-secondary, #6b7380); }

  /* The list preserves its web-only metadata below the iOS identity/score row. */
  .fxm-broker-result-list, .fxm-regulator-result-list { display: block; }
  .fxm-broker-row {
    position: relative;
    padding: 12px 0 0;
    border: 0;
    border-bottom: .5px solid var(--fxm-ios-border, #e9edf2);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color .18s ease;
  }
  .fxm-broker-row:hover { border-color: var(--fxm-ios-border, #e9edf2); box-shadow: none; }
  .fxm-broker-row__main {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 62px;
    align-items: start;
    gap: 8px;
    padding-bottom: 4px;
    min-height: 104px;
  }
  .fxm-broker-row__logo {
    grid-column: 1;
    grid-row: 1;
    width: 72px;
    height: 56px;
    border: .5px solid var(--fxm-ios-border, #e9edf2);
    border-radius: 9px;
    background: rgba(255,255,255,.72);
    align-self: start;
  }
  .fxm-broker-row__logo img { object-fit: contain; border-radius: 8px; }
  .fxm-broker-row__identity { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
  .fxm-broker-row__heading { display: flex; flex-wrap: wrap; gap: 3px 6px; margin-bottom: 5px; }
  .fxm-broker-row__heading h2 {
    font-family: var(--fxm-ios-brand-font, 'FxOutfit', sans-serif);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -.2px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .fxm-broker-status { gap: 3px; padding: 2px 4px; font-size: 11px; border-radius: 5px; font-weight: 400; }
  .fxm-broker-row__regulators { display: flex; flex-wrap: wrap; gap: 3px; font-size: 11px; line-height: 1.45; }
  .fxm-broker-row__regulators > span {
    border: .5px solid rgba(96,64,192,.15);
    border-radius: 5px;
    padding: 2px 4px;
    color: var(--fxm-ios-ink, #1c1c21);
    background: transparent;
  }
  .fxm-broker-row__regulators > span + span::before { content: none; }
  .fxm-broker-regulators-more > summary { min-width: 44px; min-height: 44px; padding: 10px 4px; margin-top: -10px; }
  .fxm-broker-row__facts { margin-top: 4px; font-size: 12px; line-height: 1.5; }
  .fxm-broker-row__facts > span + span::before { margin-inline: 3px; }
  .fxm-broker-row__risks { margin-top: 4px; font-size: 11px; }
  .fxm-broker-row__score {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    min-height: 0;
    padding: 0;
    text-align: right;
  }
  .fxm-broker-row__score > span { font-size: 11px; line-height: 1.4; white-space: normal; }
  .fxm-broker-row__score > span { order: 2; }
  .fxm-broker-row__score > div { order: 1; display: flex; align-items: baseline; gap: 1px; margin: 0; }
  .fxm-broker-row__score > button { order: 3; margin-right: -8px; }
  .fxm-broker-row__score strong {
    font-family: var(--fxm-ios-number-font, 'FxBarlow', sans-serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--fxm-ios-brand, #6040c0);
  }
  .fxm-broker-row__score small { font-size: 10px; }
  .fxm-broker-row__actions { grid-column: 1; grid-row: 2; justify-self: stretch; display: flex; flex-wrap: wrap; gap: 0; }
  .fxm-broker-row__action { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; border: 0; border-radius: 12px; background: transparent; }
  :is(.fxm-broker-row,.fxm-hero-score-card) [data-fxm-follow-btn][aria-pressed="true"] svg path { fill: currentColor; }
  .fxm-broker-row__actions { width: 88px; margin-left: -8px; }
  .fxm-broker-row__actions:not(:has(button)) { display: none; }
  .fxm-broker-row__support { overflow: visible; padding: 6px 0 12px; margin: 0; border: 0; flex-wrap: wrap; gap: 10px; }
  .fxm-ios-supplement-fact { font-size: 12px; color: var(--fxm-ios-secondary,#6b7380); }
  .fxm-broker-row__ratings { flex-wrap: wrap; min-width: 0; gap: 8px; font-size: 12px; }
  .fxm-broker-row__channels { display: flex; flex-wrap: wrap; }
  .fxm-broker-row__channels :is(a, button) { min-width: 44px; min-height: 44px; }
  .fxm-broker-provider strong { font-family: var(--fxm-ios-number-font, 'FxBarlow', sans-serif); font-weight: 500; }
  .fxm-broker-compare-pool { border-radius: 16px; padding: 12px; background: #f1ecfa; }

  /* Native disclosure rows preserve access to the complete web metadata. */
  .fxm-ios-market-disclosure { min-width: 0; border-top: .5px solid var(--fxm-ios-border, #e9edf2); }
  .fxm-ios-market-disclosure > summary:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px 2px;
    list-style: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    color: var(--fxm-ios-secondary, #6b7380);
  }
  .fxm-ios-market-disclosure > summary::-webkit-details-marker { display: none; }
  .fxm-ios-market-disclosure > summary > span:last-child { width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin-right: 5px; transition: transform .22s ease; }
  .fxm-ios-market-disclosure[open] > summary > span:last-child { transform: rotate(225deg); }
  .fxm-ios-broker-support { border-top: 0; }
  .fxm-ios-broker-support > summary:not([hidden]) { position: absolute; top: 68px; left: 0; width: 72px; justify-content: center; gap: 5px; font-size: 11px; }
  .fxm-ios-broker-support > summary > span:last-child { width: 5px; height: 5px; margin: 0; }

  /* RegulatorListRow: mark, identity, and an independent right-aligned grade. */
  .fxm-regulator-card {
    grid-template-columns: 72px minmax(0, 1fr) 48px;
    gap: 10px;
    padding: 14px 0;
    min-height: 116px;
    align-items: center;
    border: 0;
    border-bottom: .5px solid var(--fxm-ios-border, #e9edf2);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .fxm-regulator-card:hover, .fxm-regulator-card:focus-within { border-color: var(--fxm-ios-border, #e9edf2); box-shadow: none; }
  .fxm-regulator-card__logo { width: 72px; height: 72px; border-radius: 8px; border: .5px solid var(--fxm-ios-border, #e9edf2); background: #fff; }
  .fxm-regulator-card__logo img { padding: 4px; object-fit: contain; }
  .fxm-regulator-card__logo > span { font-family: var(--fxm-ios-brand-font,'FxOutfit',sans-serif); font-size: 20px; }
  .fxm-regulator-card__logo.fxm-ios-logo:not(.fxm-ios-logo-loaded) { background: #f0ebf9; border-color: #e9e0f6; }
  .fxm-regulator-card__logo.fxm-ios-logo:not(.fxm-ios-logo-loaded) img { visibility: hidden; position: absolute; }
  .fxm-regulator-card__logo.fxm-ios-logo:not(.fxm-ios-logo-loaded) > span {
    display: block;
    width: 36px;
    height: 36px;
    font-size: 0;
    background: #6040c0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8h18L12 3 3 8Zm2 3v7m4-7v7m6-7v7m4-7v7M3 21h18M4 18h16'/%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'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8h18L12 3 3 8Zm2 3v7m4-7v7m6-7v7m4-7v7M3 21h18M4 18h16'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .fxm-regulator-card__info { grid-column: 2; grid-row: 1; padding-right: 0; }
  .fxm-regulator-card__info h2 { font-family: var(--fxm-ios-brand-font, 'FxOutfit', sans-serif); font-size: 16px; font-weight: 600; margin-bottom: 5px; }
  .fxm-regulator-card__metadata, .fxm-regulator-card__facts { font-size: 12px; line-height: 1.5; gap: 3px; margin-top: 4px; }
  .fxm-regulator-card__metadata > span + span::before, .fxm-regulator-card__facts span + span::before { margin-inline: 3px; }
  .fxm-regulator-card__tags { margin-top: 5px; gap: 4px; flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .fxm-regulator-card__tags span { padding: 3px 6px; font-size: 11px; border-radius: 6px; background: #f0f1f5; color: #626b7d; white-space: normal; flex-shrink: 1; }
  .fxm-regulator-card__grade { grid-column: 3; grid-row: 1; flex-direction: column-reverse; align-items: flex-end; gap: 3px; border: 0; padding: 0; text-align: right; }
  .fxm-regulator-card__grade strong { font-family: var(--fxm-ios-number-font, 'FxBarlow', sans-serif); font-size: 30px; font-weight: 400; line-height: 1.1; color: var(--fxm-ios-brand, #6040c0); }
  .fxm-regulator-card__grade[data-grade="AAA"] strong { color: #15803d; }
  .fxm-regulator-card__grade[data-grade="A"] strong { color: #92400e; }
  .fxm-regulator-card__grade[data-grade="B"] strong { color: #9a3412; }
  .fxm-regulator-card__grade:not([data-grade="AAA"]):not([data-grade="AA"]):not([data-grade="A"]):not([data-grade="B"]) strong { color: #4b5563; }
  .fxm-regulator-card__grade span { font-size: 12px; }

  /* Filter sheets use the same grouped fields, separators, and 44pt controls. */
  :is(.fxm-broker-filters__heading, .fxm-regulator-filters__heading) h2 { font-size: 18px; font-weight: 600; }
  .fxm-broker-filter-group > summary, .fxm-regulator-filter-group legend { font-size: 16px; font-weight: 600; min-height: 44px; }
  .fxm-broker-filter-option, .fxm-regulator-filter-option { min-height: 44px; align-items: center; font-size: 14px; }
  .fxm-broker-filter-option__name { white-space: normal; overflow: visible; text-overflow: clip; }
  .fxm-broker-filter-option input, .fxm-regulator-filter-option input { width: 20px; height: 20px; accent-color: var(--fxm-ios-brand, #6040c0); }
  .fxm-broker-filter-search { background: var(--fxm-ios-field, #f2f3f5); border: 0; border-radius: 12px; }
  .fxm-broker-filter-search input { min-height: 44px; font-size: 16px; }
  :is(.fxm-broker-filters__footer, .fxm-regulator-filters__footer) button { min-height: 48px; border-radius: 16px; font-size: 16px; font-weight: 600; background: var(--fxm-ios-brand, #6040c0); }

  /* BrokerDetailView: open identity header and paired KPI cards, then chapters. */
  body > [data-fxm-broker-detail-page] { padding-top: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); background: #f7f8fb; }
  [data-fxm-broker-detail-page] > .bg-white { background: linear-gradient(125deg, #fcfaff, #ead9fd 46%, #def6ee 100%) top / 100% 310px no-repeat; }
  [data-fxm-broker-detail-page] .pt-\[72px\] { padding-top: var(--fxm-m-header, 56px); }
  [data-fxm-broker-detail-page] .pt-\[72px\] > div:first-child > nav { display: none; }
  [data-fxm-broker-detail-page] .pt-\[72px\] > div:first-child { padding-top: 0; }
  [data-fxm-broker-detail-page] .pt-\[72px\] > div:nth-child(2) { padding: 12px 14px 14px; }
  [data-fxm-broker-hero] { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
  [data-fxm-broker-hero] > .pointer-events-none, [data-fxm-broker-hero] > .fxm-hero-accent { display: none; }
  [data-fxm-broker-hero] > .relative { padding: 0; }
  [data-fxm-broker-hero] .fxm-hero-layout { gap: 12px; }
  [data-fxm-broker-hero] .fxm-hero-score-card { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  [data-fxm-broker-hero] .fxm-hero-score-card > .flex:first-child { align-items: center; gap: 8px; }
  [data-fxm-broker-hero] .fxm-hero-logo-xs { width: 76px; height: 76px; border: 0; border-radius: 18px; background: #fff; }
  [data-fxm-broker-hero] h1 { font-family: var(--fxm-ios-brand-font, 'FxOutfit', sans-serif); font-size: 20px; line-height: 1.3; font-weight: 600; white-space: normal; overflow: visible; text-overflow: clip; }
  [data-fxm-broker-hero] .fxm-hero-follow-btn { min-width: 44px; min-height: 44px; height: auto; padding: 8px 10px; font-size: 12px; color: var(--fxm-ios-brand, #6040c0); border-color: rgba(96,64,192,.18); }
  [data-fxm-broker-hero] .fxm-hero-meta { margin: 8px 0; flex-wrap: wrap; gap: 4px 6px; color: #626b7d; font-size: 12px; line-height: 1.5; }
  [data-fxm-broker-hero] .fxm-hero-region-flag { font-size: 20px; }
  [data-fxm-broker-hero] .fxm-hero-region-flag[style] { display: inline-block; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; font-size: 0; background: var(--fxm-ios-flag) center / cover no-repeat; box-shadow: inset 0 0 0 .5px #00000015; }
  [data-fxm-broker-hero] .fxm-hero-score-card > .fxm-hero-site-cards { margin-top: 4px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  [data-fxm-broker-hero] .fxm-hero-score-card > .fxm-hero-site-cards:has(> :only-child) { grid-template-columns: minmax(0,1fr); }
  [data-fxm-broker-hero] .fxm-hero-score-card > .fxm-hero-site-cards .fxm-hero-site-card { min-height: 54px; padding: 10px; border: .5px solid rgba(96,64,192,.13); border-radius: 12px; background: rgba(255,255,255,.65); box-shadow: none; }
  [data-fxm-broker-hero] .fxm-hero-site-label { font-size: 12px; }
  [data-fxm-broker-hero] .fxm-hero-site-domain { font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  [data-fxm-broker-hero] .fxm-hero-score-box { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  [data-fxm-broker-hero] .fxm-hero-score-metric {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    min-height: 132px;
    padding: 12px;
    border: .75px solid rgba(96,64,192,.22);
    border-radius: 14px;
    background: linear-gradient(145deg,#fff 10%,#f0eafa);
    box-shadow: 0 4px 9px rgba(96,64,192,.035);
  }
  [data-fxm-broker-hero] .fxm-hero-score-metric + .fxm-hero-score-metric { border-left: .75px solid rgba(96,64,192,.22); padding-left: 12px; }
  [data-fxm-broker-hero] .fxm-hero-score-metric::after { content: ''; display: block; height: 4px; width: 100%; border-radius: 2px; background: linear-gradient(to right,var(--fxm-ios-brand,#6040c0) 0 var(--fxm-ios-score-progress,0%),rgba(96,64,192,.12) var(--fxm-ios-score-progress,0%) 100%); transform: scaleX(0); transform-origin: left; transition: transform .9s ease-out; }
  .fxm-ios-gauges-ready .fxm-hero-score-metric::after { transform: scaleX(1); }
  [data-fxm-broker-hero] .fxm-hero-score-metric.fxm-hero-score-environment { border-color: rgba(17,128,101,.22); background: linear-gradient(145deg,#fff 10%,#eef8f3); }
  [data-fxm-broker-hero] .fxm-hero-score-environment::after { background: linear-gradient(to right,#118065 0 var(--fxm-ios-score-progress,0%),rgba(17,128,101,.12) var(--fxm-ios-score-progress,0%) 100%); }
  [data-fxm-broker-hero] .fxm-hero-kicker { font-size: 14px; font-weight: 600; line-height: 1.45; color: #202532; }
  [data-fxm-broker-hero] .fxm-hero-score-value { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px; }
  [data-fxm-broker-hero] .fxm-hero-score-num { font-family: var(--fxm-ios-number-font, 'FxBarlow', sans-serif); font-size: 36px; font-weight: 500; line-height: 1.15; color: var(--fxm-ios-brand, #6040c0) !important; }
  [data-fxm-broker-hero] .fxm-hero-score-environment .fxm-hero-score-num { color: #118065 !important; }
  [data-fxm-broker-hero] .fxm-hero-score-unit { font-family: var(--fxm-ios-font, sans-serif); font-size: 12px; color: #626b7d; }
  [data-fxm-broker-hero] .fxm-hero-score-pending { font-size: 14px; font-weight: 400; color: #626b7d; }
  [data-fxm-broker-hero] .fxm-hero-score-grade-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 6px 0; }
  [data-fxm-broker-hero] .fxm-hero-grade { font-family: var(--fxm-ios-number-font, 'FxBarlow', sans-serif); font-size: 30px; font-weight: 400; }
  .fxm-ios-score-disclosure { margin-top: 10px; padding: 0 12px; background: rgba(255,255,255,.75); border: .5px solid var(--fxm-ios-border, #e9edf2); border-radius: 12px; }
  .fxm-ios-score-disclosure > summary:not([hidden]) { font-size: 14px; }
  [data-fxm-broker-hero] .fxm-hero-radar { height: auto; min-height: 210px; margin: 0 auto 12px; }
  .fxm-ios-detail-foot { padding-top: 8px; }
  .fxm-ios-detail-foot > p:first-child, [data-fxm-broker-hero] .fxm-hero-updated { font-size: 11px; line-height: 1.5; margin-top: 4px; }
  [data-fxm-broker-hero] .fxm-hero-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 65;
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 8px;
    margin: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: .5px solid var(--fxm-ios-border, #e9edf2);
    box-shadow: 0 -4px 18px rgba(28,28,33,.035);
  }
  [data-fxm-broker-hero] .fxm-hero-actions > .fxm-hero-action { min-height: 44px; height: auto; padding: 9px 8px; border-radius: 14px; font-size: 14px; line-height: 1.3; white-space: normal; text-align: center; box-shadow: none; }
  [data-fxm-broker-hero] .fxm-hero-actions > .fxm-hero-action--primary { background: var(--fxm-ios-brand, #6040c0); color: #fff; }
  [data-fxm-broker-hero] .fxm-hero-info-col { padding: 0; }
  [data-fxm-broker-hero] .fxm-hero-panel--identity { padding: 12px; background: #fff; border: .5px solid #e8eaf0; border-radius: 16px; box-shadow: none; }
  [data-fxm-broker-hero] .fxm-hero-panel--identity { order: 2; }
  [data-fxm-broker-hero] .fxm-hero-panel--identity:not(:has(.fxm-hero-identity-foot)) { display: none; }
  [data-fxm-broker-hero] .fxm-hero-panel--identity::before,
  [data-fxm-broker-hero] .fxm-hero-panel--identity::after { display: none; }
  [data-fxm-broker-hero] .fxm-hero-panel--identity .fxm-hero-logo-xl, [data-fxm-broker-hero] .fxm-hero-panel--identity .fxm-hero-identity-divider { display: none; }
  [data-fxm-broker-hero] .fxm-hero-identity-row:not(:has(.fxm-hero-site-cards)) { display: none; }
  [data-fxm-broker-hero] .fxm-hero-identity-foot { margin: 0; padding: 0; border: 0; }
  [data-fxm-broker-hero] .fxm-hero-chip-row { min-height: 44px; font-size: 12px; }
  [data-fxm-broker-hero] .fxm-hero-score-card > .fxm-hero-stats {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 0;
    padding: 12px 0 4px;
    margin: 0;
    background: transparent;
    border-radius: 0;
    border: 0;
  }
  [data-fxm-broker-hero] .fxm-hero-stat { padding: 0 8px; display: flex; justify-content: center; align-items: start; gap: 0; text-align: center; background: none; border-radius: 0; }
  [data-fxm-broker-hero] .fxm-hero-stat + .fxm-hero-stat { border-left: .5px solid #e8eaf0; border-top: 0; }
  [data-fxm-broker-hero] .fxm-hero-stat > svg { display: none; }
  [data-fxm-broker-hero] .fxm-hero-stat > div { display: flex; flex-direction: column-reverse; gap: 4px; }
  [data-fxm-broker-hero] .fxm-hero-stat p:first-child { font-size: 11px; font-weight: 400; }
  [data-fxm-broker-hero] .fxm-hero-stat p:last-child { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
  [data-fxm-broker-hero] .fxm-hero-panel--regulatory { margin: 0; padding: 14px; border: .5px solid #e8eaf0; border-radius: 20px; background: #fff; box-shadow: none; }
  [data-fxm-broker-hero] .fxm-hero-panel--regulatory::after { content: none; }
  [data-fxm-broker-hero] .fxm-hero-panel-head { align-items: center; margin-bottom: 4px; min-height: 44px; }
  [data-fxm-broker-hero] .fxm-hero-panel-head h2 { font-size: 16px; font-weight: 600; }
  [data-fxm-broker-hero] .fxm-hero-panel-head > :last-child { min-height: 44px; font-size: 12px; }
  [data-fxm-broker-hero] .fxm-hero-reg-stage { padding: 0; }
  [data-fxm-broker-hero] .fxm-hero-license-grid,
  [data-fxm-broker-hero] .fxm-hero-panel--regulatory.is-expanded .fxm-hero-license-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  [data-fxm-broker-hero] .fxm-hero-panel--regulatory:not(.is-expanded):has([data-fxm-license-expand]) .fxm-hero-license:nth-child(n+4) { display: none; }
  [data-fxm-broker-hero] .fxm-hero-reg-arrow { display: none; }
  [data-fxm-broker-hero] .fxm-hero-license {
    display: grid;
    grid-template-columns: 46px minmax(0,.9fr) minmax(0,1.15fr);
    gap: 6px;
    padding: 12px 0;
    min-height: 80px;
    border: 0;
    border-bottom: .5px solid #e8eaf0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    align-items: center;
  }
  [data-fxm-broker-hero] .fxm-hero-license:hover { background: #f8f9fb; box-shadow: none; border-color: #e8eaf0; transform: none; }
  [data-fxm-broker-hero] .fxm-hero-reg-logo { width: 46px; height: 42px; padding: 3px; margin: 0; border: .5px solid #e8eaf0; border-radius: 8px; justify-content: center; }
  [data-fxm-broker-hero] .fxm-hero-reg-logo img { width: 100%; max-height: 34px; object-fit: contain; object-position: center; }
  [data-fxm-broker-hero] .fxm-hero-license-head { min-width: 0; }
  [data-fxm-broker-hero] .fxm-hero-license-head > div:first-child > p { font-family: var(--fxm-ios-brand-font,'FxOutfit',sans-serif); font-size: 14px; font-weight: 500; }
  [data-fxm-broker-hero] .fxm-hero-license-country { gap: 3px; margin-top: 3px; font-size: 11px; }
  [data-fxm-broker-hero] .fxm-hero-license-country-name { white-space: normal; overflow: visible; text-overflow: clip; }
  [data-fxm-broker-hero] .fxm-hero-license-meta { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; }
  [data-fxm-broker-hero] .fxm-hero-license-meta > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 6px; }
  [data-fxm-broker-hero] .fxm-hero-license-meta dt { font-size: 11px; font-weight: 400; white-space: normal; }
  [data-fxm-broker-hero] .fxm-hero-license-meta dd { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 12px; font-weight: 500; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  [data-fxm-broker-hero] .fxm-hero-license-entity { grid-column: 2 / -1; display: flex; align-items: baseline; gap: 6px; border: 0; padding: 2px 0 0; margin: 0; }
  [data-fxm-broker-hero] .fxm-hero-license-entity-label { font-size: 10px; flex: none; }
  [data-fxm-broker-hero] .fxm-hero-license-entity-name { font-size: 11px; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  [data-fxm-broker-tabs] { top: var(--fxm-detail-sticky-top, var(--fxm-m-header,56px)); border-bottom: .5px solid var(--fxm-ios-border,#e9edf2); box-shadow: none; }
  [data-fxm-broker-tabs] nav { padding-block: 0; gap: 0; }
  [data-fxm-broker-tabs] nav > a { min-height: 44px; padding: 10px 12px; font-size: 16px; border-radius: 0; white-space: nowrap; }
  [data-fxm-broker-tabs] nav > a svg { display: none; }
  [data-fxm-broker-tabs] nav > a[aria-current], [data-fxm-broker-tabs] nav > a.is-active { color: var(--fxm-ios-brand,#6040c0); background: transparent; font-weight: 600; }
  [data-fxm-broker-detail-page] .scroll-mt-\[140px\] { scroll-margin-top: var(--fxm-detail-scroll-margin, calc(var(--fxm-m-header,56px) + 56px)); }
  [data-fxm-broker-detail-page] :is(.fxm-about-card,.fxm-bd-news,.fxm-bd-exposure,.fxm-domain-card) { border-radius: 16px; border: .5px solid #e8eaf0; box-shadow: none; }
  [data-fxm-broker-detail-page] :is(h2,h3) { font-family: var(--fxm-ios-font,sans-serif); font-weight: 600; }
  [data-fxm-broker-detail-page] h2 { font-size: 18px; }
  [data-fxm-broker-detail-page] h3 { font-size: 16px; }
  [data-fxm-broker-hero] .fxm-hero-license-card, .fxm-license-card { border-radius: 14px; }
  .fxm-license-modal-head h3 { font-size: 18px; font-weight: 600; }

  /* Regulator details share the paired KPI and grouped-section language. */
  body > [data-fxm-regulator-detail-page], body > [data-fxm-disclosure-detail-page] { padding-top: 0; }
  [data-fxm-regulator-detail-page] .fxm-rd-top { padding-top: var(--fxm-m-header,56px); background: linear-gradient(130deg,#f9f5ff,#e9dcfb 52%,#e4f5f0) top / 100% 300px no-repeat; }
  [data-fxm-regulator-detail-page] .fxm-rd-crumbs { display: none; }
  .fxm-rd-hero-wrap { padding-top: 12px; }
  [data-fxm-regulator-hero] { border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
  .fxm-rd-accent, .fxm-rd-glow { display: none; }
  .fxm-rd-hero-inner { padding: 0; gap: 12px; }
  .fxm-rd-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .fxm-rd-brand-name { font-family: var(--fxm-ios-brand-font,'FxOutfit',sans-serif); font-size: 20px; font-weight: 600; }
  .fxm-rd-title { font-size: 20px; line-height: 1.4; font-weight: 600; }
  .fxm-rd-logo-sm { width: 64px; height: 64px; border-radius: 14px; background: #fff; }
  .fxm-rd-meta { font-size: 12px; line-height: 1.5; margin-top: 8px; }
  .fxm-rd-scorebox { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0; margin: 12px 0; background: transparent; border: 0; }
  .fxm-rd-scorebox > div:not(.fxm-rd-divider) { min-width: 0; min-height: 108px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: .75px solid rgba(96,64,192,.22); border-radius: 14px; background: linear-gradient(145deg,#fff,#f2ebfa); }
  .fxm-rd-scorebox > .fxm-rd-divider { display: none; }
  .fxm-rd-scorebox > div:last-child { border-color: rgba(17,128,101,.22); background: linear-gradient(145deg,#fff,#e8f4ef); }
  .fxm-rd-scorebox > div:last-child .fxm-rd-num { color: #118065; font-size: 24px; font-weight: 700; }
  .fxm-rd-kicker { font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--fxm-ios-ink,#1c1c21); }
  .fxm-rd-num { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 30px; line-height: 1.15; font-weight: 400; color: var(--fxm-ios-brand,#6040c0); }
  .fxm-rd-actions { gap: 8px; flex-wrap: wrap; }
  .fxm-rd-btn { min-height: 44px; padding: 10px 12px; font-size: 14px; border-radius: 12px; box-shadow: none; }
  .fxm-rd-btn.is-primary { background: var(--fxm-ios-brand,#6040c0); }
  .fxm-rd-note, .fxm-rd-updated { font-size: 11px; line-height: 1.5; }
  .fxm-rd-mod, .fxm-rd-panel { border-radius: 16px; border-color: var(--fxm-ios-border,#e9edf2); box-shadow: none; background: #fff; }
  .fxm-rd-mod :is(h2,h3), .fxm-rd-panel :is(h2,h3) { font-family: var(--fxm-ios-font,sans-serif); font-size: 18px; font-weight: 600; }
  [data-fxm-regulator-tabs] { top: var(--fxm-detail-sticky-top, var(--fxm-m-header,56px)); box-shadow: none; }
  [data-fxm-regulator-tabs] .fxm-rd-tab { min-height: 44px; padding: 10px 12px; font-size: 16px; border-radius: 0; }
  [data-fxm-regulator-tabs] .fxm-rd-tab[aria-current="true"] { background: transparent; color: var(--fxm-ios-brand,#6040c0); font-weight: 600; box-shadow: inset 0 -2px var(--fxm-ios-brand,#6040c0); }
  [data-fxm-regulator-tabs] .fxm-rd-tab svg { display: none; }
  .fxm-rd-broker-name { flex-wrap: wrap; gap: 5px; align-items: baseline; }
  .fxm-rd-broker-name strong { font-family: var(--fxm-ios-brand-font,'FxOutfit',sans-serif); font-size: 16px; font-weight: 500; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .fxm-rd-broker-score strong { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 20px; font-weight: 700; }
  .fxm-rd-dl-title, .fxm-rd-dl-broker span, .fxm-dd-file-main strong { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .fxm-rd-dl-bottom { align-items: start; }
  .fxm-rd-dl-date { flex-shrink: 0; }
  [data-fxm-regulator-section] { scroll-margin-top: var(--fxm-detail-scroll-margin, calc(var(--fxm-m-header,56px) + 56px)); }

  /* Rankings and comparison retain their real rows and synchronized matrix. */
  [data-fxm-rankings-page] { padding-top: calc(var(--fxm-m-header,56px) + 12px); }
  .fxm-rk-crumbs { display: none; }
  .fxm-rk-head { margin: 0 0 12px; }
  .fxm-rk-title { font-size: 20px; font-weight: 600; }
  .fxm-rk-subtitle, .fxm-rk-desc, .fxm-rk-desc-date { font-size: 12px; line-height: 1.5; }
  .fxm-rk-tabs { gap: 4px; border-radius: 12px; padding: 4px; background: var(--fxm-ios-field,#f2f3f5); }
  .fxm-rk-tab { min-height: 44px; padding: 10px 12px; font-size: 16px; font-weight: 400; border-radius: 9px; }
  .fxm-rk-tab[aria-current] { background: #fff; color: var(--fxm-ios-brand,#6040c0); font-weight: 600; box-shadow: 0 1px 4px #0000000b; }
  .fxm-rk-card, .fxm-rk-panel { border-radius: 16px; box-shadow: none; border: .5px solid var(--fxm-ios-border,#e9edf2); }
  .fxm-rk-row { min-height: 82px; }
  .fxm-rk-row-link { padding-block: 14px; }
  .fxm-rk-name { display: block; font-family: var(--fxm-ios-brand-font,'FxOutfit',sans-serif); font-size: 16px; font-weight: 500; white-space: normal; -webkit-line-clamp: unset; overflow: visible; }
  .fxm-rk-rank { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 20px; font-weight: 700; }
  .fxm-rk-score strong { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 20px; font-weight: 700; }
  .fxm-rk-chip, .fxm-rk-status { font-size: 11px; }
  body > [data-fxm-broker-compare-page] {
    --fxc-header: var(--fxm-m-header,56px);
    --fxc-primary: var(--fxm-ios-brand,#6040c0);
    --fxc-ink: var(--fxm-ios-ink,#1c1c21);
    --fxc-ink-2: #454e60;
    --fxc-muted: var(--fxm-ios-secondary,#6b7380);
    --fxc-line: var(--fxm-ios-border,#e9edf2);
    padding-top: var(--fxm-m-header,56px);
  }
  .fxc-crumbs { display: none; }
  .fxc-band { padding-bottom: 12px; background: linear-gradient(0deg,#f8f9fb,transparent 90px), linear-gradient(135deg,#f1e9ff,#e9f8f4); }
  .fxc-hero { padding: 12px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .fxc-hero-accent, .fxc-kicker { display: none; }
  .fxc-hero-meta { font-size: 12px; line-height: 1.5; }
  .fxc-hero-actions .fxc-btn { min-height: 44px; padding: 8px; font-size: 14px; }
  .fxc-brokers { margin: 12px 0 0; padding: 12px; gap: 8px; align-items: stretch; scroll-padding-inline-start: 0; scroll-snap-type: none; border-radius: 20px; background: #fff; }
  .fxc-broker { flex: 0 0 156px; padding: 12px; border: .5px solid transparent; border-radius: 16px; background: #f8f9fb; box-shadow: none; scroll-snap-align: none; }
  .fxc-broker:has(.fxc-top-badge) { border-color: #c7bce8; background: #f5f3fb; }
  .fxc-broker::before { content: none; }
  .fxc-broker:first-child { position: sticky; left: 0; z-index: 2; }
  .fxc-broker-top { min-height: 44px; gap: 2px; }
  .fxc-logo { width: 72px; height: 36px; flex-shrink: 0; }
  .fxc-broker-tools { display: contents; }
  .fxc-broker-tools .fxc-icon-btn { position: absolute; top: 6px; right: 6px; }
  .fxc-broker-tools [data-action="pin"] { top: auto; right: 12px; bottom: 12px; z-index: 1; }
  .fxc-icon-btn { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; }
  .fxc-broker-meta { margin-top: 4px; min-height: 0; font-size: 11px; white-space: normal; overflow: visible; }
  .fxc-scorebox { flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 0; border-radius: 0; background: transparent; }
  .fxc-scorebox-label { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--fxm-ios-secondary,#6b7380); }
  .fxc-scorebox-num { font-family: var(--fxm-ios-number-font,'FxBarlow',sans-serif); font-size: 24px; font-weight: 700; }
  .fxc-scorebox-max { font-size: 11px; }
  .fxc-top-badge, .fxc-grade { padding: 3px 6px; font-size: 11px; font-weight: 400; white-space: normal; }
  .fxc-broker-link { min-height: 44px; height: auto; margin-top: auto; padding: 6px; font-size: 12px; border-radius: 10px; background: #fff; }
  .fxc-scorebox { margin-bottom: 8px; }
  .fxc-broker:has([data-action="pin"]) .fxc-broker-link { padding-right: 44px; }
  .fxc-card { border-radius: 16px; border: .5px solid var(--fxm-ios-border,#e9edf2); box-shadow: none; }
  .fxc-hero-title { font-family: var(--fxm-ios-font,sans-serif); font-size: 20px; font-weight: 600; }
  .fxc-tabs { top: var(--fxm-m-header,56px); box-shadow: none; border-color: var(--fxm-ios-border,#e9edf2); background: #fff; }
  .fxc-tabs a, .fxc-tabs button { min-height: 44px; font-size: 16px; }
  .fxc-tabs .fxc-tab { display: inline-flex; align-items: center; padding: 8px 10px; border-radius: 0; font-weight: 400; color: var(--fxm-ios-secondary,#6b7380); }
  .fxc-tabs .fxc-tab.is-active { background: transparent; color: var(--fxm-ios-brand,#6040c0); font-weight: 600; box-shadow: inset 0 -2px var(--fxm-ios-brand,#6040c0); }
  .fxc-broker-name { display: block; min-height: 0; margin-top: 6px; font-family: var(--fxm-ios-brand-font,'FxOutfit',sans-serif); font-size: 15px; font-weight: 600; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
  .fxc-stack { gap: 16px; }
  .fxc-matrix { order: 0; }
  .fxc-overview { order: 1; }
  #fxc-ai { order: 2; }
  [data-fxm-disclosure-detail-page] .fxm-rd-top { padding-top: calc(var(--fxm-m-header,56px) + 12px); }
  [data-fxm-disclosure-detail-page] .fxm-rd-crumbs { display: none; }
  .fxm-dd-title { font-size: 24px; line-height: 1.4; font-weight: 600; }
  .fxm-dd-hero { border-radius: 16px; box-shadow: none; }
  .fxm-dd-body { font-size: 16px; line-height: 1.85; }
  :is(.fxm-broker-pagination,.fxm-regulator-pagination) :is(a,select,button) { min-height: 44px; }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .fxm-ios-market-disclosure > summary > span:last-child,
  [data-fxm-broker-hero] .fxm-hero-score-metric::after,
  .fxm-broker-row { transition: none; animation: none; }
  [data-fxm-broker-hero] .fxm-hero-score-metric::after { transform: scaleX(1); }
}
