/* Numerish Blog Post enterprise acceptance r1.
 * Scoped styles: do not change the shared website navigation, CMS or consent semantics. */

/* Stable focus affordances for article-specific interactive controls. */
body:has(#npArticle) :is(a,button,summary,input,select,textarea):focus-visible {
  outline:3px solid #b5084d;
  outline-offset:3px;
}
body:has(#npArticle) .np-skip-link {
  position:fixed;
  top:10px;
  left:10px;
  z-index:2147482900;
  transform:translateY(-180%);
  padding:11px 18px;
  color:#fff;
  background:#242734;
  border:2px solid #fff;
  border-radius:9px;
  box-shadow:0 9px 25px rgba(0,0,0,.22);
  font:700 14px/1.3 system-ui,Arial,sans-serif;
  text-decoration:none;
}
body:has(#npArticle) .np-skip-link:focus {
  transform:translateY(0);
}
body:has(#npArticle) .np-article-content:focus {
  outline:none;
}
body:has(#npArticle) .np-breadcrumbs a {
  display:inline-flex;
  align-items:center;
  min-height:30px;
}
body:has(#npArticle) .np-article-richtext :is(h2,h3,h4),
body:has(#npArticle) .np-related-wrap {
  scroll-margin-top:145px;
}
html:has(#npArticle) {scroll-padding-top:145px;}

/* Legible and navigable privacy notice on the first visit.
   Cookie manager logic remains unchanged, including reject/accept/preferences. */
body:has(#npArticle) .cm360-in>p>a,
body:has(#npArticle) .cm360 .cm360-foot a {
  text-decoration:underline!important;
  text-underline-offset:3px;
  text-decoration-thickness:1.5px;
  font-weight:650;
}
body:has(#npArticle) .cm360 :is(button,a):focus-visible,
body:has(#npArticle) .cm360-modal :is(button,input,a):focus-visible {
  outline:3px solid #f1076a!important;
  outline-offset:3px;
}
body:has(#npArticle) .cm360 .cm360-actions button {
  min-height:44px;
}
body:has(#npArticle) .cm360-modal .cm360-dialog {
  max-height:min(90dvh,760px);
  max-width:min(calc(100vw - 32px),720px);
  overscroll-behavior:contain;
}
body:has(#npArticle) .cm360-modal .cm360-head button {
  min-width:44px;
  min-height:44px;
}
body:has(#npArticle) .cm360-cat input {min-width:22px;min-height:22px;}

/* Floating help controls are postponed while consent needs a decision;
   prevents unintentional overlay of consent actions or inaccessible focus. */
body:has(#npArticle):has(.cm360) :is(.ns-workflow-side-cta,.ns-guide360-launch,.ns-support,.ns-support-launch) {
  display:none!important;
}

/* Screens where article sidebar is not present: visible and tappable controls. */
@media(max-width:900px) {
  body:has(#npArticle) .np-mobile-toc summary {
    min-height:50px;
  }
  body:has(#npArticle) .np-mobile-toc .np-toc-item a {
    min-height:46px;
  }
}
@media(max-width:600px) {
  body:has(#npArticle) .cm360 {
    inset:auto calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
    width:auto;
    max-width:none;
    max-height:min(47dvh,360px);
    border-radius:13px;
    overflow:auto;
    overscroll-behavior:contain;
    box-shadow:0 12px 35px rgba(15,26,43,.19);
  }
  body:has(#npArticle) .cm360-in {
    padding:12px 13px!important;
  }
  body:has(#npArticle) .cm360 h2 {
    font-size:18px!important;
    line-height:1.18!important;
    margin:2px 0 7px!important;
  }
  body:has(#npArticle) .cm360 p {
    font-size:12px!important;
    line-height:1.46!important;
  }
  body:has(#npArticle) .cm360-in>small {
    font-size:9px!important;
    letter-spacing:.07em;
  }
  body:has(#npArticle) .cm360-actions {
    position:sticky;
    bottom:0;
    z-index:2;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    flex-wrap:initial!important;
    gap:7px!important;
    margin-top:11px!important;
    padding-top:7px;
    background:#fff;
  }
  body:has(#npArticle) .cm360-actions button {
    min-width:0!important;
    min-height:44px;
    padding:8px 6px!important;
    font-size:12px!important;
    line-height:1.2!important;
    white-space:normal;
  }
  body:has(#npArticle) .cm360-actions .primary {
    grid-column:1/-1;
  }
  body:has(#npArticle)[data-theme="dark"] .cm360-actions,
  html[data-theme="dark"] body:has(#npArticle) .cm360-actions {background:#0f1f32}
  body:has(#npArticle) .cm360-modal {
    padding:12px;
  }
  body:has(#npArticle):not(:has(.cm360)) .ns-workflow-side-cta {
    left:10px!important;
    right:auto!important;
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    min-width:0!important;
    max-width:min(45vw,163px)!important;
    min-height:44px!important;
  }
  body:has(#npArticle):not(:has(.cm360)) .ns-guide360-launch {
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    right:10px!important;
    min-height:44px!important;
    max-width:min(45vw,163px)!important;
  }
}
@media(max-width:350px) {
  body:has(#npArticle) .cm360 {
    max-height:49dvh;
  }
  body:has(#npArticle) .cm360-actions button {
    font-size:11px!important;
  }
}
/* Print only relevant content; no sticky sidebar/buttons or cookie UI. */
@media print {
  body:has(#npArticle) .cm360,
  body:has(#npArticle) .cm360-modal,
  body:has(#npArticle) .np-reading-progress,
  body:has(#npArticle) .np-article-sidebar,
  body:has(#npArticle) .np-mobile-toc,
  body:has(#npArticle) .ns-workflow-side-cta,
  body:has(#npArticle) .ns-guide360-launch,
  body:has(#npArticle) .np-share-expanded {display:none!important}
  body:has(#npArticle) .np-article-layout {display:block!important}
  body:has(#npArticle) .np-article-cover img {max-height:350px!important}
}
@media(prefers-reduced-motion:reduce) {
  body:has(#npArticle) .np-skip-link{transition:none!important}
}
