/* ============================================================================
   aims-legacy-chrome.css — the POST-LOGIN legacy header/footer DOM contract
   ============================================================================

   COMPANION TO aims-legacy-auth.css. That file restored the legacy contract on the LOGIN
   pages (Authenticate.razor). This one does the same job for everything AFTER login: the
   shells in Shared/PSLayout.razor and Shared/ModuleLayout.razor.

   WHY. A customer brands AIMS by writing CSS against the ASPX markup. Their sheet is served
   on the post-login pages too (/branding/css/global + /branding/css/{module} are linked from
   both layouts), but the migrated layouts emitted an invented `.aims-header / .aims-logo /
   .aims-twisted-logo / .aims-signout-area / .aims-footer` vocabulary with zero overlap
   against the legacy names, so those rules bound to nothing. CVS's production sheet, for
   example, targets `.headerdiv.PS .navbar`, `.headerdiv .twistedLogo.PS`, `.logo.PS`,
   `.headerdiv .subHeader`, `.signOutArea`, `#pagefooter`, `div#content` and
   `span#PsHeader_lblLoggedIn` — every one of which repainted the login and nothing after it.

   THE TWO LEGACY FAMILIES. Legacy post-login chrome comes in two genuinely different shapes,
   and the layouts select between them off the product token they already compute:

     FAMILY A — "responsive new headers" (avatier_bootstrap.css:358-566)
       .headerdiv.container-fluid.<TOKEN> > .navbar.navbar-default.navbar-fixed-top
         > .twistedLogo.<TOKEN>
         > .signOutArea > .signOutImage + .signOutText
         > .navbar-header > a.brand > div.logo.<TOKEN>
                          > .versionNumber, .midHeader,
                          > .container-fluid.subHeader.<TOKEN>
                              > .LoggedInAs + .LastLogin + .ManagedUser
         > .homeButtonArea, .riskArea      (+ " HasRisk" appended to .headerdiv)
       Controls: ASCX/HeaderPS.ascx (PS), HeaderHelpDesk.ascx (HD), HeaderAT.ascx (AT),
       Approver/Default.aspx inline (Approver).

     FAMILY B — "NON-RESPONSIVE NEW HEADERS" (AIMSBase.css:3365+)
       div.top-header.<TOKEN>#header
         > .top-logo, .top-loggedIn, .top-lastlogin, .top-managing, .top-product,
           .top-version, .top-detail, .twisted-logo, .top-logout.hidden,
           .top-logout-area > .signOutImage + .signOutText
       Controls: HeaderGroupEnforcer/GroupRequester/StoreManager.ascx, CA/AuditHeader.aspx,
       IA/IAHeader.aspx, Client/Default.aspx.

   Both families close with the SAME grey `#pagefooter` bar from SelfService/Footer.htm.

   HOW THIS SHEET IS SCOPED — and why FAMILY A's THREE POSITIONED WRAPPERS ARE DIFFERENT.
   The general rule is still "ADD the legacy names to the elements that already carry the
   `.aims-*` product classes rather than swapping them out" (the same approach the login used
   for #page / #content / #CustomBanner), so aims-app.css keeps supplying the geometry and an
   unbranded install looks as it did before.

   THAT RULE HAS ONE DELIBERATE EXCEPTION, and it is the reason this file grew. The three
   ABSOLUTELY POSITIONED family-A wrappers — `.signOutArea`, `.subHeader` and `.twistedLogo`
   — cannot carry both vocabularies, because the two vocabularies place them with
   INCOMPATIBLE mechanisms:

       aims-app.css (modern)          legacy avatier_bootstrap.css (family A)
       ---------------------          ---------------------------------------
       .aims-signout-area             .signOutArea
         position: absolute             float: right           <- NORMAL FLOW
         right: 170px; top: 10px        margin-right: 15px/165px
       .aims-header-info              .subHeader
         position: absolute             position: absolute
         right: 250px                   right: 55px / 115px / 250px @>=1025px

   With BOTH class names present, a migrating customer's sheet was applied only HALF-way: the
   rules that happen to use the same mechanism landed, and the rest silently evaporated.
   Measured live against CVS Health's production Custom.css: their
   `.headerdiv .subHeader { right: 90px }` (0,2,0) DID beat `.aims-header .aims-header-info`
   (0,2,0) on source order and moved the sub-header, while their `.signOutArea
   { margin-right: 10px }` (0,1,0) was a NO-OP because the element was
   `position: absolute; right: 170px` and margins do not move an absolutely positioned box.
   The Sign Out icon ended up painted on top of the "Logged in as: … / Authenticated: …"
   text. Stock (unbranded) Classic did not overlap (250px vs 170px), so the defect only ever
   showed up for exactly the branded, migrating customer this whole feature exists to serve.

   So in CLASSIC family A the layouts emit the LEGACY names ONLY on those three wrappers
   (plus `.homeButtonArea` / `.riskArea`, which legacy places with the same float mechanism as
   `.signOutArea`), aims-app.css's modern geometry no longer matches them, and this sheet
   supplies the legacy geometry instead. MODERN mode is untouched — it still emits the `.aims-*`
   names exactly as before, and aims-app.css is not modified by any of this.

   Everything BELOW those wrappers keeps both names (`.signOutImage aims-signout-image`,
   `.signOutText aims-signout-text`, `.logo aims-logo`, …): those elements are sized/painted
   identically by the two vocabularies, so there is no mechanism mismatch, and this sheet is
   linked AFTER aims-app.css, which makes the ported legacy rule win every equal-specificity
   tie deterministically.

   This sheet's remaining jobs are unchanged:
     1. make the structural elements the contract needs and the flat layout did not have —
        `.navbar` / `.navbar-header` / `a.brand` — behave as legacy pass-throughs, so the
        header lays out the way legacy does while a customer's `.headerdiv.PS .navbar
        { background: … }` has a real, full-bleed element to paint;
     2. paint the family-A brand mark through `background-image` on `.logo.<TOKEN>` instead of
        the CSS mask aims-app.css uses, because a mask CLIPS whatever image a customer sets —
        `.logo.PS { background-image: url(...) !important }` would otherwise be silently
        cropped to the Avatier wordmark silhouette. Same treatment, same asset and same
        selector shape the login already uses (aims-legacy-auth.css contract A).

   CASCADE POSITION — identical requirement to aims-legacy-auth.css: this file's <link> MUST
   stay ABOVE /branding/css in App.razor and must never be loaded through <HeadContent> (that
   renders at the HeadOutlet, i.e. AFTER the customer sheets, inverting the cascade).

   SPECIFICITY — THE LOAD-BEARING CONSTRAINT. Every rule is prefixed with a `:where(…)` that
   adds ZERO specificity, so each rule keeps exactly the weight its legacy counterpart had and
   a customer's equal-specificity rule still wins on source order. Two prefix shapes are used:

     :where(.aims-legacy-chrome)              — for selectors that already name a family
                                                (`.headerdiv …`, `.top-header …`).
     :where(.aims-legacy-chrome .headerdiv)   — for legacy's BARE single-class selectors
                                                (`.signOutArea`, `.homeButtonArea`, `.riskArea`,
                                                `.hamburgerArea`, `.navbar`, `.navbar-header`).

   The second shape exists because legacy wrote those rules at (0,1,0) and they MUST stay at
   (0,1,0): CVS ship `.signOutArea { margin-right: 10px }`, and writing
   `… .headerdiv .signOutArea` (0,2,0) here would silently beat them — reintroducing the exact
   bug class this change removes, in a new place. Putting `.headerdiv` INSIDE the `:where()`
   keeps the weight at (0,1,0) while still confining the rule to family A (family B's
   `.top-header` also emits `.riskArea` / `.homeButtonArea`, which legacy never styled with the
   family-A float rules).

   The family-A logo rules deliberately reproduce legacy's own 4-class shape
   (`.navbar .navbar-header .brand .logo.PS`), because that is the weight the customer sheet
   was written against — which is why customer logo swaps in the wild carry !important.
   ========================================================================== */

/* ---------------------------------------------------------------
   FAMILY A — PRODUCT COMPENSATION on .headerdiv.

   NOT part of the legacy contract: these three declarations exist only to undo aims-app.css
   inventions that legacy's `.headerdiv` never had, so that the ported legacy rules below can
   take effect at their legacy weight.

     display     — aims-app.css makes `.aims-header` `display: flex` (and `display: grid`
                   at <=720px). Legacy `.headerdiv.container-fluid` is a plain block whose
                   children lay out with floats; a flex/grid container silently DISCARDS
                   `float`, which is the mechanism legacy uses to place .signOutArea /
                   .homeButtonArea / .riskArea.
     padding     — aims-app.css adds 12px at <=720px; legacy has none (the ported <=767px
                   rules place the phone header themselves).
     min/max-height — aims-app.css pins `.aims-header` to var(--aims-header-height) with BOTH,
                   which would override legacy's `height: 50px/60px/90px` breakpoints no matter
                   what `height` resolves to.

   `height` itself is deliberately NOT declared here: legacy owns it at (0,1,0) below, so a
   customer's `.headerdiv { height: … }` still ties and wins on source order.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .headerdiv.container-fluid {
    display: block;
    padding: 0;
    min-height: 0;
    max-height: none;
}

/* ---------------------------------------------------------------
   FAMILY A — .navbar / .navbar-header / .brand pass-through.

   These three wrappers exist in legacy between .headerdiv and its contents; the migrated
   header was flat.

   `.navbar` IS A BLOCK, exactly as in legacy (bootstrap-ms.css:3582 `.navbar { position:
   relative }` + avatier_bootstrap.css:505 `.navbar { margin-bottom: 0; overflow: hidden }`).
   It used to be a flex box here; it cannot be one any more, because `.signOutArea` /
   `.homeButtonArea` / `.riskArea` are placed by `float: right` and floats do not apply to
   flex items. `position: relative` also restores the legacy containing block for the
   absolutely positioned `.subHeader` / `.twistedLogo` (legacy's was the position:fixed
   `.navbar.navbar-fixed-top`); it spans the full .headerdiv box either way, so every legacy
   `right:` offset resolves to the same pixel.

   NOT reproduced: `position: fixed` from `.navbar-fixed-top`. The Blazor shell scrolls its own
   .ps-content-area rather than the document, so a fixed header would detach from the layout
   and legacy's matching `#content { margin-top: <header height> }` offset does not exist here.

   `background: transparent` is the DEFAULT only — a customer's `.headerdiv.PS .navbar`
   (0,3,0, later source order) paints straight over it, which is the whole point. The whole
   rule is kept at (0,1,0), legacy's own weight for `.navbar`, by putting the `.headerdiv`
   confinement inside the `:where()`; a bare `.navbar { background: … }` from a customer sheet
   therefore ties and wins on source order too.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome .headerdiv) > .navbar {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    min-height: 0;
}

/* HeaderPS.ascx:30 ships `style="display: flex"` on this wrapper; HeaderAT.ascx:7 and
   HeaderHelpDesk.ascx:6 ship none. It is declared here rather than inline so the responsive
   blocks below — and a customer sheet — can reach it. NO `align-items`: legacy has none
   either, and centring the items would fight the logo's own legacy `margin-top` (10px/15px),
   pushing the brand mark below the middle of the bar. */
:where(.aims-legacy-chrome) .headerdiv .navbar-header {
    display: flex;
    margin: 0;
}

/* bootstrap-ms.css:3601-3603 — `.navbar-header { float: left }` from 768px up ONLY, which is
   what puts the brand on the left of the floated .signOutArea. Below 768px legacy leaves it
   in normal flow and places the buttons absolutely instead. (0,1,0), legacy's own weight. */
@media (min-width: 768px) {
    :where(.aims-legacy-chrome .headerdiv) .navbar-header {
        float: left;
    }
}

:where(.aims-legacy-chrome) .headerdiv .navbar-header .brand {
    display: block;
    text-decoration: none;
}

/* ---------------------------------------------------------------
   FAMILY A — the brand mark.

   Painted with background-image, never an <img> and never a mask, precisely so a customer's
   `.logo.PS { background-image: … }` can reskin it. Geometry ported from
   avatier_bootstrap.css:358-386/422-426 (and mirrored in aims-legacy-auth.css for the login).
   The per-token artwork keeps whatever each module ships today, so this is a branding fix, not
   a re-skin — the one deliberate change is PS/HD, which moves off the masked SVG wordmark onto
   the same header-PM.png the login already renders.

   NO `background-position`: legacy declares none, so the initial `0% 0%` (left top) applies,
   which is what the `background-size: 50%/66.66%` phone and tablet rules below scale against.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo {
    display: block;
    float: left;
    height: 60px;
    margin-left: 14px;
    background-repeat: no-repeat;
    /* Cancels the CSS-mask treatment aims-app.css applies to the masked module wordmarks
       (.aims-header.module-ps/.module-ca/.module-ie/.module-gr/.module-sso .aims-logo).
       A mask cannot be repainted by a customer: it clips whatever background-image they set
       to the Avatier silhouette, so `.logo.PS { background-image: … !important }` — the exact
       rule a rebranded install ships — would appear to do nothing. Reproducing legacy's plain
       background-image is what makes the swap work. */
    -webkit-mask: none;
    mask: none;
    background-color: transparent;
}

:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo.PS,
:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo.HD {
    width: 336px;
    background-image: url('../img/header-PM.png');
}

:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo.AT {
    width: 360px;
    background-image: url('../img/Header-AT.png');
}

:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo.Approver {
    width: 340px;
    background-image: url('../img/workflow-approver-60x.png');
}

/* The Workflow Admin surface shares the Approver token (legacy has no separate one) but
   ships its own wordmark; keyed off the product class the layout already emits. */
:where(.aims-legacy-chrome) .module-wfadmin .navbar .navbar-header .brand .logo.Approver {
    background-image: url('../img/header-workflow-admin.png');
}

/* The AIMS token — the blue fallback pair every module without its own legacy header control
   falls back to (avatier_bootstrap.css; mirrored from aims-legacy-auth.css:809-818, which
   already ports it for the sign-in shell). Reached by the per-module route twins of the
   chromeless-four pages: /config/security-question, /client/auth-selection, /gr/…, /ia/…,
   /sso/…, /reports/…, /store-manager/…. Without it those routes rendered an empty brand box in
   Classic. Dimensions are legacy's own for this artwork (237x60, not the 336px PM wordmark). */
:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo.AIMS {
    width: 237px;
    background-image: url('../img/header-avatier.png');
}

:where(.aims-legacy-chrome) .headerdiv.AIMS .navbar {
    background-color: #0082C8;
}

/* ---------------------------------------------------------------
   D-5 — the administrator's UniversalBranding LOGGED_LOGO in CLASSIC.

   PSLayout paints the uploaded image as this element's `background-image`, INLINE, because that
   is the only weight that reliably beats the (0,4,0) per-token rules above from a stylesheet
   the customer's sheet is loaded after (and it still loses to the `!important` a rebranded
   install writes its own logo swap with — CVS ship exactly that).

   What the inline style CANNOT carry is the fitting, because the responsive blocks further down
   set `background-size: 50%/66.66%/100%` against the token's fixed box and would crop or stretch
   an arbitrary upload. `contain` at (0,5,0) wins over every one of those without needing
   `!important`, and the box keeps its token width so the header geometry is unchanged.
   Nothing here applies unless a LOGGED_LOGO row is enabled and has an image, so an install
   without a customer logo renders exactly as before.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo.aims-logo-custom {
    background-size: contain;
    background-position: left center;
}

/* ---------------------------------------------------------------
   FAMILY A — the sub-header block (avatier_bootstrap.css:537-583).

   This is the geometry `.aims-header-info` used to supply. It is NOT a like-for-like swap:
   legacy's resting offset is `right: 55px` (widened to 250px only from 1025px up, and to
   115px/165px/320px/370px for the HD and AT tokens), and it has no `top` at all — the block
   sits at its static position inside .navbar-header plus `margin-top: 5px`.

   Weights are legacy's, exactly: `.headerdiv .subHeader` is (0,2,0), the token variants are
   (0,3,0) and the HasRisk/WELCOME variants (0,4,0). CVS's `.headerdiv .subHeader
   { right: 90px }` therefore still ties the base rule and still wins on source order.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .headerdiv .subHeader {
    display: inline-block;
    text-align: right;
    margin-top: 5px;
    padding: 0;
    position: absolute;
}

:where(.aims-legacy-chrome) .headerdiv .subHeader {
    right: 55px;
}

:where(.aims-legacy-chrome) .headerdiv.HD .subHeader,
:where(.aims-legacy-chrome) .headerdiv.AT .subHeader {
    right: 115px;
}

:where(.aims-legacy-chrome) .headerdiv.HD.WELCOME .subHeader,
:where(.aims-legacy-chrome) .headerdiv.AT.WELCOME .subHeader {
    right: 65px;
}

/* HeaderAT.ascx.cs:123 appends " HasRisk" to .headerdiv when the risk button shows. */
:where(.aims-legacy-chrome) .headerdiv.HD.HasRisk .subHeader,
:where(.aims-legacy-chrome) .headerdiv.AT.HasRisk .subHeader {
    right: 165px;
}

/* avatier_bootstrap.css:566. Inert against the shipped markup — HeaderAT.ascx:10 gives the AT
   sub-header the HD token, which the layouts reproduce — but it is part of the contract a
   customer may have copied, so it is transcribed rather than silently dropped. */
:where(.aims-legacy-chrome) .headerdiv .subHeader.AT {
    display: none;
}

:where(.aims-legacy-chrome) .headerdiv .subHeader span {
    background-color: transparent;
}

/* avatier_bootstrap.css:580 — the four white-on-product-colour header regions. */
:where(.aims-legacy-chrome) .headerdiv .subHeader,
:where(.aims-legacy-chrome) .headerdiv .signOutArea,
:where(.aims-legacy-chrome) .headerdiv .homeButtonArea,
:where(.aims-legacy-chrome) .headerdiv .riskArea {
    color: White;
}

/* avatier_bootstrap.css:574 — the per-label defaults. These used to come from
   `.aims-header .aims-header-info span`; legacy states them on the label classes themselves,
   at (0,1,0), so a customer's `.LoggedInAs { … }` ties and wins on source order. */
:where(.aims-legacy-chrome .headerdiv) .PSAuthSuccess,
:where(.aims-legacy-chrome .headerdiv) .PSAuthFail,
:where(.aims-legacy-chrome .headerdiv) .LoggedInAs,
:where(.aims-legacy-chrome .headerdiv) .LastLogin,
:where(.aims-legacy-chrome .headerdiv) .ManagedUser {
    line-height: 25px;
    display: block;
    font-size: 16px;
}

/* ---------------------------------------------------------------
   FAMILY A — .signOutArea / .homeButtonArea / .riskArea / .hamburgerArea
   (avatier_bootstrap.css:432-484).

   THE WHOLE POINT OF THIS BLOCK IS ITS WEIGHT. Legacy places these buttons in NORMAL FLOW
   with `float: right` + margins, at (0,1,0) on a bare class selector. Reproducing it at
   (0,2,0) (`… .headerdiv .signOutArea`) would beat a customer's `.signOutArea
   { margin-right: 10px }` and put us straight back where we started, so the `.headerdiv`
   confinement lives inside the zero-specificity `:where()` instead.

   `.hamburgerArea` and `.riskButtonArea` are not emitted by any Blazor layout; they are
   transcribed because they share legacy's rules and a customer sheet may key off them.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome .headerdiv) .signOutArea,
:where(.aims-legacy-chrome .headerdiv) .homeButtonArea,
:where(.aims-legacy-chrome .headerdiv) .riskArea,
:where(.aims-legacy-chrome .headerdiv) .hamburgerArea {
    float: right;
    margin-top: 16px;
    text-align: center;
}

:where(.aims-legacy-chrome .headerdiv) .signOutArea {
    margin-right: 15px;
}

/* avatier_bootstrap.css:442 — legacy pairs this with `#pnlRiskButton` (1,0,0), an ASP.NET
   panel id no Blazor layout emits; only the (0,1,0) half is transcribed. `.riskArea` is
   commented out in legacy's own rule and is left out here for the same reason. */
:where(.aims-legacy-chrome .headerdiv) .homeButtonArea {
    margin-right: 10px;
}

:where(.aims-legacy-chrome .headerdiv) .signOutArea:hover,
:where(.aims-legacy-chrome .headerdiv) .homeButtonArea:hover,
:where(.aims-legacy-chrome .headerdiv) .riskArea:hover {
    opacity: .75;
    text-decoration: none;
    cursor: pointer;
}

:where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutText,
:where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeText,
:where(.aims-legacy-chrome .headerdiv) .riskArea .riskText {
    line-height: 16px;
    font-size: 14px;
    margin-top: 4px;
}

/* The two-declaration background-image is legacy's SVG-with-PNG-fallback idiom, kept verbatim:
   a browser that cannot parse the second declaration keeps the PNG. */
:where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutImage,
:where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeImage,
:where(.aims-legacy-chrome .headerdiv) .riskButtonArea .riskImage,
:where(.aims-legacy-chrome .headerdiv) .riskArea .riskImage {
    height: 40px;
    width: 41px;
    background-image: url(../img/sprite.desktop.png);
    background-image: url(../img/sprite.desktop.svg), none;
    display: inline-block;
    margin-left: 29px;
    margin-right: 30px;
}

:where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeImage,
:where(.aims-legacy-chrome .headerdiv) .riskButtonArea .riskImage,
:where(.aims-legacy-chrome .headerdiv) .riskArea .riskImage {
    margin-left: 0;
    margin-right: 0;
}

:where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutImage {
    background-position: -4px -270px;
}

:where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeImage {
    background-position: -105px -270px;
}

/* avatier_bootstrap.css:482 pairs this with `#riskButtonArea` (1,0,0); only the class half
   is transcribed. */
:where(.aims-legacy-chrome .headerdiv) .riskArea .riskImage {
    background-position: -155px -270px;
}

/* ---------------------------------------------------------------
   FAMILY A — the twisted logo (avatier_bootstrap.css:488, 860-901).

   Legacy HIDES it below 1025px and only paints it on the desktop tier, per module token.
   aims-app.css instead showed it from 721px up and keyed the artwork off `.module-*`. The
   `aims-twisted-logo` token is therefore dropped from the classic family-A element and the
   legacy rules take over — nothing is lost, because every family-A token (PS, HD, AT,
   Approver) has legacy artwork, and the mapping resolves to the same files aims-app.css was
   using.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .headerdiv .twistedLogo {
    display: none;
}

/* ---------------------------------------------------------------
   The bootstrap-ms.css responsive utility classes the legacy sub-header rows carry.
   They are part of the DOM contract (a customer sheet targets `.hidden-xs`/`.hidden-ms`
   directly) and they replace the `.MainDesc { display: none !important }`-style substitutes
   the port had reached for. `ms` is an Avatier-only tier: 640-767px.
   --------------------------------------------------------------- */
@media (max-width: 767px) {
    :where(.aims-legacy-chrome) .hidden-xs {
        display: none;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    :where(.aims-legacy-chrome) .hidden-ms {
        display: none;
    }
}

/* ---------------------------------------------------------------
   `.hidden` — stylesheets/bootstrap-ms.css:5455-5456, VERBATIM, `!important` and all.

   A MISSING HOOK, not a deviation. Legacy links bootstrap-ms.css on every PS page, so `.hidden` is
   the mechanism legacy uses to hide markup: ConfigurePhone.aspx:166 ships
   `<div id="DivChangePIN" class="hidden">` and ConfigurePhone.aspx.cs:261 re-asserts
   `class = "hidden"` on the fresh-enrolment path, while the SHOWN path (…cs:253-254) swaps the class
   AND writes an inline `display:inline`. Nothing else hides it — no server-side Visible=false, no
   second id, no inline `display:none`.

   The port previously carried no `.hidden` at all, so the panel had to be pinned shut by a bespoke
   `#DivChangePIN.hidden { display:none }` at (1,1,0) in aims-app.css — a rule of OURS outranking
   CVS's `#DivChangePIN { display: table }` at (1,0,0), which is exactly the shape this layer is not
   allowed to have. Restoring the hook removes the need for it: the customer's `display:table` is now
   beaten by the SAME declaration that beats it on legacy, at the same weight, from the same source.

   The `!important` is legacy's own byte, not a new one — and it is load-bearing here precisely
   BECAUSE CVS names `#DivChangePIN` at (1,0,0), which no non-!important class selector could reach.
   That is why legacy hides reliably and the port did not.

   Scoped to `.aims-legacy-chrome`, so MODERN never sees it. The only elements in the Blazor tree
   carrying a bare `hidden` class are #DivSetPIN / #DivChangePIN / #btnCancelPIN on
   Pages/PasswordStation/PsConfigureQuestions.razor — the same three legacy toggles it on.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .hidden {
    display: none !important;
}

/* ---------------------------------------------------------------
   FAMILY A — PHONE (avatier_bootstrap.css:590-657, `@media screen and (max-width: 767px)`).

   Legacy's own phone header, transcribed at legacy weights. Note what it does NOT do: the
   sub-header content is inside `.hidden-xs.hidden-ms`, so it is hidden outright below 768px
   and there is nothing left for the sign-out button to collide with — which is why legacy can
   pin the button absolutely at `right: 5px` and drop its caption.

   This REPLACES the product's former `@media (max-width: 720px)` grid compensation in this
   file. That block re-homed aims-app.css's `grid-area: info / signout` declarations onto the
   new .navbar wrappers; with `.aims-header-info` and `.aims-signout-area` no longer emitted
   in classic there are no grid items left to place, and running a product grid here would put
   a customer's phone rules right back in the "half of them apply" state on phones.
   --------------------------------------------------------------- */
@media screen and (max-width: 767px) {
    :where(.aims-legacy-chrome) .headerdiv,
    :where(.aims-legacy-chrome .headerdiv) .navbar,
    :where(.aims-legacy-chrome .headerdiv) .navbar-header {
        height: 50px;
    }

    :where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo {
        background-size: 50% 50%;
        margin-top: 10px;
        margin-left: 9px;
        /* Not legacy's — legacy declares no background-position, so it inherits the initial
           `0% 0%`. aims-app.css:554 sets `left center` on `.aims-logo` (0,2,0) below 720px,
           which would drop the 50%-scaled mark 15px and clip it against the 50px bar. Stated
           at the same (0,4,0) weight as the `background-size` it accompanies. */
        background-position: 0 0;
    }

    :where(.aims-legacy-chrome) .headerdiv .versionNumber {
        display: none;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea,
    :where(.aims-legacy-chrome .headerdiv) .riskArea,
    :where(.aims-legacy-chrome .headerdiv) .hamburgerArea {
        width: 30px;
        height: 31px;
        float: none;
        position: absolute;
        top: -12px;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea {
        right: 5px;
    }

    :where(.aims-legacy-chrome .headerdiv) .hamburgerArea {
        right: 10px;
        top: -10px;
    }

    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea {
        right: 58px;
    }

    :where(.aims-legacy-chrome) .headerdiv.HasRisk .riskArea {
        right: 118px;
    }

    /* `.homeArea` is legacy's own typo (avatier_bootstrap.css:647) and matches nothing; kept
       so a customer sheet copied from it behaves identically. */
    :where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutText,
    :where(.aims-legacy-chrome .headerdiv) .homeArea .homeText {
        display: none;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutImage,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeImage,
    :where(.aims-legacy-chrome .headerdiv) .riskButtonArea .riskImage,
    :where(.aims-legacy-chrome .headerdiv) .riskArea .riskImage {
        margin-left: 0;
    }

    :where(.aims-legacy-chrome .headerdiv) .riskArea {
        display: none;
    }
}

/* ---------------------------------------------------------------
   FAMILY A — TABLET (avatier_bootstrap.css:684-742).
   --------------------------------------------------------------- */
@media screen and (max-width: 1024px) and (min-width: 768px) {
    :where(.aims-legacy-chrome) .headerdiv {
        height: 60px;
    }

    :where(.aims-legacy-chrome .headerdiv) .navbar,
    :where(.aims-legacy-chrome .headerdiv) .navbar-header {
        height: 60px;
    }

    /* margin-right is negative in legacy on purpose: the logo div keeps its full 336/360px
       width so background-size can scale against it, and the negative margin pulls the
       sub-header back towards the mark. */
    :where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo {
        background-size: 66.66666% 66.66666%;
        margin-top: 10px;
        margin-left: 9px;
        margin-right: -75px;
    }

    :where(.aims-legacy-chrome) .headerdiv .versionNumber {
        display: none;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea,
    :where(.aims-legacy-chrome .headerdiv) .riskArea,
    :where(.aims-legacy-chrome .headerdiv) .hamburgerArea {
        width: 40px;
        height: 41px;
        margin-right: 15px;
        margin-top: 10px;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutText,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeText,
    :where(.aims-legacy-chrome .headerdiv) .riskArea .riskText {
        display: none;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutImage,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeImage,
    :where(.aims-legacy-chrome .headerdiv) .riskButtonArea .riskImage,
    :where(.aims-legacy-chrome .headerdiv) .riskArea .riskImage {
        margin-left: 0;
    }

    :where(.aims-legacy-chrome .headerdiv) .PSAuthFail {
        display: none;
    }
}

/* ---------------------------------------------------------------
   FAMILY A — DESKTOP (avatier_bootstrap.css:745-901).

   `.signOutArea { margin-right: 165px }` is the rule that makes the whole header hang
   together: it parks the button immediately to the LEFT of the 159px twisted logo, and the
   sub-header's `right: 250px` then clears the button's own 100px box with 15px to spare. It
   is also the exact declaration a migrating customer overrides (CVS: `margin-right: 10px`) —
   which now works, because the button is back in normal flow.
   --------------------------------------------------------------- */
@media screen and (min-width: 1025px) {
    :where(.aims-legacy-chrome) .headerdiv {
        height: 90px;
    }

    :where(.aims-legacy-chrome .headerdiv) .navbar,
    :where(.aims-legacy-chrome .headerdiv) .navbar-header {
        height: 90px;
    }

    :where(.aims-legacy-chrome) .navbar .navbar-header .brand .logo {
        height: 60px;
        background-size: 100% 100%;
        margin-top: 15px;
        margin-left: 14px;
    }

    :where(.aims-legacy-chrome) .headerdiv .subHeader {
        position: absolute;
        right: 250px;
    }

    :where(.aims-legacy-chrome) .headerdiv.Approver .subHeader {
        position: absolute;
        right: 48px;
    }

    :where(.aims-legacy-chrome) .headerdiv.HD .subHeader,
    :where(.aims-legacy-chrome) .headerdiv.AT .subHeader {
        position: absolute;
        right: 320px;
    }

    :where(.aims-legacy-chrome) .headerdiv.HD.HasRisk .subHeader,
    :where(.aims-legacy-chrome) .headerdiv.AT.HasRisk .subHeader {
        position: absolute;
        right: 370px;
    }

    :where(.aims-legacy-chrome) .headerdiv.HD.WELCOME .subHeader,
    :where(.aims-legacy-chrome) .headerdiv.AT.WELCOME .subHeader {
        position: absolute;
        right: 250px;
    }

    :where(.aims-legacy-chrome) .headerdiv .subHeader.AT.welcome {
        position: absolute;
        right: 222px;
    }

    :where(.aims-legacy-chrome) .headerdiv .versionNumber {
        display: none;
    }

    :where(.aims-legacy-chrome) .headerdiv .subHeader.PS.welcome .versionNumber,
    :where(.aims-legacy-chrome) .headerdiv .subHeader.HD.welcome .versionNumber,
    :where(.aims-legacy-chrome) .headerdiv .subHeader.AT.welcome .versionNumber {
        display: inline-block;
    }

    :where(.aims-legacy-chrome) .headerdiv .subHeader.PS.welcome .versionNumber {
        display: inline-block;
        position: absolute;
        top: 55px;
        right: -64px;
        white-space: nowrap;
    }

    /* This is what re-shows the HelpDesk / AT / Approver "Version x.y" line the blanket
       `.headerdiv .versionNumber { display: none }` above hides. */
    :where(.aims-legacy-chrome) .headerdiv .subHeader.HD .versionNumber,
    :where(.aims-legacy-chrome) .headerdiv .subHeader.AT .versionNumber {
        display: inline-block;
    }

    :where(.aims-legacy-chrome) .headerdiv .subHeader.Approver .versionNumber {
        display: block;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea,
    :where(.aims-legacy-chrome .headerdiv) .riskArea,
    :where(.aims-legacy-chrome .headerdiv) .hamburgerArea {
        width: 100px;
        height: 61px;
        margin-top: 8px;
    }

    :where(.aims-legacy-chrome .headerdiv) .hamburgerArea {
        width: 60px;
        height: 61px;
        margin-top: 25px;
    }

    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea,
    :where(.aims-legacy-chrome .headerdiv) .riskArea {
        width: 60px;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea {
        margin-right: 165px;
    }

    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea {
        margin-right: 0;
    }

    :where(.aims-legacy-chrome .headerdiv) .signOutArea .signOutText,
    :where(.aims-legacy-chrome .headerdiv) .homeButtonArea .homeText,
    :where(.aims-legacy-chrome .headerdiv) .riskArea .riskText {
        display: inline-block;
        font-weight: bold;
    }

    :where(.aims-legacy-chrome) .headerdiv .twistedLogo {
        position: absolute;
        top: 0;
        right: 0;
        background-repeat: no-repeat;
        display: block;
        z-index: -999999999;
    }

    :where(.aims-legacy-chrome) .headerdiv .twistedLogo.PS,
    :where(.aims-legacy-chrome) .headerdiv .twistedLogo.HD {
        background-image: url('../img/Twisted-PS.png');
        width: 159px;
        height: 90px;
    }

    :where(.aims-legacy-chrome) .headerdiv .twistedLogo.AT {
        background-image: url('../img/twisted-AT.png');
        width: 159px;
        height: 90px;
    }

    :where(.aims-legacy-chrome) .headerdiv .twistedLogo.SSO {
        background-image: url('../img/Twisted-SSO.png');
        width: 159px;
        height: 90px;
    }

    :where(.aims-legacy-chrome) .headerdiv.AIMS .twistedLogo {
        background-image: url('../img/twisted-avatier.png');
        width: 159px;
        height: 90px;
    }

    :where(.aims-legacy-chrome) .headerdiv .twistedLogo.Approver {
        background-image: url('../img/Twisted-IE.png');
        width: 159px;
        height: 90px;
    }
}

/* ---------------------------------------------------------------
   FAMILY B — the .top-header sign-out block (AIMSBase.css:3468-3506).

   Family B does NOT have family A's mechanism mismatch: legacy and aims-app.css both place
   `.top-logout-area` absolutely, at the same (0,2,0), so a customer's
   `.top-header .top-logout-area { right: … }` already tied and already won on source order.
   What DID differ were the resting offsets (legacy 175px/top 16px/60px wide vs the product's
   170px/top 10px/70px wide), so the classic markup drops `aims-signout-area` here too and the
   legacy numbers become the default a customer's sheet was tuned against.

   `.twisted-logo` KEEPS its `aims-twisted-logo` token on purpose. Legacy's
   `.top-header .twisted-logo` is `position: absolute; top: 0; right: 0` — identical to
   aims-app.css's rule at identical weight, so there is nothing to fix; and legacy's per-token
   artwork map would revert /ca to the retired "Avatier Audit Log" mark (`.top-header.AL
   .twisted-logo`), undoing a deliberate product rebrand. A customer's
   `.top-header.GE .twisted-logo { background-image: … }` (0,3,0) already ties
   `.aims-header.module-ge .aims-twisted-logo` (0,3,0) and wins on source order.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .top-header .top-logout-area {
    height: 61px;
    width: 60px;
    position: absolute;
    margin: auto;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    line-height: 17px;
    top: 16px;
}

:where(.aims-legacy-chrome) .top-header .top-logout-area {
    right: 175px;
}

:where(.aims-legacy-chrome) .top-header .top-logout-area:hover {
    opacity: .75;
    cursor: pointer;
}

:where(.aims-legacy-chrome) .top-header .top-logout-area .signOutImage {
    height: 40px;
    width: 41px;
    background-image: url(../img/sprite.desktop.png);
    background-image: url(../img/sprite.desktop.svg), none;
    background-position: -4px -270px;
    display: inline-block;
}

/* ---------------------------------------------------------------
   FOOTER — AIMSBase.css:3341-3358. #pagefooter is the id every legacy page's Footer.htm
   emits, and it is what a customer targets to restyle or (CVS: `#pagefooter { display: none }`)
   suppress the Avatier bar. The three-column content itself keeps the product classes, so
   aims-app.css continues to lay it out; only the legacy id and its own paint defaults are
   added here.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) #pagefooter img {
    margin-left: 4px;
    margin-bottom: 2px;
}

/* ==============================================================================================
   LEGACY CONTENT CONTRACT — the baseline the restored page-body classes need.

   WHY THIS BLOCK EXISTS. Everything above this line is CHROME (header, sign-out, sub-header,
   footer). The restoration of the page CONTENT contract — table.LayoutTable,
   table.BareTable.PageTitleImage, div.sectionHeader9, hr.horizline, .button-split-N,
   .form-control, the .row-fluid > .col-* column, .hiddenbutton — emits class names that, before
   this block, had NO rule anywhere in wwwroot/css. Legacy got them from AIMSBase.css,
   Styles/avatier_bootstrap.css, Styles/bootstrap.min.css and PasswordStation.css, none of which
   the Blazor host serves. Emitting the class names without the baseline gives a customer their
   hook and an unstyled table.

   EVERY RULE IS :where(.aims-legacy-chrome)-SCOPED, so the whole block is inert in MODERN —
   architectural rule A. And every rule is stated at legacy's OWN specificity (the :where()
   contributes nothing), so a customer sheet loaded after this one ties and wins on source order,
   which is exactly the relationship their stylesheet was authored against.

   Provenance is quoted per rule. Values are copied, never invented; where legacy has no rule at
   all (.top-buffer, .hide-cox, .show-cox, .page-lead, and .LayoutTable/.BareTable as *paint*),
   none is added here either — those are pure customer hooks, and inventing product geometry for
   them would change the page for installs that never styled them.
   ============================================================================================== */

/* ---------------------------------------------------------------
   GRID — the subset the four legacy column includes actually use:
     Styles/psStandardLayout.html  col-xs-12 col-xs-offset-0 col-sm-12 col-sm-offset-0
                                   col-md-10 col-md-offset-1 col-lg-8  col-lg-offset-2
     Styles/psWideLayout.html      … col-lg-10 col-lg-offset-1
     Styles/hdStandardLayout.html  same tokens as psStandardLayout
     PS/LanguageSelect.aspx        col-xs-12 col-xs-offset-0 col-sm-10 col-sm-offset-1
                                   col-md-8  col-md-offset-2
   Breakpoints are bootstrap-ms's: xs <640, ms >=640, sm >=768, md >=992, lg >=1200. Ported the
   same way aims-legacy-auth.css:128-215 ports the login shell's subset — hand-ported rather than
   vendored, because the `ms` tier is an Avatier-only extra tier a stock Bootstrap 3 build does
   not have.

   .container-fluid IS DELIBERATELY NOT REDEFINED. It is already on #content, on .headerdiv and
   on .subHeader in the chrome above, all of which lay out correctly today; adding Bootstrap's
   auto margins and gutters to that set would be a chrome change smuggled in under a content fix.
   --------------------------------------------------------------- */

/* .row-fluid is a Bootstrap 2 name and is defined in NO legacy stylesheet (0 hits in
   bootstrap.min.css, avatier_bootstrap.css, AIMSBase.css, PasswordStation.css) — it is a bare
   block div there and stays one here. Only the clearfix is added, without which the floated
   column escapes its row and #pagefooter rides up over the page content. */
:where(.aims-legacy-chrome) .row-fluid:before,
:where(.aims-legacy-chrome) .row-fluid:after,
:where(.aims-legacy-chrome) .form-horizontal .form-group:before,
:where(.aims-legacy-chrome) .form-horizontal .form-group:after {
    content: " ";
    display: table;
}

:where(.aims-legacy-chrome) .row-fluid:after,
:where(.aims-legacy-chrome) .form-horizontal .form-group:after {
    clear: both;
}

:where(.aims-legacy-chrome) .col-xs-12,
:where(.aims-legacy-chrome) .col-sm-10,
:where(.aims-legacy-chrome) .col-sm-12,
:where(.aims-legacy-chrome) .col-md-8,
:where(.aims-legacy-chrome) .col-md-10,
:where(.aims-legacy-chrome) .col-lg-8,
:where(.aims-legacy-chrome) .col-lg-10,
:where(.aims-legacy-chrome) .col-lg-12 {
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}

:where(.aims-legacy-chrome) .col-xs-12 {
    float: left;
    width: 100%;
}

:where(.aims-legacy-chrome) .col-xs-offset-0 {
    margin-left: 0;
}

/* avatier_bootstrap.css:295-310 narrows the phone gutters and gives .xs-margin its margins. */
@media (max-width: 639px) {
    :where(.aims-legacy-chrome) .col-xs-12 {
        padding-left: 0;
        padding-right: 0;
    }

    :where(.aims-legacy-chrome) .xs-margin {
        margin-left: 8px;
        margin-right: 8px;
    }
}

@media (min-width: 768px) {
    :where(.aims-legacy-chrome) .col-sm-10,
    :where(.aims-legacy-chrome) .col-sm-12 {
        float: left;
    }

    :where(.aims-legacy-chrome) .col-sm-10 {
        width: 83.33333333%;
    }

    :where(.aims-legacy-chrome) .col-sm-12 {
        width: 100%;
    }

    :where(.aims-legacy-chrome) .col-sm-offset-0 {
        margin-left: 0;
    }

    :where(.aims-legacy-chrome) .col-sm-offset-1 {
        margin-left: 8.33333333%;
    }
}

@media (min-width: 992px) {
    :where(.aims-legacy-chrome) .col-md-8,
    :where(.aims-legacy-chrome) .col-md-10 {
        float: left;
    }

    :where(.aims-legacy-chrome) .col-md-8 {
        width: 66.66666667%;
    }

    :where(.aims-legacy-chrome) .col-md-10 {
        width: 83.33333333%;
    }

    :where(.aims-legacy-chrome) .col-md-offset-1 {
        margin-left: 8.33333333%;
    }

    :where(.aims-legacy-chrome) .col-md-offset-2 {
        margin-left: 16.66666667%;
    }
}

@media (min-width: 1200px) {
    :where(.aims-legacy-chrome) .col-lg-8,
    :where(.aims-legacy-chrome) .col-lg-10,
    :where(.aims-legacy-chrome) .col-lg-12 {
        float: left;
    }

    :where(.aims-legacy-chrome) .col-lg-8 {
        width: 66.66666667%;
    }

    :where(.aims-legacy-chrome) .col-lg-10 {
        width: 83.33333333%;
    }

    :where(.aims-legacy-chrome) .col-lg-12 {
        width: 100%;
    }

    :where(.aims-legacy-chrome) .col-lg-offset-1 {
        margin-left: 8.33333333%;
    }

    :where(.aims-legacy-chrome) .col-lg-offset-2 {
        margin-left: 16.66666667%;
    }
}

/* ---------------------------------------------------------------
   THE LAYOUT TABLES — AIMSBase.css:80-108.

   table.LayoutTable's 4px border-spacing + 4px cell padding IS the vertical rhythm of every
   inner PS page, and it is why legacy's empty spacer rows are real content rather than noise.
   table.BareTable is its zero-padding counterpart, used for the title strip and for the field
   tables nested inside a LayoutTable cell.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) table.LayoutTable {
    border-spacing: 4px;
    border-collapse: separate;
}

:where(.aims-legacy-chrome) table.LayoutTable td {
    padding: 4px;
}

:where(.aims-legacy-chrome) table.LayoutTable8 {
    border-spacing: 8px;
    border-collapse: separate;
}

:where(.aims-legacy-chrome) table.LayoutTable8 td {
    padding: 8px;
}

:where(.aims-legacy-chrome) table.BareTable {
    padding: 0;
    border-spacing: 0;
    border-collapse: collapse;
}

:where(.aims-legacy-chrome) table.BareTable td {
    padding: 0;
}

/* The rule a migrating customer overrides with .PageTitleImage img { width: 60px !important }.
   Reproducing it is what gives their override something to sit on. */
:where(.aims-legacy-chrome) table.PageTitleImage img {
    padding-right: 4px;
}

/* ---------------------------------------------------------------
   PAGE TITLE + RULES — AIMSBase.css:1235-1249, avatier_bootstrap.css:328.
   .sectionHeader9 span is the selector CVS extends into
   .sectionHeader9.hide-cox span { font-size: 25px !important }; without the 20px baseline an
   un-branded install renders the title at the inherited size.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .sectionHeader9 {
    font-size: 20px;
    color: #333;
    padding: 2px 0 6px 0;
}

:where(.aims-legacy-chrome) .sectionHeader9 span {
    font-size: 20px;
}

:where(.aims-legacy-chrome) .horizline {
    margin: 0;
    height: 1px;
    background: #CCCCCC;
    border: 0;
}

/* AIMSBase.css:330-338. WITHOUT THIS THE HIDDEN POSTBACK SHIMS ARE VISIBLE BUTTONS. They exist
   only so a customer script can .click() them — CVS drives Continue exclusively through
   document.getElementById("btnHiddenSubmit").click() — and legacy got the rule from
   PasswordStation.css, which this host does not serve. */
:where(.aims-legacy-chrome) .hiddenbutton {
    display: none;
}

:where(.aims-legacy-chrome) .hiddenlabel label {
    display: none;
}

/* AIMSBase.css:326-328 / 430-434 / 1258-1262 — the small-text families the older pages use
   (DomainUser's table.facecenter, Success's td.face8, DataSetResult's nested table.face). */
:where(.aims-legacy-chrome) .face,
:where(.aims-legacy-chrome) .facecenter {
    font-size: 11px;
    font-family: Verdana, Geneva, Arial, sans-serif;
}

:where(.aims-legacy-chrome) table.center,
:where(.aims-legacy-chrome) .facecenter,
:where(.aims-legacy-chrome) .face8center {
    margin-left: auto;
    margin-right: auto;
}

:where(.aims-legacy-chrome) .face8,
:where(.aims-legacy-chrome) .face8center {
    color: #666666;
    font-size: 13px;
}

/* PasswordStation.css:4 — the fixed-width text buttons DomainUser uses in non-English locales. */
:where(.aims-legacy-chrome) .largebutton {
    width: 175px;
}

/* avatier_bootstrap.css:8-12 / 22-24 / 30-32 / 48-50 — spacing helpers the inner pages use. */
:where(.aims-legacy-chrome) .col-centered {
    float: none;
    margin: 0 auto;
    display: block;
}

:where(.aims-legacy-chrome) .top-buffer-md {
    margin-top: 15px;
}

:where(.aims-legacy-chrome) .bottom-buffer {
    margin-bottom: 10px;
}

:where(.aims-legacy-chrome) .btn-with-margin {
    margin: 5px 5px 15px 0px;
}

:where(.aims-legacy-chrome) .font15 {
    font-size: 15px;
}

/* ---------------------------------------------------------------
   THE SPLIT BUTTON ROWS — avatier_bootstrap.css:52-56 and 226-263.

   EVERY ONE of legacy's rules here is an input[type="submit"] / input[type="button"] DESCENDANT
   selector, which is the concrete reason the CLASSIC branch must render <input type="submit">
   and not <button>: a <button> inside .button-split-2 gets the right id, the right class, and
   ZERO layout. The .btn spelling is listed alongside so a page that has not been converted yet
   still lays out — aims-legacy-auth.css:633-700 does the same for the login shell.

   The MODERN re-interpretation of .button-split-2 (CSS grid, aims-app.css:119) is scoped
   :not(.aims-legacy-chrome) so the two can never both apply.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .button-split-1 .btn,
:where(.aims-legacy-chrome) .button-split-2 .btn,
:where(.aims-legacy-chrome) .button-split-3 .btn,
:where(.aims-legacy-chrome) .button-split-1 input[type="submit"],
:where(.aims-legacy-chrome) .button-split-1 input[type="button"],
:where(.aims-legacy-chrome) .button-split-2 input[type="submit"],
:where(.aims-legacy-chrome) .button-split-2 input[type="button"],
:where(.aims-legacy-chrome) .button-split-3 input[type="submit"],
:where(.aims-legacy-chrome) .button-split-3 input[type="button"] {
    height: 40px;
    font-size: 18px;
    line-height: 27px;
    /* Legacy's own bootstrap .btn vertical padding. The product `.ps-layout-container .btn`
       rule (aims-app.css) pads 10px, which inside this FIXED 40px border-box squeezes the
       content box to 18px - smaller than the 27px line box, whose overflow anchors top and
       pushes the label visibly below centre on <input> buttons (flex centring only works on
       <button>). 6px restores legacy's 26px content box, where the line box fits and the UA
       centres the label exactly as the ASPX pages did. A customer's own button rules still
       outrank this (id selectors vs :where()-zeroed classes). */
    padding-top: 6px;
    padding-bottom: 6px;
}

@media (min-width: 640px) {
    :where(.aims-legacy-chrome) .button-split-1,
    :where(.aims-legacy-chrome) .button-split-2,
    :where(.aims-legacy-chrome) .button-split-3 {
        padding-bottom: 20px;
        padding-top: 20px;
    }

    :where(.aims-legacy-chrome) .button-split-1 .btn,
    :where(.aims-legacy-chrome) .button-split-1 input[type="submit"],
    :where(.aims-legacy-chrome) .button-split-1 input[type="button"] {
        width: 100%;
    }

    :where(.aims-legacy-chrome) .button-split-2 .btn,
    :where(.aims-legacy-chrome) .button-split-2 input[type="submit"],
    :where(.aims-legacy-chrome) .button-split-2 input[type="button"] {
        width: calc(50% - 7px);
    }

    :where(.aims-legacy-chrome) .button-split-2 .btn:first-child,
    :where(.aims-legacy-chrome) .button-split-2 input[type="submit"]:first-child,
    :where(.aims-legacy-chrome) .button-split-2 input[type="button"]:first-child {
        margin-right: 9px;
    }

    :where(.aims-legacy-chrome) .button-split-3 .btn,
    :where(.aims-legacy-chrome) .button-split-3 input[type="submit"],
    :where(.aims-legacy-chrome) .button-split-3 input[type="button"] {
        width: calc(33% - 7px);
    }

    :where(.aims-legacy-chrome) .button-split-3 .btn:first-child,
    :where(.aims-legacy-chrome) .button-split-3 input[type="submit"]:first-child,
    :where(.aims-legacy-chrome) .button-split-3 input[type="button"]:first-child,
    :where(.aims-legacy-chrome) .button-split-3 .btn:nth-child(2),
    :where(.aims-legacy-chrome) .button-split-3 input[type="submit"]:nth-child(2),
    :where(.aims-legacy-chrome) .button-split-3 input[type="button"]:nth-child(2) {
        margin-right: 9px;
    }
}

/* THE PHONE HALF — Styles/avatier_bootstrap.css:281-292. Never ported, so below 640px the split
   rows lost legacy's 20px padding entirely and their buttons kept whatever width the desktop block
   had already stopped applying. Legacy states the 20px padding in BOTH media blocks, i.e. it is
   effectively unconditional; the stacked full-width buttons are the phone layout the customer's
   own `@media(max-width:640px){ .button-split-N { text-align: center } }` is authored against. */
@media (max-width: 639px) {
    :where(.aims-legacy-chrome) .button-split-1,
    :where(.aims-legacy-chrome) .button-split-2,
    :where(.aims-legacy-chrome) .button-split-3 {
        padding-bottom: 20px;
        padding-top: 20px;
    }

    :where(.aims-legacy-chrome) .button-split-1 .btn,
    :where(.aims-legacy-chrome) .button-split-2 .btn,
    :where(.aims-legacy-chrome) .button-split-3 .btn,
    :where(.aims-legacy-chrome) .button-split-1 input[type="submit"],
    :where(.aims-legacy-chrome) .button-split-1 input[type="button"],
    :where(.aims-legacy-chrome) .button-split-2 input[type="submit"],
    :where(.aims-legacy-chrome) .button-split-2 input[type="button"],
    :where(.aims-legacy-chrome) .button-split-3 input[type="submit"],
    :where(.aims-legacy-chrome) .button-split-3 input[type="button"] {
        margin-bottom: 12px;
        width: 100%;
    }
}

/* ---------------------------------------------------------------
   FORM CONTROLS — Bootstrap 3 (Styles/bootstrap.min.css), the baseline every
   input.form-control / select.form-control / div.input-group on the legacy pages sits on, and
   the baseline a customer's `.input-group .form-control { float: right; width: 70% }` and
   `.form-control:focus { border-color: slategrey }` are written against.

   .control-label is scoped to .form-horizontal exactly as Bootstrap scopes it — legacy puts the
   bare class on spans where it deliberately does nothing, and inventing a rule for it would
   restyle captions legacy leaves alone.
   --------------------------------------------------------------- */
:where(.aims-legacy-chrome) .form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

:where(.aims-legacy-chrome) .form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

:where(.aims-legacy-chrome) .form-control[disabled],
:where(.aims-legacy-chrome) fieldset[disabled] .form-control {
    background-color: #eee;
    opacity: 1;
}

:where(.aims-legacy-chrome) .form-horizontal .control-label {
    padding-top: 7px;
    margin-bottom: 0;
    text-align: right;
}

:where(.aims-legacy-chrome) .input-group {
    position: relative;
    display: table;
    border-collapse: separate;
}

:where(.aims-legacy-chrome) .input-group .form-control {
    position: relative;
    z-index: 2;
    float: left;
    width: 100%;
    margin-bottom: 0;
    display: table-cell;
}

:where(.aims-legacy-chrome) .input-group-btn {
    position: relative;
    display: table-cell;
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0;
}

:where(.aims-legacy-chrome) .input-group-btn > .btn {
    position: relative;
}

/* THE JOIN — stylesheets/bootstrap-ms.css:3418-3426, :3431-3439 and :3450-3459, transcribed
   verbatim at legacy's own weight (0,3,0).

   These are what make a legacy `div.input-group > input.form-control + span.input-group-btn >
   button.btn` read as ONE control: the facing corners lose their radius and the addon pulls back
   1px so the two boxes share a border instead of drawing two. Without them the reveal button on
   /ps/security-question, /ps/change-password and /ps/reset-password renders as a DETACHED grey chip
   parked beside the field — two full radii and two borders abutting.

   They also re-arm two customer declarations that could not fire while the addon had no box of its
   own: CVS ship `@media(max-width:760px){ span.input-group-btn { padding-top: 89px !important } }`
   and `.input-group-btn:last-child > .btn { margin-top: -89px !important }` — their hand-tuned
   phone layout for exactly this chip. */
:where(.aims-legacy-chrome) .input-group .form-control:first-child,
:where(.aims-legacy-chrome) .input-group-addon:first-child,
:where(.aims-legacy-chrome) .input-group-btn:first-child > .btn,
:where(.aims-legacy-chrome) .input-group-btn:first-child > .btn-group > .btn,
:where(.aims-legacy-chrome) .input-group-btn:first-child > .dropdown-toggle,
:where(.aims-legacy-chrome) .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
:where(.aims-legacy-chrome) .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

:where(.aims-legacy-chrome) .input-group-addon:first-child {
    border-right: 0;
}

:where(.aims-legacy-chrome) .input-group .form-control:last-child,
:where(.aims-legacy-chrome) .input-group-addon:last-child,
:where(.aims-legacy-chrome) .input-group-btn:last-child > .btn,
:where(.aims-legacy-chrome) .input-group-btn:last-child > .btn-group > .btn,
:where(.aims-legacy-chrome) .input-group-btn:last-child > .dropdown-toggle,
:where(.aims-legacy-chrome) .input-group-btn:first-child > .btn:not(:first-child),
:where(.aims-legacy-chrome) .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

:where(.aims-legacy-chrome) .input-group-addon:last-child {
    border-left: 0;
}

:where(.aims-legacy-chrome) .input-group-btn > .btn + .btn {
    margin-left: -1px;
}

:where(.aims-legacy-chrome) .input-group-btn > .btn:hover,
:where(.aims-legacy-chrome) .input-group-btn > .btn:focus,
:where(.aims-legacy-chrome) .input-group-btn > .btn:active {
    z-index: 2;
}

:where(.aims-legacy-chrome) .input-group-btn:first-child > .btn,
:where(.aims-legacy-chrome) .input-group-btn:first-child > .btn-group {
    margin-right: -1px;
}

:where(.aims-legacy-chrome) .input-group-btn:last-child > .btn,
:where(.aims-legacy-chrome) .input-group-btn:last-child > .btn-group {
    margin-left: -1px;
}

:where(.aims-legacy-chrome) .radio,
:where(.aims-legacy-chrome) .checkbox {
    position: relative;
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
}

:where(.aims-legacy-chrome) .radio label,
:where(.aims-legacy-chrome) .checkbox label {
    min-height: 20px;
    padding-left: 20px;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

/* THE CONTROL ITSELF — ONE rule, because legacy's two cancel down to one.

   Legacy ships BOTH halves of a Bootstrap-3 argument with itself:
       stylesheets/bootstrap-ms.css:2535-2541   .radio input[type=radio], … { position:absolute;
                                                  margin-left:-20px; margin-top:4px \9 }   (0,2,1)
       Styles/avatier_bootstrap.css:344-349     .radio input[type=radio], … { position:relative;
                                                  margin-left:0 }                          (0,2,1)
   PS/HeadTag.htm:6-9 links bootstrap-ms.css FIRST and avatier_bootstrap.css SECOND, and the second
   rule re-declares BOTH of the first rule's properties at equal weight — so the Bootstrap-3 half is
   dead in production and only the net result is worth porting. Porting the dead half and then
   porting its canceller reproduced the argument instead of the answer.

   WEIGHT IS DELIBERATE AND IS THE POINT: `input`, (0,0,1). The `:where()`s contribute nothing.
   Legacy's own pair sits at (0,2,1), which outranks CVS's `input[type="radio"],
   input[type="checkbox"] { margin: 9px }` at (0,1,1) — so on legacy the customer gets 9px on three
   sides and 0 on the left. Spelling that weight here would make OUR sheet the thing that beats a
   customer declaration, which is the one thing this layer exists never to do; a customer sheet is
   authoritative for every property it names. At (0,0,1) the customer's `margin` wins wherever they
   declare one, and every install that does not redeclare it still gets legacy's exact
   `position: relative; margin-left: 0`. The residual on CVS is 9px of left margin legacy zeroed —
   documented debt, not a defect. */
:where(.aims-legacy-chrome) :where(.radio, .radio-inline, .checkbox, .checkbox-inline) input:where([type="radio"], [type="checkbox"]) {
    position: relative;
    margin-left: 0;
}

/* Bootstrap 3 .table — the baseline for table#datagrid.table on SelectSystems, DataSetResult
   and LinkAccounts. Legacy's own per-page inline
   style="border-collapse:collapse;border-spacing:2px;margin-bottom:0px" overrides parts of it,
   which is legacy's markup and belongs on the element, not here. */
:where(.aims-legacy-chrome) .table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}

:where(.aims-legacy-chrome) .table > tbody > tr > td,
:where(.aims-legacy-chrome) .table > tbody > tr > th,
:where(.aims-legacy-chrome) .table > thead > tr > th {
    padding: 8px;
    line-height: 1.42857143;
    vertical-align: top;
    border-top: 1px solid #ddd;
}

/* ---------------------------------------------------------------
   GLYPHICONS — stylesheets/bootstrap-ms.css:254-266 and :588-592.

   Legacy's reveal button is `span.input-group-btn > button.btn.btn-default.btn-group >
   i.glyphicon.glyphicon-eye-close` (PS/PB70ChangePassword.aspx:345-351, PB70ResetPassword.aspx:350,
   SecurityQuestion.aspx:152, Login.aspx:121, OTPEmail.aspx:114, SMS.aspx:110). The FONT FILES were
   already deployed to wwwroot/fonts/bootstrap/ — only the @font-face and the two content rules were
   missing, so every one of those `<i>` elements measured 0x0 and the button rendered as an empty
   white square. The relative src below resolves from wwwroot/css/ to those files verbatim.

   The @font-face is a font DECLARATION and paints nothing on its own, so it stays unscoped exactly
   as legacy has it. The `.glyphicon` rules ARE scoped, because MODERN renders the same `<i>` hook
   with a MudBlazor icon nested inside it and MODERN must not change.
   --------------------------------------------------------------- */
@font-face {
    font-family: 'Glyphicons Halflings';
    src: url("../fonts/bootstrap/glyphicons-halflings-regular.eot");
    src: url("../fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"),
         url("../fonts/bootstrap/glyphicons-halflings-regular.woff2") format("woff2"),
         url("../fonts/bootstrap/glyphicons-halflings-regular.woff") format("woff"),
         url("../fonts/bootstrap/glyphicons-halflings-regular.ttf") format("truetype"),
         url("../fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg");
}

:where(.aims-legacy-chrome) .glyphicon,
:where(.aims-legacy-auth) .glyphicon {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: 'Glyphicons Halflings';
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:where(.aims-legacy-chrome) .glyphicon-eye-open:before,
:where(.aims-legacy-auth) .glyphicon-eye-open:before {
    content: "\e105";
}

:where(.aims-legacy-chrome) .glyphicon-eye-close:before,
:where(.aims-legacy-auth) .glyphicon-eye-close:before {
    content: "\e106";
}
