/* Jeddah Anchor — Edition 09 visual refinement
   Intentional last-loaded layout contract. Keeps forms, routes and business logic intact.
   The page container is shared; functional reading surfaces can be centered within it. */
:root{
  --ja-page-max:1480px;
  --ja-page-gutter:clamp(18px,2.35vw,38px);
  --ja-ink:#0a3049;
  --ja-sea:#076c8b;
  --ja-surface:#fff;
  --ja-edge:#d7e6ed;
}

/* 1. One real canvas for all top-level screens, not just their banner.
   Standalone inspection/review modules previously imposed 1100/1320px caps. */
.content-in,.pub-main,.pv-main,.pub-header-in,.pv-top-in{
  width:100%!important;
  max-width:var(--ja-page-max)!important;
  margin-inline:auto!important;
  padding-inline:var(--ja-page-gutter)!important;
  box-sizing:border-box!important;
  min-width:0;
}
.content-in > *, .pub-main > *, .pv-main > *{min-width:0;box-sizing:border-box}
.content-in :is(.iw,.iw.ia,.ia,.rvw,.fiw,.fi-issue,.op-layout),
.content-in > :is(.iw,.iw.ia,.ia,.rvw,.fiw,.fi-issue){
  width:100%!important;
  max-width:100%!important;
  margin-inline:0!important;
  min-width:0;
}
.content-in :is(.iw-top,.iw-main,.iw-pages,.fi-head,.ia-head,.rvw .ph){max-width:100%!important}
/* On long customer forms, the hero and the real form must use the SAME measure. */
.pub-main:is(.is-complaint,.is-feedback,.is-inspection,.is-track){
  max-width:var(--ja-page-max)!important;
  justify-items:center;
  align-content:start;
}
.pub-main:is(.is-complaint,.is-feedback,.is-inspection,.is-track) > :is(.pub-intro,.form,.card,.notice,.ix-progress){
  width:min(100%,1220px)!important;
  max-width:1220px!important;
  margin-inline:auto!important;
}
/* Public landing, authority result and admin keep consistent structural margins. */
.pub-main.is-landing > :is(.pub-intro,.choices,.hint,.ja-services-heading){width:100%!important;max-width:none!important}
.pv-main > :is(.pv-search,.pv-results,.pv-card,.pv-w,.pv-back,.pv-actions,.pv-foot-note,.ja7-authority-guide){width:100%;max-width:100%!important}
.pv.is-auth:has(.ja-authority-frame) .pv-main{max-width:var(--ja-page-max)!important}

/* 2. Staff login: full-sized editorial panel with vertical rhythm, no clipped footer.
   A flex outer surface prevents CSS grid intrinsic-content shrinkage. */
@media(min-width:850px){
 .auth.auth-premium{
   display:flex!important;justify-content:center!important;align-items:center!important;
   width:100%!important;min-width:0;
   min-height:calc(100dvh - 144px)!important;
   padding:clamp(14px,2.35vw,30px)!important;
 }
 .auth.auth-premium .auth-stage{
   display:grid!important;
   width:min(1200px,calc(100vw - 64px))!important;
   min-width:0!important;max-width:none!important;
   height:min(624px,calc(100dvh - 174px))!important;
   min-height:0!important;
   grid-template-columns:minmax(0,.99fr) minmax(0,1.01fr)!important;
   align-items:stretch!important;flex-shrink:0!important;
   border-radius:23px!important;
 }
 .auth.auth-premium .auth-card{
   min-width:0!important;justify-content:center!important;
   padding:clamp(26px,3.5vw,52px)!important;gap:13px!important;
 }
 .auth.auth-premium .auth-brand{padding-bottom:10px!important;margin-bottom:2px!important}
 .auth.auth-premium h1{font-size:clamp(2.1rem,3vw,2.7rem)!important;line-height:1.22!important;margin:0!important}
 .auth.auth-premium .muted{font-size:.96rem!important;margin:0 0 8px!important}
 .auth.auth-premium .auth-card form{width:100%!important;gap:14px!important}
 .auth.auth-premium .field input{min-height:52px!important}
 .auth.auth-premium .auth-foot{margin-top:6px!important;padding:6px 0!important}
 .auth.auth-premium .auth-story{
   min-height:0!important;padding:28px!important;
   background-size:cover!important;background-position:50% 48%!important;
   justify-content:space-between!important;
 }
 .auth.auth-premium .auth-story-top{
   background:rgba(3,42,64,.86)!important;border:1px solid rgba(255,255,255,.17)!important;
   border-radius:12px!important;padding:11px 15px!important;
 }
 .auth.auth-premium .auth-story-copy{
   margin-top:auto!important;
   margin-bottom:0!important;
   padding:22px 24px!important;
   width:100%!important;max-width:100%!important;
   border-radius:16px!important;
   background:linear-gradient(135deg,rgba(5,42,64,.91),rgba(6,51,71,.83))!important;
   border:1px solid rgba(255,255,255,.15)!important;
   box-shadow:0 14px 26px rgba(3,27,42,.21)!important;
 }
 .auth.auth-premium .auth-story-copy h2{
   font-size:clamp(1.75rem,2.2vw,2.25rem)!important;
   line-height:1.37!important;margin:0 0 6px!important;
 }
 .auth.auth-premium .auth-story-copy p{font-size:.91rem!important;line-height:1.6!important;margin:0!important}
 .auth.auth-premium .auth-story-bottom{display:none!important}
}
@media(min-width:850px) and (max-height:750px){
 .auth.auth-premium .auth-stage{height:min(570px,calc(100dvh - 152px))!important}
 .auth.auth-premium .auth-card{padding:22px 38px!important;gap:10px!important}
 .auth.auth-premium .auth-brand{padding-bottom:5px!important}
 .auth.auth-premium .auth-brand img{width:48px!important;height:48px!important}
 .auth.auth-premium .auth-card form{gap:10px!important}
 .auth.auth-premium .field input{min-height:46px!important}
 .auth.auth-premium .auth-story-copy{padding:14px 18px!important}
}

/* 3. Feedback question belongs ABOVE its gold box, never touching its border.
   Fieldset/legend semantics remain intact; only the visual stars get a card. */
.pub-main.is-feedback .rating-field{
  display:block!important;padding:0!important;margin:0 0 22px!important;
  border:0!important;background:transparent!important;
  border-radius:0!important;min-width:0!important;
  text-align:initial!important;
}
.pub-main.is-feedback .rating-field legend{
  display:block!important;float:none!important;
  width:100%!important;max-width:100%!important;
  box-sizing:border-box!important;
  padding:0!important;margin:0 0 15px!important;
  text-align:start!important;
  font-size:1.02rem!important;line-height:1.6!important;
  color:var(--ja-ink)!important;
}
.pub-main.is-feedback .rating-surface{
  display:grid;justify-items:center;gap:12px;
  width:100%;padding:25px 20px 20px;
  border:1px solid #e9d4a8;border-radius:17px;
  background:linear-gradient(140deg,#fff8ea 0%,#fffdf8 70%,#fff 100%);
}
.pub-main.is-feedback .rating-surface .rating{display:flex!important;align-items:center;justify-content:center;gap:14px!important;flex-wrap:wrap}
.pub-main.is-feedback .rating-surface .rating label{width:56px!important;height:56px!important;border-radius:14px!important}
.pub-main.is-feedback .rating-caption{margin:0!important;color:#7b6034!important;font-size:.91rem!important;text-align:center!important}

/* 4. Authority photo: do not lay the slogan directly across the crane and vessel.
   One image, a balanced gradient and a compact legible editorial panel at the bottom. */
.ja-authority-story{position:relative!important;isolation:isolate!important;
 display:flex!important;flex-direction:column!important;gap:22px!important;
 min-width:0!important;overflow:hidden!important;
 background-position:55% 48%!important;
}
.ja-authority-story::before{
 display:block!important;content:""!important;
 position:absolute!important;inset:0!important;z-index:-1!important;
 background:linear-gradient(180deg,rgba(3,36,57,.44) 0%,rgba(3,36,57,.08) 44%,rgba(4,36,57,.39) 100%)!important;
}
.ja-authority-story-top{position:relative!important;z-index:1!important;
 align-self:flex-start!important;padding:9px 12px!important;
 background:rgba(4,41,63,.81)!important;border:1px solid rgba(255,255,255,.17)!important;
 border-radius:12px!important;
}
.ja-authority-story-copy{
 position:relative!important;z-index:1!important;
 width:100%!important;max-width:100%!important;
 margin: auto 0 0!important;align-self:stretch!important;
 padding:24px 26px!important;text-align:start!important;
 background:linear-gradient(135deg,rgba(4,38,60,.94),rgba(5,45,66,.85))!important;
 border:1px solid rgba(255,255,255,.18)!important;border-radius:17px!important;
 box-shadow:0 15px 32px rgba(3,24,40,.21)!important;
}
.ja-authority-story-copy .ja-hero-eyebrow{
 color:#f9d38f!important;font-size:.73rem!important;line-height:1.5!important;
}
.ja-authority-story-copy h2{
 color:#fff!important;text-shadow:none!important;
 font-size:clamp(1.95rem,2.6vw,2.6rem)!important;
 line-height:1.3!important;margin:11px 0 7px!important;
}
.ja-authority-story-copy p{
 color:#e7f3f7!important;text-shadow:none!important;
 font-size:.96rem!important;line-height:1.7!important;max-width:45ch!important;
}
.ja-authority-story-foot{display:none!important}
/* Keep login form and photo card equal in width and height. */
.pv.is-auth:has(.ja-authority-frame) .pv-main{align-items:stretch!important;justify-content:center!important}
.ja-authority-frame{width:min(1280px,100%)!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
.ja-authority-story{min-height:570px!important}

/* Small-view transitions keep forms usable without force-fitted desktop widths. */
@media(max-width:849px){
 :root{--ja-page-gutter:16px}
 .content-in,.pub-main,.pv-main,.pub-header-in,.pv-top-in{padding-inline:16px!important}
 .content-in :is(.iw,.iw.ia,.ia,.rvw,.fiw){max-width:100%!important;min-width:0}
 .pub-main:is(.is-complaint,.is-feedback,.is-inspection,.is-track) > :is(.pub-intro,.form,.card,.notice,.ix-progress){width:100%!important;max-width:100%!important}
 .auth.auth-premium .auth-stage{width:100%!important;max-width:540px!important;height:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important}
 .auth.auth-premium .auth-card{padding:26px 22px!important}
 .auth.auth-premium .auth-story{min-height:220px!important}
 .auth.auth-premium .auth-story-copy{padding:14px 18px!important}
 .auth.auth-premium .auth-story-bottom{display:none!important}
 .ja-authority-frame{display:flex!important;flex-direction:column!important;max-width:560px!important}
 .ja-authority-story{min-height:250px!important;padding:22px!important;background-position:50% 65%!important}
 .ja-authority-story-copy{padding:16px 18px!important}
 .ja-authority-story-copy h2{font-size:1.65rem!important}
 .ja-authority-story-copy p{font-size:.85rem!important}
 .pub-main.is-feedback .rating-surface{padding:20px 12px!important}
 .pub-main.is-feedback .rating-surface .rating{gap:6px!important}
 .pub-main.is-feedback .rating-surface .rating label{width:48px!important;height:48px!important}
}
@media(max-width:380px){
 .pub-main.is-feedback .rating-surface .rating label{width:42px!important;height:46px!important}
 .ja-authority-story-copy h2{font-size:1.4rem!important}
}
@media(prefers-reduced-motion:reduce){.auth-story *, .ja-authority-story *{animation:none!important;transition:none!important}}
