/*
 * AXIS WATCH AUTH
 * One architecture for every watch viewport from 160px through 320px.
 * Width changes spacing and sizing only; structure, order and alignment stay fixed.
 */
@media (min-width:160px) and (max-width:320px){
  body.login-page,
  body.register-entry-page{
    width:100vw;
    min-width:0;
    height:100svh;
    min-height:100svh;
    box-sizing:border-box;
    padding:clamp(3px,2vw,6px);
    overflow:hidden;
    display:grid;
    place-items:center;
  }

  body.login-page .login-shell,
  body.register-entry-page .register-entry-shell{
    width:100%;
    max-width:none;
    height:calc(100svh - clamp(6px,4vw,12px))!important;
    max-height:none;
    min-height:0;
    display:block;
  }

  body.login-page .login-card,
  body.register-entry-page .register-card{
    position:relative;
    width:100%!important;
    max-width:none!important;
    height:100%!important;
    max-height:none!important;
    min-height:0;
    box-sizing:border-box;
    display:grid;
    grid-template-columns:minmax(0,1fr) max-content max-content minmax(0,1fr);
    grid-template-rows:clamp(44px,min(20vw,23svh),64px) minmax(0,1fr) clamp(18px,min(7vw,9svh),23px);
    grid-template-areas:
      ". brand heading ."
      "form form form form"
      "support support support support";
    align-content:stretch;
    align-items:center;
    column-gap:clamp(3px,min(1.8vw,1.8svh),6px);
    row-gap:clamp(3px,min(1.8vw,1.8svh),6px);
    padding:clamp(5px,min(2.8vw,3.5svh),9px);
    overflow:hidden;
    border-radius:clamp(8px,4.5vw,15px);
  }

  body.login-page .login-card{
    grid-template-rows:
      clamp(44px,min(20vw,23svh),64px)
      minmax(0,1fr)
      clamp(21px,min(8vw,10svh),27px);
  }

  body.login-page .login-brief,
  body.register-entry-page .register-story,
  body.register-entry-page .register-mobile-story,
  body.register-entry-page .register-unlocks,
  body.register-entry-page .register-activation-line,
  body.login-page .login-divider,
  body.login-page .login-card-rule,
  body.login-page .message,
  body.register-entry-page .message{
    display:none!important;
  }

  body.login-page .login-back-home,
  body.register-entry-page .register-home-link{
    position:absolute!important;
    top:clamp(5px,2.5vw,7px);
    left:clamp(5px,2.5vw,7px);
    z-index:20;
    width:clamp(20px,8vw,26px);
    min-width:clamp(20px,8vw,26px);
    height:clamp(20px,8vw,26px);
    min-height:clamp(20px,8vw,26px);
    box-sizing:border-box;
    display:grid;
    grid-template-columns:1fr;
    gap:0;
    place-items:center;
    padding:0;
    border:1px solid rgba(104,195,255,.76);
    border-radius:50%;
    background:rgba(8,46,78,.72);
    box-shadow:
      inset 0 0 8px rgba(115,211,255,.16),
      0 0 8px rgba(55,169,255,.52);
    font-size:0;
  }

  body.login-page .login-back-home::before,
  body.register-entry-page .register-home-link::before{
    content:none;
  }

  body.login-page .login-back-home::after,
  body.register-entry-page .register-home-link::after{
    content:"";
    position:absolute;
    inset:2px;
    border:1px solid rgba(193,235,255,.12);
    border-radius:inherit;
    pointer-events:none;
  }

  body.login-page .login-home-icon,
  body.register-entry-page .register-home-icon{
    width:clamp(11px,4.2vw,14px);
    height:clamp(11px,4.2vw,14px);
    overflow:visible;
    fill:rgba(32,119,181,.14);
    stroke:#e5f8ff;
    stroke-width:1.65;
    stroke-linecap:round;
    stroke-linejoin:round;
    filter:drop-shadow(0 0 3px rgba(91,203,255,.95));
  }

  body.login-page .axis-login-lockup,
  body.register-entry-page .register-card-brand{
    grid-area:brand;
    width:auto;
    min-width:0;
    margin:0;
    align-self:center!important;
    justify-self:center;
    justify-items:center;
    align-content:center;
    gap:0;
    transform:
      translateX(clamp(-9px,-3vw,-6px))
      translateY(clamp(15px,6vw,19px))!important;
  }

  body.login-page .axis-login-lockup img,
  body.register-entry-page .register-card-brand img{
    width:clamp(38px,21vw,68px);
    max-width:none;
    height:auto;
    margin:clamp(-11px,-4vw,-7px) auto clamp(-9px,-3vw,-5px);
    filter:
      drop-shadow(0 0 9px rgba(92,178,255,.72))
      saturate(1.2);
  }

  body.login-page .axis-login-lockup span,
  body.register-entry-page .register-card-brand span,
  body.login-page .login-kicker,
  body.login-page .login-hero p:not(.login-kicker),
  body.register-entry-page .register-card-heading > span,
  body.register-entry-page .register-card-heading p{
    display:none!important;
  }

  body.login-page .login-hero,
  body.register-entry-page .register-card-heading{
    grid-area:heading;
    width:auto;
    min-width:0;
    margin:0;
    padding-left:0;
    align-self:center;
    justify-self:stretch;
    justify-items:start;
    align-content:center;
    gap:0;
    text-align:left;
    transform:
      translateX(clamp(-9px,-3vw,-6px))
      translateY(clamp(15px,6vw,19px))!important;
  }

  body.login-page h1,
  body.register-entry-page .register-card h2{
    max-width:100%;
    margin:0;
    justify-self:start!important;
    color:#f4f9ff;
    font-size:clamp(9px,6.2vw,20px);
    line-height:.96;
    letter-spacing:.01em;
    white-space:nowrap;
  }

  body.login-page .login-form,
  body.register-entry-page .register-card form{
    grid-area:form;
    width:100%;
    max-width:none;
    min-width:0;
    align-self:center!important;
    display:grid;
    grid-auto-rows:clamp(24px,min(9.5vw,11svh),31px);
    gap:clamp(3px,min(1.8vw,1.8svh),6px)!important;
    margin:0;
    padding:0!important;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    transform:none!important;
  }

  body.login-page .login-form{
    grid-template-rows:repeat(3,clamp(24px,min(9.5vw,11svh),31px));
  }

  body.register-entry-page .register-card form{
    grid-template-rows:repeat(4,clamp(24px,min(9.5vw,11svh),31px));
  }

  body.login-page .login-form label,
  body.login-page .axis-voice-field,
  body.login-page input,
  body.login-page button,
  body.register-entry-page .register-card input,
  body.register-entry-page .register-card button,
  body.register-entry-page .register-card .axis-voice-field{
    width:100%;
    min-width:0;
    height:100%!important;
    min-height:0!important;
    box-sizing:border-box;
  }

  body.login-page .login-form label{
    gap:0;
  }

  body.login-page .login-form label > span:not(.axis-voice-field){
    display:none!important;
  }

  body.login-page input,
  body.register-entry-page .register-card input{
    padding-inline:clamp(8px,4vw,12px);
    border-radius:clamp(7px,4vw,10px);
    color:#e6f4ff;
    font-size:clamp(8.2px,3.2vw,10.2px)!important;
  }

  body.login-page input::placeholder,
  body.register-entry-page .register-card input::placeholder{
    color:#a9cbe8;
    opacity:.96;
  }

  body.login-page button,
  body.register-entry-page .register-card button{
    padding-inline:clamp(8px,4vw,12px);
    border-radius:clamp(7px,4vw,10px);
    font-size:clamp(8px,3.1vw,9.8px)!important;
  }

  body.login-page .login-support,
  body.register-entry-page .register-card .links{
    grid-area:support;
    position:static!important;
    inset:auto!important;
    width:min(92%,220px)!important;
    height:100%;
    min-width:0;
    margin:0 auto!important;
    padding:0;
    align-self:center!important;
    justify-self:center!important;
    display:grid!important;
    align-content:center;
    transform:none!important;
  }

  body.login-page .login-links{
    width:100%!important;
    height:100%!important;
    align-self:stretch!important;
    display:grid!important;
    grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr)!important;
    gap:clamp(4px,2.5vw,7px);
    margin:0;
    padding:0;
    border:0;
  }

  body.login-page .login-support{
    align-content:stretch;
  }

  body.register-entry-page .register-card .links{
    width:min(54%,126px)!important;
  }

  body.login-page .login-support .login-links a,
  body.register-entry-page .register-card .links a{
    width:100%;
    min-width:0;
    height:100%!important;
    min-height:0!important;
    box-sizing:border-box;
    display:grid;
    place-items:center;
    padding:0 clamp(3px,2vw,6px)!important;
    border:1px solid rgba(112,191,255,.54);
    border-radius:clamp(6px,3.5vw,8px);
    background:
      linear-gradient(180deg,rgba(75,164,255,.18),rgba(26,86,145,.1)),
      rgba(5,24,41,.78);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.1),
      0 0 7px rgba(45,139,226,.18);
    color:#f1f9ff;
    font-size:clamp(6.5px,2.6vw,8.2px)!important;
    line-height:1;
    white-space:nowrap;
    text-decoration:none;
    overflow:hidden;
  }

  body.login-page .login-support .login-links a{
    font-size:clamp(7.2px,2.9vw,9.2px)!important;
  }
}

/* Canonical Mobile boundary: one architecture from 321px through 767px. */
@media (min-width:321px) and (max-width:767px){
  body.login-page,
  body.register-entry-page{
    width:100%;
    height:auto!important;
    min-height:100svh;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  body.login-page .login-shell,
  body.register-entry-page .register-entry-shell{
    width:100%;
    height:auto!important;
    max-height:none!important;
    grid-template-columns:1fr!important;
    transform:none!important;
  }

  body.register-entry-page .register-card{
    width:100%;
    height:auto!important;
    max-height:none!important;
    grid-template-columns:1fr!important;
    transform:none!important;
  }

  body.register-entry-page .register-card-brand span{
    display:none!important;
  }
}

/* Shared Home control: one centered SVG, without the legacy CSS glyph. */
body.login-page .login-back-home,
body.register-entry-page .register-home-link{
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:1fr;
  place-items:center;
  gap:0;
  padding:0;
  border-radius:50%;
  line-height:0;
}

body.login-page .login-back-home::before,
body.register-entry-page .register-home-link::before{
  content:none;
}

body.login-page .login-home-icon,
body.register-entry-page .register-home-icon{
  display:block;
  width:18px;
  height:18px;
  overflow:visible;
  fill:none;
  stroke:#8cc8ff;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  transform:none;
  filter:none;
}

@media (min-width:321px) and (max-width:767px){
  body.login-page .login-back-home,
  body.register-entry-page .register-home-link{
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px;
  }
}

@media (min-width:160px) and (max-width:320px){
  body.login-page .login-back-home,
  body.register-entry-page .register-home-link{
    width:clamp(20px,8vw,26px);
    min-width:clamp(20px,8vw,26px);
    height:clamp(20px,8vw,26px);
    min-height:clamp(20px,8vw,26px);
  }

  body.login-page .login-home-icon,
  body.register-entry-page .register-home-icon{
    width:clamp(11px,4.2vw,14px);
    height:clamp(11px,4.2vw,14px);
    stroke-width:1.65;
  }
}
