/* Existing layouts, with deliberate spacing and flat control surfaces. */
#about .about-stat-row{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:20px;align-items:center}
#about .about-stat-num{min-width:0;white-space:nowrap}
#about .about-stat-label{min-width:0;overflow-wrap:anywhere}
@media(max-width:768px){#about .about-stat-row{grid-template-columns:minmax(0,1fr);row-gap:8px;padding:20px!important}}

#company-information p{margin:0 0 18px!important;line-height:1.65!important;text-align:start;overflow-wrap:anywhere}
#company-information p:last-child{margin-bottom:0!important}
#company-information p>b{display:block;margin-bottom:5px;line-height:1.5}
#company-information p>b+br{display:none}
#company-information bdi{display:block}

html body #ticker-strip{overflow-x:clip!important;overflow-y:hidden!important;touch-action:pan-y!important;overscroll-behavior-x:none;cursor:default}
#ticker-strip .ticker-item{user-select:none;-webkit-user-drag:none}
#nlqMktStatus,.nlq-mkt-note{display:none}
#npn-source a{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px;text-decoration:none}

html body #account-page#account-page#account-page #nevWithdrawPanel,html body #account-page#account-page#account-page #nevBuyback{padding:clamp(20px,3vw,32px)!important;min-width:0}
#account-page#account-page#account-page #nevWithdrawPanel>section.nev-wd-history-card:has(#nevReinvestForm){border:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important;padding:0!important;margin:0 0 28px!important}
#account-page#account-page#account-page #nevReinvestForm label:has(>input[type=checkbox]){display:flex!important;align-items:flex-start!important;gap:12px!important;margin:16px 0!important;font-size:13px!important;line-height:1.5!important;text-transform:none!important;letter-spacing:normal!important}
#account-page#account-page#account-page #nevReinvestForm label>input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;margin:1px 0 0!important}
#account-page#account-page#account-page #nevWithdrawPanel>h2{margin:0 0 20px!important;line-height:1.3}
#account-page#account-page#account-page #nevWithdrawPanel>p{margin:14px 0!important;line-height:1.65}
#account-page#account-page#account-page #nevWithdrawPanel>h3{margin:28px 0 14px!important;line-height:1.35}
#account-page#account-page#account-page #nevWithdrawForm{margin-top:20px}
#account-page#account-page#account-page #nevWithdrawForm .nev-wd-fields{gap:16px}
#account-page#account-page#account-page #nevWithdrawForm .nev-wd-fields>label{margin:0}
#account-page#account-page#account-page #nevWithdrawForm>label{margin:18px 0}
#account-page#account-page#account-page #nevWithdrawForm>p{margin:14px 0;line-height:1.65}
#account-page#account-page#account-page #nevWithdrawPanel #nevWdQuote,#account-page#account-page#account-page #nevWithdrawPanel #nevWdSubmit{min-height:46px;margin:12px 0 0;padding:12px 18px!important}
#account-page#account-page#account-page #nevWdConfirm{margin:20px 0;padding:20px}
#account-page#account-page#account-page #nevWdConfirm>p{margin:12px 0;line-height:1.6}
#account-page#account-page#account-page #nevBuyback .nvt-head{align-items:flex-start!important;flex-wrap:wrap;gap:12px;margin:0 0 22px!important}
#account-page#account-page#account-page #nevBuyback .nvt-h{line-height:1.35!important}
#account-page#account-page#account-page #nevBuyback .nvt-h::before{content:none!important;display:none!important}
#account-page#account-page#account-page #nevBuyback .nvt-sub{margin:8px 0 0!important;line-height:1.6!important}
#account-page#account-page#account-page #nevBuyback .nvt-note{margin:22px 0 0!important;padding:16px 0 0!important;font-size:12px!important;line-height:1.65!important}
#account-page#account-page#account-page #nevBuyback .nvt-note::before{content:none!important;display:none!important}
#account-page#account-page#account-page #nevBuyback::before,#account-page#account-page#account-page #nevBuyback::after{content:none!important;display:none!important}
#account-page#account-page#account-page #nevBuyback .nev-buyback-form,#account-page#account-page#account-page #nevBuyback .advertising-local-sale{display:grid;gap:16px}
#account-page#account-page#account-page #nevBuyback :is(.nev-buyback-form,.advertising-local-sale)>label:first-child{display:grid;gap:8px}
#account-page#account-page#account-page #nevBuyback select{width:100%;min-width:0;max-width:100%;padding:12px 14px;padding-inline-end:40px!important;font-size:16px;line-height:1.45}
#account-page#account-page#account-page #nevBuyback :is(.nev-buyback-form,.advertising-local-sale)>p{margin:0;line-height:1.65}
#account-page#account-page#account-page #nevBuyback :is(.nev-buyback-form,.advertising-local-sale)>button{min-height:46px;margin:0;padding:12px 18px!important}
#account-page#account-page#account-page #nevBuyback .nev-buyback-form>label:has(>input[type=checkbox]){display:flex;align-items:flex-start;gap:12px;font-size:13px;line-height:1.5;text-transform:none;letter-spacing:normal}
#account-page#account-page#account-page #nevBuyback .nev-buyback-form>label>input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;margin:1px 0 0}
.consent-row,.auth-remember-row,.nev-wd-check,.advertising-local-sale-confirm{gap:12px!important}
.advertising-local-sale-confirm{align-items:flex-start}

html body #account-page#account-page#account-page #nevAccountFooter{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:18px 24px;margin-top:32px;padding-top:24px;border-top:1px solid var(--border)}
html body #account-page#account-page#account-page #nevAccountFooter>[role=navigation]{display:flex;flex-wrap:wrap;gap:8px 10px;min-width:0}
html body #account-page#account-page#account-page #nevAccountFooter button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 14px!important;border-radius:8px!important;background:transparent!important;background-image:none!important;color:var(--text)!important;-webkit-text-fill-color:currentColor!important;box-shadow:none!important;line-height:1.4!important}

html:root body :is(button,.pkg-btn,.inner-btn,.account-action-btn,.nvt-btn):not(:focus-visible){box-shadow:none!important;text-shadow:none!important;filter:none!important}
html:root body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn{box-shadow:none!important;filter:none!important;background-image:none!important;background-color:var(--panel)!important;border-color:var(--border)!important}
html:root body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn.primary{background-color:#7350d8!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html:root body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn::before{content:none!important;display:none!important;box-shadow:none!important}
html:root body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn::after{box-shadow:none!important;filter:none!important}
html:root body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn .nlq-qa-ico{box-shadow:none!important;filter:none!important}
html:root body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn:focus-visible{outline:2px solid var(--red,#a78bfa)!important;outline-offset:3px!important}
html:root[data-theme=light] body #account-page#account-page#account-page #nevQuickActions .account-action-btn.account-action-btn:not(.primary):not(.danger){color:#050505!important;-webkit-text-fill-color:#050505!important;background-color:#fff!important}
/* The published dashboard moves Upgrade out of the legacy Quick Actions wrapper. */
html:root body #account-page#account-page#account-page #nevLivePackages.account-action-btn{min-height:46px;padding:12px 18px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:var(--panel)!important;background-image:none!important;color:var(--heading)!important;-webkit-text-fill-color:currentColor!important;box-shadow:none!important;filter:none!important;text-shadow:none!important;letter-spacing:0!important;text-transform:none!important}
html:root body #account-page#account-page#account-page #nevLivePackages.account-action-btn::before,html:root body #account-page#account-page#account-page #nevLivePackages.account-action-btn::after{content:none!important;display:none!important;box-shadow:none!important}
html:root body #account-page#account-page#account-page #nevLivePackages .nlq-qa-ico{background:none!important;border:0!important;box-shadow:none!important;filter:none!important;color:inherit!important}
html:root body #account-page#account-page#account-page #nevLivePackages .nlq-qa-txt{color:inherit!important;-webkit-text-fill-color:inherit!important}
html:root body #account-page#account-page#account-page #nevLivePackages.account-action-btn:focus-visible{outline:2px solid var(--red,#a78bfa)!important;outline-offset:3px!important}
html:root[data-theme=light] body #account-page#account-page#account-page #nevLivePackages.account-action-btn{background:#fff!important;color:#050505!important;-webkit-text-fill-color:#050505!important}
html:root body #account-page#account-page#account-page #nevBuyback .nvt-btn.nvt-btn,html:root body #account-page#account-page#account-page #nevWithdrawPanel button{box-shadow:none!important;filter:none!important;background-image:none!important}
html:root body #account-page#account-page#account-page #nevBuyback .nvt-btn.nvt-primary{background-color:#7350d8!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html:root body #about .about-stat-row,html:root body #trust-centre .trust-card,html:root body #nbpOverview .nbp-card,html:root body #account-page#account-page#account-page :is(.account-panel,.account-metric){box-shadow:none!important;text-shadow:none!important}
html:root body #packages .pkg-btn.pkg-btn{box-shadow:none!important;text-shadow:none!important;filter:none!important;background-image:none!important;background-color:#7350d8!important}

/* Remove residual decorative leaves and sheen without changing icons or focus. */
html body #nevLivePackages .nlq-qa-ico::after{content:none!important;display:none!important}
html body :is(button,[role="button"],.nev-ftmo-motion)>.nev-ftmo-motion__light{display:none!important}
#account-page#account-page#account-page #nevBuyback .advertising-local-sale-confirm{font-size:13px!important;line-height:1.5!important;text-transform:none!important;letter-spacing:normal!important}

/* Keep investor copy and the existing FAQ window within the available viewport. */
@layer naspers-neutral-surfaces {
  html:root body #investors-page .nvx-metrics {
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  html:root body #investors-page .nvx-metric {
    min-inline-size:0!important;
    padding:clamp(12px,1.5vw,20px)!important;
  }
  html:root body #investors-page .nvx-metric :is(b,span) {
    min-inline-size:0!important;
    max-inline-size:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html:root body #investors-page .nvx-metric span {
    font-size:clamp(12px,1.2vw,14px)!important;
    line-height:1.45!important;
    margin-block-start:8px!important;
  }
  html:root body #investors-page #nvxMU {
    font-size:clamp(16px,1.45vw,20px)!important;
    line-height:1.3!important;
    margin-block-start:0!important;
    word-break:normal!important;
  }
  html:root body #investors-page :is(.nvx-h,.nvx-sub,.nvx-card h4,.nvx-card p,.nvx-bar-name) {
    min-inline-size:0!important;
    overflow-wrap:anywhere!important;
  }

  @media(max-width:900px) {
    html:root body #investors-page .nvx-metrics {
      grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
  }
  @media(max-width:600px) {
    html:root body #investors-page .nvx-wrap {
      padding-inline:0!important;
    }
    html:root body #investors-page :is(.nvx-hero,.nvx-summary) {
      padding-inline:16px!important;
    }
    html:root body #investors-page .nvx-metrics {
      gap:10px!important;
    }
    html:root body #investors-page .nvx-toggle {
      display:grid!important;
      grid-template-columns:repeat(2,minmax(0,1fr))!important;
      inline-size:100%!important;
      min-inline-size:0!important;
    }
    html:root body #investors-page .nvx-toggle button {
      min-inline-size:0!important;
      min-block-size:44px!important;
      padding:10px 8px!important;
      white-space:normal!important;
      overflow-wrap:anywhere!important;
      line-height:1.35!important;
    }
  }

  /* Visibility remains controlled by the existing .hidden class and chat actions. */
  html:root body #aiChat:not(.hidden) {
    display:flex!important;
    flex-direction:column!important;
    position:fixed!important;
    inset:auto!important;
    inset-block-end:16px!important;
    inset-inline-end:16px!important;
    box-sizing:border-box!important;
    inline-size:min(380px,calc(100vw - 32px))!important;
    max-inline-size:calc(100vw - 32px)!important;
    block-size:min(720px,calc(100dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 32px))!important;
    max-block-size:calc(100dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 32px)!important;
    min-block-size:0!important;
    overflow:hidden!important;
  }
  html:root body:has(.test-cabinet-notice) #aiChat:not(.hidden) {
    inset-block-end:64px!important;
    block-size:min(720px,calc(100dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 80px))!important;
    max-block-size:calc(100dvh - max(var(--header-h,64px),var(--nev-header-h,64px)) - 80px)!important;
  }
  html:root body #aiChat .ai-chat-header {
    flex:0 0 auto!important;
    gap:12px!important;
  }
  html:root body #aiChat .ai-chat-header>div {
    min-inline-size:0!important;
  }
  html:root body #aiChat .ai-chat-header :is(h3,p) {
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html:root body #aiChat .ai-close {
    flex:0 0 auto!important;
  }
  html:root body #aiChat .ai-messages {
    flex:1 1 180px!important;
    block-size:auto!important;
    min-block-size:64px!important;
    max-block-size:none!important;
    overflow-y:auto!important;
  }
  html:root body #aiChat .ai-quick-actions {
    flex:0 1 auto!important;
    min-block-size:0!important;
    max-block-size:min(240px,32dvh)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
  }
  html:root body #aiChat .ai-quick-actions button {
    max-inline-size:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.4!important;
  }
  html:root body #aiChat .ai-input-row {
    flex:0 0 auto!important;
    min-inline-size:0!important;
  }
  html:root body #aiChat .ai-input-row input {
    min-inline-size:0!important;
  }
}

/* Keep the cookie close control independent of generic text-button padding. */
@layer naspers-neutral-surfaces {
  html:root body #nlqCookieOv .nlq-ck-head {
    align-items:center!important;
    gap:16px!important;
  }
  html:root body #nlqCookieOv .nlq-ck-title {
    flex:1 1 auto!important;
    min-inline-size:0!important;
    margin:0!important;
    overflow-wrap:anywhere!important;
  }
  html:root body #nlqCookieOv .nlq-ck-head > button.nlq-lg-x {
    box-sizing:border-box!important;
    display:grid!important;
    place-items:center!important;
    flex:0 0 44px!important;
    inline-size:44px!important;
    block-size:44px!important;
    min-inline-size:44px!important;
    min-block-size:44px!important;
    max-inline-size:44px!important;
    max-block-size:44px!important;
    padding:0!important;
    margin:0!important;
    line-height:0!important;
    letter-spacing:0!important;
    text-indent:0!important;
    transform:none!important;
  }
  html:root body #nlqCookieOv .nlq-ck-head > button.nlq-lg-x > svg {
    display:block!important;
    inline-size:18px!important;
    block-size:18px!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
    pointer-events:none!important;
  }
  html:root body #nlqCookieOv .nlq-ck-head > button.nlq-lg-x::before,
  html:root body #nlqCookieOv .nlq-ck-head > button.nlq-lg-x::after {
    content:none!important;
    display:none!important;
  }
}

/* Content is already present: never hide it behind a scroll reveal. */
@layer naspers-neutral-surfaces {
  html:root body .nev-motion-item {
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    filter:none!important;
    transition:none!important;
    transition-delay:0ms!important;
    will-change:auto!important;
  }
}

/* Localized cookie categories wrap instead of losing the end of the label. */
@layer naspers-neutral-surfaces {
  html:root body #nlqCookieOv .nlq-ck-tab {
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-overflow:clip!important;
    block-size:auto!important;
    min-block-size:44px!important;
    line-height:1.35!important;
    text-align:start!important;
  }
  @media (max-width:540px) {
    html:root body #nlqCookieOv #nlqCkTabs {
      display:grid!important;
      grid-template-columns:minmax(0,1fr)!important;
    }
  }
}
