/* ATHRTY X-CONVERGENCE-160000: one first-party surface contract.
   Scoped to Genesis chrome and its login entry. Never style customer previews,
   tenant canvases, checkout iframes, or semantic success/warning states. */
body.xgenesis-shell,
body.xgenesis-auth,
body.athrty-network-standalone{
  --ath-conv-canvas:var(--athrty-brand-bg,#0c1217);
  --ath-conv-surface:var(--athrty-brand-surface,#162028);
  --ath-conv-elevated:var(--ath-dg-raised,#1d2c35);
  --ath-conv-text:var(--athrty-brand-ink,#f1f3f2);
  --ath-conv-muted:var(--athrty-brand-muted,#aab8be);
  --ath-conv-border:var(--ath-dg-material-line,rgba(167,193,204,.20));
  --ath-conv-steel:var(--athrty-brand-bright,#8fa8b5);
  --ath-conv-focus:var(--ath-dg-focus,#bfd0db);
  --ath-conv-radius:18px;
  --ath-conv-pill:999px;
  --athrty-font-primary:Arial,Helvetica,sans-serif;
  --athrty-heading-font:Arial,Helvetica,sans-serif;
  --athrty-ui-font:Arial,Helvetica,sans-serif;
}
body.xgenesis-shell{
  background:var(--ath-conv-canvas);
  color:var(--ath-conv-text);
}
/* X-UI-61000 — First-party native text-entry invariant.
   Prevent iOS focus zoom and illegible 12–15px inputs across Work, Sell,
   Studio, Network, public discovery and the command palette. Preserve
   custom tenant and preview typography, specialist inputs, and checkout. */
body.xgenesis-shell #main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]),select,textarea):not(:is([data-tenant-preview] *,[data-customer-preview] *,.studio-canvas *,.site-preview *,.x920-preview *)),
body.xgenesis-shell #palette :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]),select,textarea){
  font-size:max(16px,1em)!important;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
:root:not([data-athrty-appearance="light"]) body.xgenesis-shell .global-header{
  background:rgba(12,18,23,.97)!important;
}
body.xgenesis-shell :is(.global-header,#workspace-drawer,#x1113-nav-panel){
  border-color:var(--ath-conv-border);
}
/* Canonical first-party navigation material; explicit light mode is preserved. */
:root:not([data-athrty-appearance="light"]) body.xgenesis-shell #x1113-nav-panel{
  background:var(--ath-conv-canvas,#0c1217)!important;
  border-left:1px solid var(--ath-conv-border)!important;
}
body.xgenesis-shell .global-header .wordmark,
body.xgenesis-shell .x850-identity-title{
  font-family:var(--athrty-heading-font)!important;
}
body.xgenesis-shell :is(button,a,input,select,textarea,summary):focus-visible,
body.xgenesis-auth :is(button,a,input,select,textarea):focus-visible{
  outline:2px solid var(--ath-conv-focus)!important;
  outline-offset:3px!important;
}
/* Standalone login must not paint a second green/gray application palette. */
body.xgenesis-auth{
  background:var(--ath-conv-canvas)!important;
  color:var(--ath-conv-text)!important;
  min-height:100svh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  font-family:var(--athrty-font-primary)!important;
}
body.xgenesis-auth header{
  top:clamp(24px,4.5svh,42px);
  left:max(24px,env(safe-area-inset-left));
  color:var(--ath-conv-text);
}
body.xgenesis-auth main{
  width:min(520px,calc(100vw - 48px));
  max-width:100%;
  margin:clamp(145px,18svh,205px) auto 0!important;
  padding:0 0 56px!important;
}
body.xgenesis-auth h1{
  color:var(--ath-conv-text);
  font-family:var(--athrty-heading-font)!important;
  font-size:clamp(36px,7vw,56px);
  font-weight:700;
  line-height:1.08;
  letter-spacing:-.065em;
  max-width:14ch;
  text-wrap:balance;
}
body.xgenesis-auth main>p,
body.xgenesis-auth #passkey-step p{
  color:var(--ath-conv-muted)!important;
  max-width:48ch;
}
body.xgenesis-auth label{
  color:var(--ath-conv-text);
  font-size:13px;
  font-weight:650;
}
body.xgenesis-auth :is(input#email,input#code){
  min-height:56px;
  padding:15px 16px;
  background:var(--ath-conv-surface)!important;
  border:1px solid var(--ath-conv-border)!important;
  color:var(--ath-conv-text)!important;
  border-radius:14px!important;
  font-family:var(--athrty-font-primary)!important;
  font-size:16px!important;
}
body.xgenesis-auth :is(input#email,input#code)::placeholder{color:var(--ath-conv-muted);opacity:.8}
body.xgenesis-auth :is(input#email,input#code):focus{
  border-color:var(--ath-conv-steel)!important;
}
body.xgenesis-glass.xgenesis-auth :is(#submit,#passkey-add){
  min-height:54px!important;
  border-radius:var(--ath-conv-pill)!important;
  background:#c7d8e2!important;
  border:1px solid #c7d8e2!important;
  color:#0d1c27!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  font-family:var(--athrty-font-primary)!important;
  transition:background-color .2s ease,border-color .2s ease;
}
body.xgenesis-auth :is(#submit,#passkey-add):hover:not(:disabled){
  background:#e6eef2!important;
  border-color:#e6eef2!important;
}
body.xgenesis-auth :is(#back,#passkey-skip){
  min-height:50px;
  border-radius:var(--ath-conv-pill)!important;
  background:var(--ath-conv-surface)!important;
  border-color:var(--ath-conv-border)!important;
  box-shadow:none!important;
}
body.xgenesis-auth .start-path{
  color:var(--ath-conv-muted)!important;
  margin-top:clamp(35px,6svh,68px);
  font-size:14px;
}
body.xgenesis-auth .start-path a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:#c7d8e2!important;
  text-decoration:none!important;
}
body.xgenesis-auth .start-path a:hover{color:#f6fafc!important;text-decoration:none!important}
body.xgenesis-auth #message{color:var(--ath-conv-muted);line-height:1.5}
/* Mobile shell: keep canonical five destinations visible, never under the Agent. */
@media(max-width:760px){
  body.xgenesis-shell.x1121-mobile-active #x1121-mobile-nav:not([hidden]){
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:stretch;
    gap:3px!important;
    width:100%;
    max-width:100vw;
    min-width:0;
    padding:7px 7px calc(9px + env(safe-area-inset-bottom,0px))!important;
    background:var(--ath-conv-canvas)!important;
    border-top:1px solid var(--ath-conv-border)!important;
    z-index:1100!important;
    overflow:visible;
  }
  body.xgenesis-shell.x1121-mobile-active #x1121-mobile-nav a:not([hidden]){
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:5px;
    min-width:0!important;
    max-width:100%;
    min-height:60px!important;
    padding:8px 1px!important;
    text-align:center;
    border-radius:15px!important;
  }
  body.xgenesis-shell #x1121-mobile-nav .x1121-mobile-symbol{
    flex:0 0 auto;
    display:grid;
    place-items:center;
    min-width:22px;
    min-height:22px;
  }
  body.xgenesis-shell #x1121-mobile-nav .x1121-mobile-label{
    display:block;
    min-width:0;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px!important;
    line-height:1.25;
  }
  body.xgenesis-shell.x1121-mobile-active #x1121-mobile-nav a[aria-current="page"]{
    background:var(--ath-conv-elevated)!important;
    border-color:var(--ath-conv-border)!important;
    color:var(--ath-conv-text)!important;
  }
  body.xgenesis-shell.x1121-mobile-active :is(#xag8-launch,#ath-shell-jarvis-button):not([hidden]){
    position:fixed!important;
    right:max(14px,env(safe-area-inset-right))!important;
    bottom:calc(94px + env(safe-area-inset-bottom,0px))!important;
    z-index:1180!important;
    min-width:54px!important;
    min-height:54px!important;
  }
  body.xgenesis-shell.x1121-mobile-active .body{
    padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))!important;
  }
  body.xgenesis-shell .x711-shell>.x711-tabs{
    max-width:100%;
    min-width:0;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
  }
  body.xgenesis-shell .x711-shell>.x711-tabs > :is(button,a){
    flex-shrink:0;
    scroll-snap-align:start;
  }
  body.xgenesis-shell #main .xos32000-workspace-actions{
    display:flex;
    flex-wrap:wrap!important;
    gap:8px;
    overflow:visible!important;
  }
  body.xgenesis-shell #main .xos32000-workspace-actions > a{
    flex:0 1 auto;
    min-height:44px;
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  body.xgenesis-shell #main,
  body.xgenesis-shell .x711-shell{
    min-width:0;
    max-width:100%;
  }
  body.xgenesis-auth main{
    margin-top:clamp(110px,14svh,160px)!important;
  }
}
@media(max-height:680px){
  body.xgenesis-auth main{margin-top:110px!important}
}
/* Standalone Network consumes the same first-party ATHRTY material contract.
   Status colors inside its widgets and any project-owned previews stay untouched. */
body.athrty-network-standalone{
  background:var(--ath-conv-canvas)!important;
  color:var(--ath-conv-text);
  font-family:var(--athrty-font-primary)!important;
  min-width:0;
  overflow-x:clip;
}
body.athrty-network-standalone #x716-root.x716{
  --xn-bg:var(--ath-conv-canvas);
  --xn-card:var(--ath-conv-surface);
  --xn-raised:var(--ath-conv-elevated);
  --xn-border:var(--ath-conv-border);
  --xn-ink:var(--ath-conv-text);
  --xn-muted:var(--ath-conv-muted);
  --xn-accent:var(--ath-conv-steel);
  font-family:var(--athrty-font-primary)!important;
}
body.athrty-network-standalone :is(.xnet-platform-bar,.xos30002-network-return){
  border-color:var(--ath-conv-border);
}
body.athrty-network-standalone .net-login .actions .primary{
  background:#c7d8e2!important;
  border-color:#c7d8e2!important;
  color:#0d1c27!important;
}
body.athrty-network-standalone :is(button,a,input,select,textarea,summary):focus-visible{
  outline:2px solid var(--ath-conv-focus)!important;
  outline-offset:3px!important;
}
@media(max-width:760px){
  body.athrty-network-standalone #x716-root.x716{width:100%;max-width:100%;min-width:0}
  body.athrty-network-standalone #x716-root .xnet-shell{max-width:100%;min-width:0}
  body.athrty-network-standalone #x716-root :is(.xnet-center,.x716-main){min-width:0}
}

@media(prefers-reduced-motion:reduce){
  body.xgenesis-auth :is(#submit,#passkey-add){transition:none!important}
  body.xgenesis-shell .x711-shell>.x711-tabs{scroll-behavior:auto!important}
}
/* X-MOBILE-1610 — one mobile overlay and navigation contract.
   Pure presentation: no auth, route, Agent execution or tenant-state changes. */
body.xgenesis-shell.xheader-search-open{
  overflow:hidden!important;
  overscroll-behavior:contain!important;
}
body.xgenesis-shell.xheader-search-open :is(#xag8-launch,#ath-shell-jarvis-button,.ath-shell-jarvis-button){
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.xgenesis-shell.xheader-search-open #x1121-mobile-nav:not([hidden]){
  visibility:hidden!important;
  pointer-events:none!important;
}
@media(max-width:760px){
  /* Distribute only authorized, visible tabs. Fixed five-column grids
     leave dead slots when Studio or Sell is not permitted. */
  body.xgenesis-shell.x1121-mobile-active #x1121-mobile-nav:not([hidden]){
    display:flex!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    gap:4px!important;
    padding-inline:8px!important;
    max-width:100vw!important;
  }
  body.xgenesis-shell.x1121-mobile-active #x1121-mobile-nav>a:not([hidden]){
    flex:1 1 0!important;
    width:auto!important;
    min-width:0!important;
    min-height:60px!important;
    gap:4px!important;
    border-radius:13px!important;
  }
  body.xgenesis-shell:not([data-jarvis-embed]) #xag8-launch{
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    min-height:52px!important;
    padding:6px!important;
    border-radius:16px!important;
  }
  body.xgenesis-shell .x1113-nav-panel .x1113-nav-interior{
    padding-top:calc(18px + env(safe-area-inset-top,0px))!important;
    padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important;
  }
}
@media(max-width:360px){
  body.xgenesis-shell #x1121-mobile-nav .x1121-mobile-label{font-size:10px!important}
}