/* FxMoody iOS parity: FxTheme.swift / FxTypography.swift / AppShellView.swift.
 * The media boundary also lives on the WP stylesheet link. Desktop is untouched.
 */
@font-face { font-family: FxOutfit; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Outfit-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: FxOutfit; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Outfit-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: FxOutfit; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Outfit-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: FxOutfit; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Outfit-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: FxBarlow; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: FxBarlow; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: FxBarlow; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: FxBarlow; src: url('https://cdn.fxmoodys.com/fonts/mobile/v1/Barlow-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

@media (max-width: 767.98px) {
  :root {
    --fxm-ios-brand: #6040c0;
    --fxm-ios-highlight: #6f4fd6;
    --fxm-ios-deep: #4e2fa6;
    --fxm-ios-page: #f8f9fb;
    --fxm-ios-card: #fff;
    --fxm-ios-ink: #1c1c21;
    --fxm-ios-secondary: #6b7380;
    --fxm-ios-tertiary: #9ca3b0;
    --fxm-ios-border: #e9edf2;
    --fxm-ios-field: #f2f3f5;
    --fxm-ios-radius: 20px;
    --fxm-ios-gutter: 16px;
    --fxm-ios-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Hiragino Sans', 'Noto Sans', sans-serif;
    --fxm-ios-brand-font: FxOutfit, var(--fxm-ios-font);
    --fxm-ios-number-font: FxBarlow, var(--fxm-ios-font);
    --fxm-ios-ease: cubic-bezier(.22, .75, .25, 1);
    --fxm-m-header: calc(56px + env(safe-area-inset-top, 0px));
    --fxm-m-tabbar: 64px;
    --fxm-m-gutter: 16px;
    --fxm-m-primary: var(--fxm-ios-brand);
    --fxm-m-primary-soft: #f2eefb;
    --fxm-m-primary-line: #e3daf5;
    --fxm-m-primary-ring: #6040c01f;
    --fxm-m-grad-primary: linear-gradient(115deg, #6f4fd6, #4e2fa6);
    --fxm-m-ink: var(--fxm-ios-ink);
    --fxm-m-text: var(--fxm-ios-ink);
    --fxm-m-muted: var(--fxm-ios-secondary);
    --fxm-m-line: var(--fxm-ios-border);
    --fxm-m-surface-2: var(--fxm-ios-page);
    --fxm-m-h-control: 48px;
    --fxm-m-h-btn: 48px;
    --color-primary: var(--fxm-ios-brand);
    --font-family-body: var(--fxm-ios-font);
    --font-family-headline: var(--fxm-ios-font);
  }
  html { scroll-padding-top: calc(var(--fxm-m-header) + 12px); }
  body.fxm-ios-mobile { background: var(--fxm-ios-page); color: var(--fxm-ios-ink); font-family: var(--fxm-ios-font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
  .fxm-ios-mobile :is(button, input, select, textarea) { font-family: var(--fxm-ios-font); }
  .fxm-ios-mobile :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
  .fxm-ios-mobile :is(button, a, summary, input, select, textarea) { -webkit-tap-highlight-color: transparent; }
  .fxm-ios-mobile :is(button, a, summary):focus-visible { outline: 2px solid var(--fxm-ios-brand); outline-offset: 3px; }
  .fxm-ios-mobile :is(.font-headline, .font-body) { font-family: var(--fxm-ios-font); }
  body.fxm-has-tabbar { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  body.fxm-ios-detail { padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.fxm-ios-detail .fxm-tabbar { display: none; }
  body > main { padding-top: calc(var(--fxm-m-header) + 16px); }
  .fxm-ios-home > main { padding-top: var(--fxm-m-header); }

  /* App-sized navigation chrome; the web menu keeps all secondary routes reachable. */
  .fxm-site-header { height: var(--fxm-m-header); color: var(--fxm-ios-ink); }
  .fxm-site-header > .pointer-events-none { height: var(--fxm-m-header); background: rgba(248,249,251,.92); border-color: transparent; backdrop-filter: blur(20px); }
  .fxm-ios-header { position: relative; z-index: 1; display: grid !important; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 8px; height: var(--fxm-m-header); padding: env(safe-area-inset-top,0px) 16px 0; }
  .fxm-ios-header__leading { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--fxm-ios-brand); border-radius: 50%; }
  .fxm-ios-header__brand { justify-self: center; display: flex; justify-content: center; align-items: center; min-height: 44px; }
  .fxm-ios-header__brand img { width: 108px; height: auto; max-height: 32px; object-fit: contain; }
  .fxm-ios-header__title { text-align: center; font-size: 18px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
  .fxm-site-header [data-fxm-header-bar] { position: static; display: block; height: 0; padding: 0; }
  .fxm-site-header [data-fxm-header-bar] > :not(.fxm-header-end) { display: none; }
  .fxm-site-header .fxm-header-end { display: contents; }
  .fxm-site-header .fxm-header-end > :not(.fxm-m-menu-btn) { display: none !important; }
  .fxm-site-header .fxm-m-menu-btn { position: absolute; z-index: 2; top: calc(6px + env(safe-area-inset-top,0px)); right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--fxm-ios-brand); box-shadow: none; }
  .fxm-ios-home .fxm-site-header > .pointer-events-none { background: linear-gradient(90deg,#ebe2f9,#e7f6f6); backdrop-filter: none; }
  .fxm-ios-home .fxm-ios-header__leading, .fxm-ios-home .fxm-m-menu-btn { background: #ffffffd9; box-shadow: 0 3px 10px #6040c013; }
  .fxm-ios-home .fxm-site-header.is-scrolled > .pointer-events-none { background: rgba(248,249,251,.94); backdrop-filter: blur(20px); }

  /* The same selected/unselected artwork as AppShell, 12pt tab labels. */
  .fxm-tabbar { right: max(16px, env(safe-area-inset-right)); left: max(16px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); height: 64px; padding: 5px; border: 1px solid #ffffffdd; border-radius: 36px; background: rgba(255,255,255,.87); box-shadow: 0 6px 26px #22243c16, inset 0 1px 0 #fff; backdrop-filter: blur(24px) saturate(1.25); -webkit-backdrop-filter: blur(24px) saturate(1.25); }
  .fxm-tabbar__item, .fxm-tabbar__ai { border-radius: 28px; min-height: 52px; gap: 0; padding: 0 2px; color: #85858a; justify-content: center; transition: background .22s ease, transform .18s var(--fxm-ios-ease); }
  .fxm-tabbar__item.is-active { color: var(--fxm-ios-brand); background: rgba(118,113,131,.09); }
  .fxm-tabbar__item.is-active::before { display: none; }
  .fxm-tabbar__icon { display: block; width: 22px; height: 26px; object-fit: contain; object-position: center top; }
  .fxm-tabbar__item:not(.is-active) .fxm-tabbar__icon { filter: grayscale(1) brightness(1.08) contrast(.9); }
  .fxm-tabbar__label { font-family: var(--fxm-ios-font); font-size: 12px; line-height: 16px; font-weight: 400; white-space: nowrap; letter-spacing: 0; }
  .fxm-tabbar__item.is-active .fxm-tabbar__label { font-weight: 600; }
  .fxm-tabbar__orb { position: static; width: 44px; height: 44px; border: 0; background: transparent; box-shadow: none; }
  .fxm-tabbar__ai .fxm-tabbar__label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .fxm-tabbar__item:active, .fxm-tabbar__ai:active { transform: scale(.94); }
  .fxm-ios-keyboard .fxm-tabbar { visibility: hidden; pointer-events: none; }

  /* The secondary menu uses the same grouped surfaces and artwork as the App. */
  .fxm-m-nav__panel { width: min(380px, calc(100vw - 32px)); height: 100%; height: 100dvh; overflow: hidden; background: var(--fxm-ios-page); border-radius: 28px 0 0 28px; box-shadow: -12px 0 48px #16132626; transition: transform .32s var(--fxm-ios-ease); }
  .fxm-m-nav__backdrop { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); background: #16132652; transition: opacity .26s ease; }
  .fxm-m-nav__top { min-height: 72px; gap: 12px; padding: calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px 20px; background: linear-gradient(115deg,#f0eafb,#edf7f8); }
  .fxm-m-nav__brand { min-height: 44px; display: inline-flex; align-items: center; min-width: 0; }
  .fxm-m-nav__logo { display: block; width: 108px; height: 29px; max-width: 100%; object-fit: contain; }
  .fxm-m-nav__x { width: 44px; height: 44px; flex: none; border: 0; background: #ffffffc9; color: var(--fxm-ios-secondary); transition: background .16s ease, transform .16s ease; }
  .fxm-m-nav__x:active { background: #e8e3f4; transform: scale(.94); }
  .fxm-m-nav__scroll { min-height: 0; padding: 14px max(16px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) 16px; scrollbar-width: thin; scrollbar-color: #cfc8df transparent; -webkit-overflow-scrolling: touch; }
  .fxm-m-nav__scroll::-webkit-scrollbar { width: 3px; }
  .fxm-m-nav__scroll::-webkit-scrollbar-thumb { background: #cfc8df; border-radius: 3px; }
  .fxm-m-account { margin-bottom: 12px; padding: 14px; border: 1px solid #ece9f3; border-radius: 18px; background: #fff; }
  .fxm-m-account__title { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; color: var(--fxm-ios-ink); }
  .fxm-m-account__desc { margin-top: 5px; font-size: 12px; line-height: 1.6; color: var(--fxm-ios-secondary); }
  .fxm-m-account__actions { gap: 8px; margin-top: 12px; }
  .fxm-m-btn { min-height: 44px; height: auto; padding: 9px 12px; border-radius: 24px; font-size: 15px; line-height: 1.4; text-align: center; }
  .fxm-m-btn.is-primary { background: var(--fxm-ios-brand); box-shadow: none; }
  .fxm-m-btn.is-ghost { border-color: #e4dcf4; background: #f8f5fe; }
  .fxm-m-account__user { display: grid; grid-template-columns: 46px minmax(0,1fr); column-gap: 12px; row-gap: 4px; }
  .fxm-m-account__avatar { grid-row: 1 / 3; width: 46px; height: 46px; position: relative; display: grid; place-items: center; border-radius: 50%; background: #efe9fa; color: var(--fxm-ios-brand); overflow: hidden; }
  .fxm-m-account__avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; box-shadow: none; }
  .fxm-m-account__avatar > [hidden] { display: none; }
  .fxm-m-account__avatar > span { font: 600 20px/1 var(--fxm-ios-brand-font); }
  .fxm-m-account__who strong { font-size: 16px; font-weight: 600; color: var(--fxm-ios-ink); }
  .fxm-m-account__who small { font-size: 12px; line-height: 1.5; color: var(--fxm-ios-secondary); }
  .fxm-m-account__who small:empty { display: none; }
  .fxm-m-account__go { grid-column: 2; justify-self: start; font-size: 12px; line-height: 1.5; white-space: normal; }
  .fxm-m-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .fxm-m-shortcuts a { min-height: 64px; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 10px; border: 1px solid #eceef3; border-radius: 16px; background: #fff; font-size: 13px; line-height: 1.4; font-weight: 500; text-align: start; overflow-wrap: anywhere; color: var(--fxm-ios-ink); transition: background .18s ease; }
  .fxm-m-shortcuts a:active { background: #f0ebfa; }
  .fxm-m-shortcuts__icon { flex: 0 0 34px; width: 34px; height: 38px; border-radius: 0; background: transparent; }
  .fxm-m-shortcuts__icon img { width: 34px; height: 34px; object-fit: contain; }
  .fxm-m-shortcuts a[aria-current="page"] { border-color: #ded3f3; background: #f1ebfa; color: var(--fxm-ios-brand); }
  .fxm-m-group { margin-bottom: 8px; border: 1px solid #eceef3; border-radius: 16px; background: #fff; }
  .fxm-m-group > summary { min-height: 52px; gap: 12px; padding: 14px 20px; font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--fxm-ios-ink); }
  .fxm-m-group__heading { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .fxm-m-group > summary > svg { flex: none; color: #9ca3b0; }
  .fxm-m-group[open] > summary { color: var(--fxm-ios-brand); }
  .fxm-m-group__links { gap: 0; padding: 0 8px 8px; }
  .fxm-m-group__links > a { min-height: 48px; gap: 0; padding: 10px 12px; font-size: 14px; line-height: 1.45; border-radius: 10px; color: #414552; }
  .fxm-m-group__links > a > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .fxm-m-group__links > a + a { border-top: 1px solid #f3f4f7; }
  .fxm-m-group__links > a[aria-current="page"] { background: #f1ebfa; color: var(--fxm-ios-brand); font-weight: 600; }
  .fxm-m-group__links.is-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .fxm-m-group__links.is-grid a { min-height: 48px; gap: 0; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; font-size: 14px; }
  .fxm-m-group__links.is-grid a + a { border-top: 1px solid #f3f4f7; }
  .fxm-m-group__links.is-grid span { min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; }
  .fxm-m-group__links.is-grid a[aria-current="page"] { background: #f1ebfa; }
  .fxm-m-nav__section { padding: 12px 0 4px; }
  .fxm-m-nav__label { margin-bottom: 8px; padding-inline: 20px; font-size: 12px; line-height: 1.4; color: var(--fxm-ios-secondary); }
  .fxm-m-langs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .fxm-m-langs a { min-height: 44px; height: auto; min-width: 0; padding: 9px 20px; border-radius: 12px; border-color: #e9eaf0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  .fxm-m-langs a.is-active { background: #f0eafa; border-color: #ddd0f2; color: var(--fxm-ios-brand); }
  .fxm-m-nav__foot { display: grid; gap: 0; margin-top: 12px; padding: 10px 0 0; border-color: var(--fxm-ios-border); }
  .fxm-m-nav__foot a { min-height: 44px; padding: 10px 20px; gap: 0; border-radius: 10px; line-height: 1.4; color: var(--fxm-ios-secondary); }
  .fxm-m-nav :is(a,button,summary):focus-visible { outline-offset: -3px; }

  /* Sheets use the app's neutral surfaces and restrained spring timing. */
  details[data-fxm-m-sheet][open] > :not(summary) { border-radius: 28px 28px 0 0 !important; background-color: var(--fxm-ios-card) !important; max-height: min(88dvh,780px) !important; animation-duration: .32s; animation-timing-function: var(--fxm-ios-ease); }
  details[data-fxm-m-sheet][open]::before { background: #16132638; backdrop-filter: blur(3px); }
  .fxm-login-modal, .fxm-exposure-modal { border-radius: 28px 28px 0 0; }
  .fxm-login-modal__close, .fxm-exposure-modal__close { min-width: 44px; min-height: 44px; }

  /* Full footer content follows the responsive desktop footer stylesheet. */
  .fxm-ios-ai .fxm-site-footer { display: none; }

  @media (prefers-reduced-motion: no-preference) {
    .fxm-ios-mobile button:active, .fxm-ios-mobile a[class*="btn"]:active { transform: scale(.97); }
    .fxm-ios-mobile dialog[open] { animation-timing-function: var(--fxm-ios-ease); }
    .fxm-ios-mobile .fxm-ios-page-enter { animation: fxm-ios-enter .22s ease-out both; }
    @keyframes fxm-ios-enter { from { opacity: .7; } to { opacity: 1; } }
  }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .fxm-ios-mobile *, .fxm-ios-mobile *::before, .fxm-ios-mobile *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* A parser-only placeholder: never waits for footer scripts or API responses. */
.fxm-secondary-placeholder{display:none}
@media(max-width:767.98px){
 html.fxm-secondary-preparing .fxm-secondary-placeholder{display:flex!important;flex-direction:column;gap:18px;position:absolute;top:calc(72px + env(safe-area-inset-top,0px));left:20px;right:20px;max-width:680px;margin:auto;z-index:2;pointer-events:none;visibility:visible}
 .fxm-secondary-placeholder>span,.fxm-secondary-placeholder__card{display:block;background:#e9eaf1;border-radius:8px}
 .fxm-secondary-placeholder__tag{width:76px;height:24px}
 .fxm-secondary-placeholder__title{width:82%;height:28px}
 .fxm-secondary-placeholder__line{width:100%;height:14px}
 .fxm-secondary-placeholder__line:last-child{width:72%}
 .fxm-secondary-placeholder__card{display:flex;align-items:center;gap:16px;min-height:124px;padding:20px;background:#f3f4f8}
 .fxm-secondary-placeholder__card i{width:56px;height:56px;flex:none;border-radius:14px;background:#e4e6ee}
 .fxm-secondary-placeholder__card span{width:50%;height:18px;border-radius:6px;background:#e4e6ee}
}
