/* ATHRTY PX-40.8 | Cross-application interaction & responsive integrity.
 * Scope: first-party public, solutions, customer, sales, operator, admin and
 * native Studio chrome only. No blanket card restyling, DOM relocation or
 * generated customer-site / editor-canvas changes. */
:root{
 --px408-focus:var(--athrt-focus,var(--ath-os-accent,var(--accent,#bdecd1)));
 --px408-curve:cubic-bezier(.2,.8,.2,1);
}
/* One reliable keyboard affordance across product shells. Preserve outlines in
 * forced-colors and never confuse pointer focus with keyboard navigation. */
body:is(.v70-ui,.v393-operator,.athrty-owner-app,.athrty-sales-v14,.command-v23,[data-px122-surface="builder-native"])
 :is(button,a[href],input:not([type="hidden"]),select,textarea,summary,[role="button"],[role="tab"]):focus-visible{
 outline:2px solid var(--px408-focus);
 outline-offset:3px;
}
/* Avoid clipped rings in scrolling, bordered navigation surfaces, especially
 * on iOS, without globally changing overflow or editor document bounds. */
body.v62-shell #how .journey-button:focus-visible,
body.v62-shell .module-controls :is(input,select):focus-visible{
 outline-offset:2px;
}
body.v393-operator :is(.v33-card,.v33-fact,.v33-grid,.v33-actions,.v33-lesson,.px406-learning-toolbar){
 min-width:0;
}
body.athrty-owner-app :is(.v16-card,.v18-panel,.v191-workspace-card,.v30-customer-nav){
 min-width:0;
}
/* Tablet journey navigator: previously seven buttons were horizontally
 * clipped by a scrolling flex row at 701–1020px. Keep every stage visibly
 * selectable with a two-row, intentional 4-column grid. */
@media(min-width:701px) and (max-width:1020px){
 body.v62-shell.v70-ui #how .journey-flow{
   display:grid!important;
   grid-template-columns:repeat(4,minmax(0,1fr))!important;
   gap:9px;
   overflow:visible!important;
   scroll-snap-type:none!important;
   padding:2px 2px 8px;
   margin-right:0;
   min-width:0;
 }
 body.v62-shell.v70-ui #how .journey-button{
   box-sizing:border-box;
   width:100%;
   min-width:0;
   max-width:none;
   min-height:48px;
   padding:10px 8px;
   flex:auto;
   justify-content:center;
   white-space:normal;
   text-align:center;
   line-height:1.25;
   scroll-snap-align:none;
 }
}
/* Compact native/touch first-party controls, no enlargement of decorative
 * checkbox glyphs or controls inside an authored canvas/document. */
body.v62-shell #how .journey-button,
body.v62-shell .module-controls :is(input[type="search"],select),
body.athrty-owner-app .v30-customer-more > summary,
body.v393-operator .px406-mode-btn{
 min-height:44px;
}
body.v62-shell #how .journey-detail{
 min-width:0;
 overflow-wrap:break-word;
}
body.v70-ui .v16-site :is(.v16-card,.v59-solution-section,.v59-process>li){
 min-width:0;
}
body.v70-ui .v16-site :is(.v16-card,.v59-solution-section) :is(h2,h3,p){
 overflow-wrap:break-word;
}
/* Form legibility: avoid 12–14px form font triggering mobile Safari autozoom.
 * Keep native canvas zoom semantics and authored customer sites unchanged. */
/* Compact tablet widths use the same readable form controls as phones. */
@media(min-width:601px) and (max-width:1024px){
 body.v62-shell.v70-ui :is(#moduleFilter,#px38Search,#px38SelectedOnly,#leadCount,#contribution,#businessName,#recovery,#closeRate){font-size:16px!important}
}
@media(max-width:600px){
 body.v62-shell.v70-ui #px38SelectedOnly{font-size:16px!important}
 body:is(.v70-ui,.v393-operator,.athrty-owner-app,.command-v23,.athrty-sales-v14):not([data-px122-surface="builder-native"])
 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),textarea,select){
   font-size:max(16px,1em);
 }
 body.v62-shell .module-controls{
   min-width:0;gap:10px;
 }
 body.v62-shell .module-controls :is(input[type="search"],select){
   width:100%;max-width:100%;
   min-height:46px;
 }
 /* Existing search rule uses a fixed 15px font with high specificity.
    Bring it to 16px so iOS does not zoom unexpectedly on focus. */
 body.v62-shell.v70-ui #modules .module-controls #px38Search{
   font-size:16px!important;
 }
 body.v70-ui .v16-site .px403-toggle,
 body.v393-operator .px404-toggle{
   min-height:44px;
 }
}
/* Meaningful, consistently offset in-page navigation under sticky headers. */
body.v62-shell :is(#ladder,#diagnostic,#how,#modules,#plan),
body.v70-ui .v16-site :is(section[id],article[id]),
body.v393-operator :is(#v33-content [id],#workspace){
 scroll-margin-top:clamp(82px,9vw,112px);
}
/* Reduced-motion means functional instant state changes, not removed states. */
@media(prefers-reduced-motion:reduce){
 body.v62-shell :is(.journey-button,.module-card),
 body.v70-ui .v16-site .px403-toggle,
 body.v393-operator :is(.px406-mode-btn,.px404-toggle){
   transition:none!important;
   animation:none!important;
 }
}
@media(forced-colors:active){
 body:is(.v70-ui,.v393-operator,.athrty-owner-app,.athrty-sales-v14,.command-v23,[data-px122-surface="builder-native"])
 :is(button,a[href],input,select,textarea,summary):focus-visible{
   outline:2px solid Highlight;
 }
 body.v62-shell #how .journey-button[aria-pressed="true"]{
   outline:2px solid Highlight;
   outline-offset:-3px;
 }
}

/* PX-41.1 | Enterprise-wide experience precision.
   Scoped to first-party operating chrome: never alter authored site canvases,
   live client embeds, proposal designs or checkout documents. */
body:is(.v393-operator,.athrty-sales-v14,.command-v23,.athrty-owner-app) {
 --px411-control-height:44px;
 --px411-radius:clamp(12px,1.25vw,17px);
 --px411-density:clamp(10px,1.2vw,16px);
 --px411-curve:cubic-bezier(.2,.75,.22,1);
}
body.v393-operator :is(.v33-frame,.v33-toolbar,.v33-content,#workspace,#v33-content,.v33-grid,.v33-facts,.v33-actions){
 min-width:0;
}
body.v393-operator :is(.v33-grid,.v33-actions,.v33-facts){
 gap:var(--px411-density);
}
body.v393-operator :is(.v33-card,.v33-lesson,.v33-fact){
 min-width:0;
 /* Wrap exceptionally long strings without splitting normal interface labels. */
 overflow-wrap:break-word;word-break:normal;
 border-radius:var(--px411-radius);
 /* Surface interactions change pigment, never geometry or layout. */
 transition:background-color 180ms var(--px411-curve),border-color 180ms var(--px411-curve);
}
body.v393-operator :is(.v33-card,.v33-lesson,.v33-fact) :is(h2,h3,strong){
 text-wrap:pretty;
}
body:is(.v393-operator,.athrty-sales-v14,.command-v23)
 :is(.v33-facts,.v32-metrics,.metrics,[data-metric],[data-value],.num,.amount){
 font-variant-numeric:tabular-nums;
}
body.v393-operator .v33-toolbar{
 min-width:0;
 column-gap:clamp(10px,1.5vw,20px);
}
body.v393-operator .v393-toolbar-actions{
 min-width:0;
 flex-wrap:wrap;
 gap:8px;
}
body:is(.v393-operator,.athrty-sales-v14,.command-v23,.athrty-owner-app)
 :is([role="menu"],[role="listbox"],.px410-menu,[data-popover-content]){
 max-width:min(440px,calc(100vw - 24px));
 max-height:min(65vh,520px);
 overflow-y:auto;
 overscroll-behavior:contain;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 body.v393-operator :is(.v33-card,.v33-lesson,.v33-fact):hover{
  border-color:color-mix(in srgb,var(--ath-os-accent,var(--accent,#a5dec6)) 20%,var(--ath-os-border,var(--edge,#3b4540)));
 }
}
@media(max-width:760px){
 body.v393-operator .v33-toolbar{gap:10px}
 body.v393-operator :is(.v33-grid,.v33-actions,.v33-facts){gap:10px}
 body.v393-operator :is(.v33-card,.v33-lesson,.v33-fact){max-width:100%}
 body:is(.v393-operator,.athrty-sales-v14,.command-v23)
  :is([role="menu"],[role="listbox"],.px410-menu,[data-popover-content]){
    max-width:calc(100vw - 16px);
    max-height:calc(100dvh - 96px);
  }
}
@media(prefers-reduced-motion:reduce){
 body.v393-operator :is(.v33-card,.v33-lesson,.v33-fact){transition:none!important}
}
/* AX-104: zero-jump interaction and small-screen density.
   Only first-party workspace / public ATHRTY disclosure primitives. */
body[data-px404-workspace] .px404-region,
body.v70-ui .v16-site .px403-region{
 overflow-anchor:none;
 min-width:0;
}
body[data-px404-workspace] .px404-region-inner,
body.v70-ui .v16-site .px403-region-inner{
 overflow-wrap:break-word;
 min-width:0;
}
@media(max-width:600px){
 body[data-px404-workspace] .px404-toggle,
 body.v70-ui .v16-site .px403-toggle{
  min-width:0;
  max-width:100%;
  min-height:44px;
  white-space:normal;
  text-align:left;
  touch-action:manipulation;
 }
 body.v393-operator .v33-toolbar .v393-toolbar-actions>*{
  min-width:0;
  max-width:100%;
 }
}
@media(prefers-reduced-motion:reduce){
 body[data-px404-workspace] .px404-region,
 body.v70-ui .v16-site .px403-region{
  transition:none!important;
 }
}