/* ATHRTY PX-183 | Canonical interaction and control authority.
   Migrated from PX-180 (responsive geometry) and PX-181 (matte control geometry).
   Ownership: one first-party control contract, with PX-182 retained as scoped surface refinement.
   Avoid global resets, auth/commerce changes and any customer-website/iframe/canvas styling.
   Original PX-180 and PX-181 remain as archival source, but must not be loaded alongside PX-183.
   NOTE: Floating Agent rules scoped to ATHRTY public v16-site and native workspace only. */

/* === RESPONSIVE GEOMETRY === */
/* ATHRTY PX-180 | Cross-shell control geometry and responsive interface convergence.
   Ownership: Public flagship / Solutions / authenticated Operator / Admin / Native Studio chrome.
   Excludes native canvas, customer sites, iframe previews, and exported documents.
   Theme authority remains the existing token system. */
:is(body.v393-operator,body.command-v23,body.v62-shell,body.as04-native,body.v66-contact){
  --px180-hit:44px;
  --px180-gap:clamp(8px,1.2vw,13px);
  --px180-focus:var(--athrty-accent,var(--accent,var(--px408-focus,#aee8d1)));
}
:where(body.v393-operator,body.command-v23,body.v62-shell,body.as04-native,body.v66-contact) :is(button,a[href],input,select,textarea,summary):focus-visible{
  outline:2px solid var(--px180-focus,#aee8d1);
  outline-offset:3px;
}
.v16-site :is(.v16-actions,.v16-bottom-cta){min-width:0;max-width:100%;gap:var(--px180-gap,12px)}
.v16-site :is(.v16-actions,.v16-bottom-cta) > a[href]{
  box-sizing:border-box;min-width:0;max-width:100%;min-height:48px;
  display:inline-flex;align-items:center;justify-content:center;gap:12px;
  line-height:1.32;text-align:center;white-space:normal;
}
body.v62-shell .hero-actions{min-width:0;max-width:100%;gap:clamp(10px,2vw,22px)}
body.v62-shell .hero-actions > :is(a[href],button){
  box-sizing:border-box;min-width:0;min-height:48px;
  display:inline-flex;align-items:center;justify-content:center;
  gap:12px;line-height:1.3;white-space:normal;
}
body.v62-shell .hero-actions > :is(a[href],button) svg{
  display:block;flex:0 0 auto;max-width:22px;max-height:22px;
}
body.v66-contact .submit-bar > button.submit{
  box-sizing:border-box;min-height:48px;display:inline-flex;
  align-items:center;justify-content:space-between;gap:16px;line-height:1.3;
}
body.v393-operator .v393-toolbar-actions{
  min-width:0;max-width:100%;gap:var(--px180-gap);
  align-items:center;
}
body.v393-operator .v393-toolbar-actions :is(button,a[href],select){
  box-sizing:border-box;min-height:var(--px180-hit);max-width:100%;
  line-height:1.35;
}
body.v393-operator .v33-actions{
  min-width:0;max-width:100%;align-items:stretch;gap:var(--px180-gap);
}
body.v393-operator .v33-actions > :is(button,a[href],.v33-button){
  box-sizing:border-box;min-width:0;min-height:var(--px180-hit);
  display:inline-flex;align-items:center;justify-content:center;
  line-height:1.35;text-align:center;white-space:normal;
}
body.v393-operator .v33-hero{min-width:0}
body.v393-operator .v33-hero :is(h1,p){max-width:100%}
body.command-v23 .page-header{min-width:0;max-width:100%;gap:clamp(12px,2vw,22px)}
body.command-v23 .page-header > div{min-width:0}
body.command-v23 .page-header .header-actions{
  min-width:0;max-width:100%;display:flex;align-items:center;
  flex-wrap:wrap;gap:var(--px180-gap);
}
body.command-v23 .page-header .header-actions > :is(button,a[href]){
  box-sizing:border-box;min-width:0;min-height:var(--px180-hit);
  display:inline-flex;align-items:center;justify-content:center;
  line-height:1.35;white-space:normal;
}
body.command-v23 .global-head :is(.head-left,.head-right){min-width:0}
body.as04-native .native-top-actions{
  min-width:0;max-width:100%;gap:var(--px180-gap);align-items:center;
}
body.as04-native .native-top-actions > button{
  box-sizing:border-box;min-height:var(--px180-hit);
  line-height:1.3;white-space:nowrap;
}
body.as04-native .native-bar :is(button,a[href]):focus-visible{
  outline:2px solid var(--px180-focus,#aee8d1);outline-offset:2px;
}
@media(max-width:760px){
  .v16-site :is(.v16-actions,.v16-bottom-cta) > a[href]{min-height:48px}
  body.v393-operator .v393-toolbar-actions{row-gap:8px;column-gap:8px}
  body.command-v23 .page-header .header-actions{gap:8px}
  body.as04-native .native-top-actions{
    overflow-x:auto;overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
  }
  body.as04-native .native-top-actions > button{flex:0 0 auto}
}
@media(max-width:430px){
  body.v62-shell .hero-actions{gap:10px}
  body.v62-shell .hero-actions > :is(a[href],button){min-height:48px}
}
@media(max-width:380px){
  body.v62-shell .hero-actions{align-items:stretch;flex-direction:column}
  body.v62-shell .hero-actions > :is(a[href],button){width:100%}
  body.v393-operator .v33-actions > :is(button,a[href],.v33-button){width:100%}
}
@media(prefers-reduced-motion:reduce){
  :where(body.v393-operator,body.command-v23,body.v62-shell,body.as04-native,body.v66-contact) :is(button,a[href],summary){
    scroll-behavior:auto;transition-duration:0.01ms;
  }
}

/* === MATTE CONTROL COMPONENTS === */
/* ATHRTY PX-181 | Matte control geometry
   Canonical pass for the public flagship and Native Studio chrome.
   Route scoped: does NOT affect customer HTML, iframe previews or published sites.
   Target sizes are kept >=44px. The visible rim is subtle; focus rings remain visible. */

:root{
  --px181-radius:11px;
  --px181-height:48px;
  --px181-gap:8px;
  --px181-ease:cubic-bezier(.2,.7,.2,1);
}

/* Public navigation: small, tactile controls without ornamental double strokes. */
.v59-header :is(.v17-mobile-menu,.v59-solutions-trigger,.factory-public-cta),
.v62-shell .nav-wrap :is(.v64-nav-toggle,#themeToggle),
.v64-network-header :is(.v64-nav-toggle,.v64-join-theme){
  box-sizing:border-box;
  box-shadow:none!important;
  border-radius:var(--px181-radius)!important;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.v59-header :is(.v17-mobile-menu,.v59-solutions-trigger),
.v62-shell .nav-wrap .v64-nav-toggle,
.v64-network-header .v64-nav-toggle{
  min-width:44px!important;
  min-height:44px!important;
  border-width:1px!important;
  border-color:color-mix(in srgb,var(--athrty-border,var(--border,#496157)) 44%,transparent)!important;
}
.v59-header :is(.v17-mobile-menu,.v59-solutions-trigger) svg,
.v62-shell .nav-wrap .v64-nav-toggle svg,
.v64-network-header .v64-nav-toggle svg{
  width:20px!important;height:20px!important;flex:none;
}

/* CTA and secondary links: one row of control geometry.
   Retain the existing primary/background colors and active destinations. */
.v16-site :is(.v16-actions,.v16-bottom-cta) > a[href],
.v62-shell .hero-actions > :is(a[href],button),
.v59-header .factory-public-cta{
  box-sizing:border-box;
  min-width:0;min-height:var(--px181-height);
  max-width:100%;
  display:inline-flex;align-items:center;justify-content:center;
  gap:var(--px181-gap);
  padding:11px 17px;
  border-radius:var(--px181-radius)!important;
  font-size:clamp(13px,1.05vw,15px);
  font-weight:680;line-height:1.3;letter-spacing:-.012em;
  text-decoration:none;
  box-shadow:none!important;
  text-align:center;white-space:normal;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:background-color 150ms var(--px181-ease),border-color 150ms var(--px181-ease),color 150ms var(--px181-ease)!important;
}
.v16-site :is(.v16-actions,.v16-bottom-cta) > a[href] svg,
.v62-shell .hero-actions > :is(a[href],button) svg,
.v59-header .factory-public-cta svg{
  display:block;width:17px!important;height:17px!important;
  max-width:17px!important;max-height:17px!important;flex:0 0 17px;
}
.v16-site :is(.v16-actions,.v16-bottom-cta),
.v62-shell .hero-actions{gap:9px;flex-wrap:wrap;min-width:0;max-width:100%}
.v16-site :is(.v16-actions,.v16-bottom-cta)>a[href]:active,
.v62-shell .hero-actions>:is(a[href],button):active{
  transform:none!important;filter:brightness(.95);
}
.v62-shell .nav-wrap :is(.v64-drawer-shortcuts,.v64-account-actions) a{
  border-radius:var(--px181-radius)!important;box-shadow:none!important;
}
.v62-shell .nav-wrap a.v64-drawer-cta{
  border-radius:var(--px181-radius)!important;min-height:46px;
  box-shadow:none!important;
}

/* Native Studio: do not allow desktop toolbar presets to inflate mobile controls. */
body.as04-native[data-px122-surface="builder-native"] .native-bar{
  min-width:0;
}
body.as04-native[data-px122-surface="builder-native"] .native-project{
  min-width:0;gap:8px;
}
body.as04-native[data-px122-surface="builder-native"] .native-project #openProjects{
  box-sizing:border-box!important;
  min-height:44px!important;height:44px!important;
  min-width:0!important;max-width:min(48vw,190px)!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:6px!important;padding:0 12px!important;
  border:1px solid color-mix(in srgb,var(--px55-border,#526961) 58%,transparent)!important;
  border-radius:10px!important;background:var(--px52-raised,#242e2e)!important;
  color:var(--px52-text,#eef5f0)!important;
  box-shadow:none!important;
  font-size:13px!important;font-weight:660!important;line-height:1.2!important;
  letter-spacing:-.01em!important;white-space:nowrap!important;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
body.as04-native[data-px122-surface="builder-native"] .native-project #openProjects span{
  font-size:16px!important;font-weight:500!important;line-height:1!important;
  display:inline-block!important;margin:0!important;
}
body.as04-native[data-px122-surface="builder-native"] .native-top-actions > button{
  box-sizing:border-box!important;
  min-height:44px!important;
  border-radius:10px!important;
  padding-inline:12px!important;
  font-size:12.5px!important;line-height:1.25!important;
  box-shadow:none!important;
  white-space:nowrap;
  -webkit-tap-highlight-color:transparent;
}
body.as04-native[data-px122-surface="builder-native"] .native-top-actions > button:disabled{
  opacity:.48;cursor:not-allowed;
}
body.as04-native[data-px122-surface="builder-native"] .native-bar :is(button,a):focus-visible,
.v16-site :is(.v16-actions,.v16-bottom-cta) > a[href]:focus-visible,
.v62-shell .hero-actions > :is(a[href],button):focus-visible{
  outline:2px solid var(--athrty-accent,var(--px57-accent,#a3d6c4))!important;
  outline-offset:3px!important;
}
@media(max-width:750px){
  body.as04-native[data-px122-surface="builder-native"] .native-bar{
    gap:8px!important;
  }
  body.as04-native[data-px122-surface="builder-native"] .native-project #openProjects{
    min-width:90px!important;max-width:min(45vw,170px)!important;
    padding-inline:12px!important;
  }
  body.as04-native[data-px122-surface="builder-native"] .native-top-actions{
    gap:7px!important;min-width:0!important;
  }
  .v16-site :is(.v16-actions,.v16-bottom-cta) > a[href],
  .v62-shell .hero-actions > :is(a[href],button){
    min-height:48px;font-size:14px;padding:11px 15px;
  }
}
@media(max-width:375px){
  body.as04-native[data-px122-surface="builder-native"] .native-project #openProjects{
    min-width:84px!important;max-width:44vw!important;
  }
  .v62-shell .hero-actions{gap:8px}
}

/* Floating Agent: reduce decorative weight and avoid covering the reading area.
   Functionality, dialog stacking and keyboard viewport logic are untouched. */
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .v17-assistant-launcher.jv120-launcher{
  box-sizing:border-box!important;
  width:205px!important;height:52px!important;min-height:52px!important;
  grid-template-columns:34px minmax(0,1fr) 19px!important;
  gap:8px!important;padding:7px 10px!important;
  border:1px solid var(--ax192-agent-edge,#476066)!important;
  border-radius:13px!important;
  background:var(--ax192-agent-panel,#172627)!important;
  color:var(--ax192-agent-ink,#eaf3ef)!important;
  box-shadow:0 7px 22px rgba(0,0,0,.22)!important;
  transform:none!important;
}
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-orb{
  box-sizing:border-box!important;width:34px!important;height:34px!important;
  border-radius:9px!important;border:1px solid var(--ax192-agent-edge,#476066)!important;
  box-shadow:none!important;
}
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-orb svg{
  width:20px!important;height:23px!important;
}
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-launch-copy strong{
  font-size:13px!important;line-height:1.2!important;letter-spacing:-.015em!important;
}
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-launch-copy small{
  font-size:8px!important;letter-spacing:.03em!important;
}
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-action-icon{
  width:19px!important;height:19px!important;
}
:is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-action-icon svg{
  width:17px!important;height:17px!important;
}
@media(max-width:650px){
  /* Keep first-party mobile CTAs and cards visible; launcher retains its
     explicit accessible name while becoming a single compact mark. */
  :is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .v17-assistant-launcher.jv120-launcher{
    width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;
    grid-template-columns:minmax(0,1fr)!important;
    place-items:center!important;gap:0!important;padding:8px!important;
    border-radius:16px!important;
    right:max(12px,env(safe-area-inset-right,0px))!important;
    bottom:calc(18px + env(safe-area-inset-bottom,0px))!important;
  }
  :is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-orb{
    width:36px!important;height:36px!important;border-radius:10px!important;margin:0!important;
  }
  :is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .jv120-launcher :is(.jv120-launch-copy,.jv120-action-icon){
    display:none!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .v16-site :is(.v16-actions,.v16-bottom-cta) > a[href],
  .v62-shell .hero-actions > :is(a[href],button),
  :is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .v17-assistant-launcher.jv120-launcher{
    animation:none!important;transition:none!important;transform:none!important;
  }
}
@media(forced-colors:active){
  :is(body:has(.v16-site),body.as04-native) .v17-assistant-widget.v17-advisor-mode .v17-assistant-launcher.jv120-launcher,
  body.as04-native[data-px122-surface="builder-native"] .native-project #openProjects{
    border:1px solid ButtonText!important;color:ButtonText!important;
  }
}

/* PX-182 | Editorial routes use a compact Agent dock.
   The public flagship retains the full brand launcher.
   Small launcher footprint avoids obstructing responsive card CTAs.
   Existing dialog, focus, accessible name, and click controller remain unchanged. */
body:has(.v16-site):not(:has(.v58-hero))
.v17-assistant-widget.v17-advisor-mode .v17-assistant-launcher.jv120-launcher{
  width:50px!important;height:50px!important;min-height:50px!important;
  grid-template-columns:minmax(0,1fr)!important;gap:0!important;
  padding:7px!important;border-radius:14px!important;
}
body:has(.v16-site):not(:has(.v58-hero))
.v17-assistant-widget.v17-advisor-mode .jv120-launcher :is(.jv120-launch-copy,.jv120-action-icon){
  display:none!important;
}
body:has(.v16-site):not(:has(.v58-hero))
.v17-assistant-widget.v17-advisor-mode .jv120-launcher .jv120-orb{
  width:34px!important;height:34px!important;margin:0!important;
}
@media(max-width:650px){
  body:has(.v16-site):not(:has(.v58-hero))
  .v17-assistant-widget.v17-advisor-mode .v17-assistant-launcher.jv120-launcher{
    width:48px!important;height:48px!important;min-height:48px!important;
    border-radius:12px!important;
  }
}