/* One local type family for the website and its standalone guides. No remote font service. */
@layer naspers-neutral-surfaces {
html:root {--nx-font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sans:var(--nx-font-family)!important;--cinema-font:var(--nx-font-family)!important;}
html:root body.ncg-site-wide {font-family:var(--nx-font-family)!important;font-size:15px;line-height:1.6!important;font-weight:400!important;letter-spacing:normal!important;font-kerning:normal;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
html:root body.ncg-site-wide :is(button,input,select,textarea,a,span,p,li,div,label,small,strong,b,em,dt,dd,table,td,th,summary,figcaption) {font-family:var(--nx-font-family)!important;}
html:root body.ncg-site-wide :is(h1,h2,h3,h4,h5,h6) {font-family:var(--nx-font-family)!important;font-weight:650!important;letter-spacing:-.025em;line-height:1.2;}
html:root body.ncg-site-wide :is(button,[role="button"]) {font-weight:550;letter-spacing:-.01em;}
html:root body.ncg-site-wide :is(p,li,dd) {letter-spacing:-.006em;}
html:root body.ncg-site-wide :is(code,pre,kbd,samp),html:root body.ncg-site-wide :is(code,pre,kbd,samp) * {font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace!important;letter-spacing:normal;}
html:root body.ncg-site-wide :is(.account-stat-value,.nev-wd-balance,.ops-kpi-value,[data-money]) {font-variant-numeric:tabular-nums;}
html:root:lang(ar) body.ncg-site-wide,html:root body.ncg-site-wide:lang(ar) {line-height:1.75;}
html:root:lang(ar) body.ncg-site-wide :is(h1,h2,h3,h4,h5,h6,p,li,dd,button,[role="button"]) {letter-spacing:normal!important;}
}

/* The navigation panel shares the circuit canvas palette in every theme. */
@layer naspers-neutral-surfaces {
  html:root body.nx-section-navigation #nxExplore#nxExplore#nxExplore {--na-pane-bg:var(--ncg-base,var(--nx-bg));}
}

/* A 115% desktop interface; touch and narrow layouts retain their established scale. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine) {
  html:root {zoom:1.15;--nx-ui-scale:1.15;}
}
/* Match the root 115% desktop-only zoom gate. Keep content at that scale;
   cap the scrollable boxes in local CSS units, not the backdrop overlays. */
@layer naspers-neutral-surfaces {
  @media (min-width:1024px) and (hover:hover) and (pointer:fine) {
    html:root body :is(#loginModal#loginModal,#paymentModal#paymentModal,#legalModal#legalModal,#compareModal#compareModal,#projectionModal#projectionModal,#investorSettingsModal#investorSettingsModal,#referralTermsModal#referralTermsModal,#nevWithdrawModal#nevWithdrawModal) :is(.modal-box,.feature-dialog,.payment-box),
    html:root body :is(.feature-dialog,.settings-modal-box,.nlqach-dialog,.nev-congrats-dialog,.nev-strategy-modal,.nev-modal,.nvb-modal,.nlq-ck-box,.nlq-lg-box,.co-box,.tcm-card),
    html:root body #ncdDialog#ncdDialog,
    html:root body .nev-2fa-dialog.nev-2fa-dialog,
    html:root body .npr-dialog.npr-dialog,
    html:root body #nevWelcomeOffer#nevWelcomeOffer .nev-welcome-card {
      box-sizing:border-box!important;
      min-block-size:0!important;
      max-width:calc(86.956522vw - 32px)!important;
      max-inline-size:calc(86.956522vw - 32px)!important;
      max-height:calc(86.956522dvh - 32px)!important;
      max-block-size:calc(86.956522dvh - 32px)!important;
      overflow-y:auto!important;
    }

    /* The rules page and legacy company wrapper explicitly declared 100dvh.
       Preserve their fixed inset and existing scrolling/visibility owners. */
    html:root body #nrpRulesDialog#nrpRulesDialog,
    html:root body .co-modal.co-modal {
      box-sizing:border-box!important;
      width:auto!important;
      height:auto!important;
      max-width:86.956522vw!important;
      max-inline-size:86.956522vw!important;
      max-height:86.956522dvh!important;
      max-block-size:86.956522dvh!important;
    }

    html:root body #nevSheet#nevSheet > .nev-sheet {
      box-sizing:border-box!important;
      min-height:0!important;
      min-block-size:0!important;
      max-width:calc(86.956522vw - 24px)!important;
      max-inline-size:calc(86.956522vw - 24px)!important;
      max-height:calc(86.956522dvh - var(--nev-header-h,0px))!important;
      max-block-size:calc(86.956522dvh - var(--nev-header-h,0px))!important;
    }
    html:root body #nevSheet#nevSheet > .nev-sheet > .nev-sheet-body {
      min-height:0!important;
      min-block-size:0!important;
    }
    html:root body #nevAcctMenu#nevAcctMenu.nev-acct-menu {
      max-width:calc(86.956522vw - 44px)!important;
      max-inline-size:calc(86.956522vw - 44px)!important;
      max-height:min(560px,calc(86.956522dvh - var(--nev-header-h,84px) - 40px))!important;
      max-block-size:min(560px,calc(86.956522dvh - var(--nev-header-h,84px) - 40px))!important;
    }
    html:root body #nxExplore#nxExplore#nxExplore {
      max-width:calc(86.956522vw - 24px)!important;
      max-inline-size:calc(86.956522vw - 24px)!important;
      max-height:calc(86.956522dvh - var(--nx-top,80px) - 12px)!important;
      max-block-size:calc(86.956522dvh - var(--nx-top,80px) - 12px)!important;
    }
    html:root body #currencySelector#currencySelector#currencySelector .nlqcur-menu,
    html:root body #marketSelector#marketSelector#marketSelector .market-dropdown {
      max-height:calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 24px)!important;
      max-block-size:calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 24px)!important;
      overflow-y:auto!important;
    }

    html:root body #aiChat#aiChat:not(.hidden) {
      max-width:calc(86.956522vw - 32px)!important;
      max-inline-size:calc(86.956522vw - 32px)!important;
      block-size:min(720px,calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 32px))!important;
      max-height:calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 32px)!important;
      max-block-size:calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 32px)!important;
    }
    html:root body:has(.test-cabinet-notice) #aiChat#aiChat:not(.hidden) {
      block-size:min(720px,calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 80px))!important;
      max-height:calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 80px)!important;
      max-block-size:calc(86.956522dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 80px)!important;
    }
  }
}

@layer naspers-neutral-surfaces {
  @media (min-width:1024px) and (hover:hover) and (pointer:fine) {
    :root body #teamProfileModal .tcm-card {
      max-width:min(560px,calc(86.956522vw - 40px))!important;
      max-height:calc(86.956522dvh - 40px)!important;
    }
  }
}

/* Keep the six primary links available in the enlarged compact desktop row. */
@layer naspers-neutral-surfaces {
  @media (min-width:1101px) and (max-width:1535px) and (hover:hover) and (pointer:fine) {
    html:root body.nx-section-navigation > header #nevSessionStatus#nevSessionStatus {
      width:90px!important;max-width:90px!important;flex:0 0 90px!important;
      padding:0 2px!important;font-size:10px!important;line-height:12px!important;white-space:normal!important;
    }
    html:root body.nx-section-navigation > header > nav[data-nx-section-list][data-nx-section-list][data-nx-section-list] {gap:0!important;}
    html:root body.nx-section-navigation > header > nav[data-nx-section-list][data-nx-section-list] > a {padding-inline:4px!important;}
  }
  @media (min-width:1101px) and (max-width:1200px) and (hover:hover) and (pointer:fine) {
    html:root body.nx-section-navigation:not(.cinema-mini):not(.gsh-page):not(.wg-page) > header {padding-inline:14px!important;gap:6px!important;}
    html:root body.nx-section-navigation header #nxExploreTrigger#nxExploreTrigger#nxExploreTrigger {
      width:44px!important;min-width:44px!important;max-width:44px!important;padding-inline:0!important;justify-content:center!important;
    }
    html:root body.nx-section-navigation header #nxExploreTrigger#nxExploreTrigger#nxExploreTrigger > span:first-child {
      position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
      overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;
    }
  }
}
