:root {
  /* CONFIGURE THESE */
  /* Reduce Viewport Height to compensate for Sticky Elements (Logo/Search topBar, Submenu navBar, maybe Chatbot) and JS-Injected Controls, account for diffs in mobile-v-desktop, and scrolled-v-unscrolled */
  --heightTopBarScrolled: 50px;
  --heightTopBarUnscroll: 83px;
  /* Currently unused. Assuming user is always scrolled down. */
  --heightSubmenuDesktop: 76.5px;
  --heightPaginationNav: 47px;
  /* Includes "top-margin" */
  --heightSearchBar: 0;
  /* TODO Incorporate this both here, and in `SECTION.enlisted` override further down */
  --btmPxCoordOfChatBot: 0;
  /* Currently unused. Consider again later. */

  /* Absolutely Required */
  --maxHeightViewportDT: calc(100vh - (var(--heightTopBarScrolled) + var(--heightSubmenuDesktop)));
  --maxHeightViewportMD: calc(100vh - (var(--heightTopBarScrolled)));
}

/* TODO: Consider duplicating this in JS for improved dynamism. */
::highlight(search-results) {
  background-color: hotpink;
  color: white;
}

/* Expansion Animation, requires `interpolate-size: allow-keywords;` (Works only in Chromium right now.) */
/* Target the built-in content wrapper wrapper */
DETAILS::details-content {
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  /* transition-behavior: allow-discrete handles the display toggling under the hood */
  transition: block-size 0.3s ease, opacity 0.3s ease, content-visibility 0.3s allow-discrete;
}

/* State when the details element is open */
DETAILS[open]::details-content {
  block-size: auto;
  opacity: 1;
}

/* The Main List/The Internal "Viewer Frame" itself, between the JS-Injected Controls */
/* Note: how these rules reside outside the JS-Injected SECTION.enlisted */
/*    This is because it should look typically the same before/after JS. */
.enlist {
  font-family: Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  border: 1px solid #767676;
  border-radius: .5rem;
  padding: .5rem 1rem;
  margin: 1rem 0;
  background: #fff;
  list-style: none;
  overflow: auto;

  /* Variables defined in `SECTION.enlisted` */
  max-height: var(--maxHeightViewportDT);

  @media (width < 992px) {
    max-height: var(--maxHeightViewportMD);
  }

  /* min-height: var(--heightNoResultsMsg); */

  &>LI {
    padding: .5em;
    border-bottom: 2px solid #0006;

    &:nth-last-child(1 of :not([hidden])),&:last-of-type{border-bottom:0; margin-bottom:0;}

    &>DETAILS {

      &>SUMMARY {
        color: #002f87;
        font-weight: bold;
        font-size: 1.35rem;
        /* font-family: "gotham", Arial, sans-serif; */
        margin: 0 0 .5rem;
        /* Remove the default "Disclosure Arrow"  */
        list-style: none;/* Modern Standard */
        &::-webkit-details-marker{display:none}/* For older WebKit-based browsers and Safari */
        &::marker{content:""}/* Alternative fallback: forces standard browsers to drop the list marker format */

        &> :is(H4, H3) {font-size: 1.35rem;}

        &>EM {
          display: block;
          color: #453030;
          font-size: 1rem;
          font-weight: normal;
          margin: .5rem 0;
          position: relative;
          container-type: inline-size;

          &::after {
            content: "Read Description";
            background: #e0e0e0;
            font-size: 0.8rem;
            font-weight: normal;
            font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
            text-align: center;
            padding: .25rem .75rem;
            border-radius: 0.75rem;
            margin: .5rem;
            display: inline-block;
          }

          @container (width<310px) {
            &::after {
              display: block;
            }
          }

          @container (width>=355px) {
            &::after {
              position: absolute;
              right: 0;
              top: 50%;
              translate: 0 -50%;
              margin: 0 .5rem 0 0;
            }
          }/* EM::AFTER.read-more */
        }/* EM */

        &:hover>EM::AFTER {
          background: #777;
          color: #fff
        }
      }

      /* SUMMARY */

      &[open]>SUMMARY>EM::AFTER {content: "Hide Description"}

      &>DIV.loc {margin-bottom: 0.875rem;}

      & A:any-link {
        text-underline-offset: 2px;
        transition: text-underline-offset .2s;

        &:hover {
          text-underline-offset: .05em;

          .row & {text-decoration: underline;}
        }
      }
    }

    /* DETAILS */
    &.noDesc>DETAILS>SUMMARY>EM::AFTER {content:none}

    /* Hoisted `Register` Link"-Button" */
    &> :is(A[title*='regist' i], A.registBtn):last-child {
      text-transform: uppercase;
      font-weight: bold;
      padding: .5em 1em;
      margin: .2rem 0 .5rem;
      color: #fff;
      background-color: #002f87;
      text-decoration: none;
      border-radius: 6px;
      text-align: center;
      display: inline-block;
      box-sizing: border-box;

      &:hover {
        background-color: #b2bfd7
      }
    }/* ENDS: Hoisted `Register` Link"-Button" */
  }
}/* .enlist */



SECTION.enlisted {
  /* Confidently Suggested */
  margin: 1rem auto;
  /* Strongly Recommended */
  display: flex;
  flex-direction: column;
  /* Practically Essential */
  max-width: 100%;
  interpolate-size: allow-keywords; /* For: Smooth Expanding `DETAILS` Elements (Currently: Chromium-only. Need JS shim for others.) */
  /* Absolutely Required */
  /* Overrides height calculation to include the JS-Enhanced Controls */
  --maxHeightViewportDT: calc(100vh - (var(--heightTopBarScrolled) + var(--heightPaginationNav) + var(--heightSubmenuDesktop)));
  --maxHeightViewportMD: calc(100vh - (var(--heightTopBarScrolled) + var(--heightPaginationNav)));

  &> INPUT[type="search"]{
    border: 1px hsl(218.75deg 63.16% 85.1%) solid;
    border-radius:4px;
    padding:.25rem .5rem
}

  &>NAV> :is(OL, UL) {
    /* Configure */
    --primaryColor: #002f87;
    --secondaryColor: #8FB1EF;
    --square: 1.8rem;

    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;

    container-type: inline-size;

    &>LI {
      /* Adjustable */
      margin: 0 0.25rem;
      /* Essential */
      line-height: var(--square, 1.8rem);


      &>BUTTON {
        /* Configure */
        color: var(--primaryColor, navy);
        /* Adjustable */
        text-transform: UPPERCASE;
        font-weight: bold;
        padding: 0 .5rem;
        border: 1px solid #777;
        border-radius: 3px;
        /* Recommended */
        text-decoration: none;
        text-align: center;
        background-color: transparent;
        /* Essential */
        text-align: center;
        /* Orig: center */
        line-height: var(--square, 1.8rem);
        min-height: var(--square, 1.8rem);
        min-width: var(--square, 1.8rem);

        &:not([disabled],[aria-current="page"]):hover, &:not([disabled]):focus-visible{/* "focus-visible" is more-specifically "focused via keyboard" (not via mouse/touch) */
          background-color: var(--secondaryColor, lightsteelblue);
        }

        &:active{color: #fff}

        &[aria-current="page"] {
          color: #fff;
          cursor: default;
          background-color: var(--primaryColor, navy);
        }

        &[disabled] {
          color: #999;
          cursor: not-allowed;
        }
      }/* &>BUTTON */

      /* RelativeNav BUTTON and INPUT Styles*/
      /* User Input Style */
      &>INPUT[type="number"]{
        font-weight:bold;
        text-align:center;
        box-sizing:border-box;
      }/* &>INPUT[type="number"] */

      /* If the screen is Desktop-width: add textual labels "FIRST","PREV","NEXT","LAST" beside their symbols */
      @container (width > 504px){
        /* DevNote: in `nth-of-type` the n-term must come first. Any non-positive or non-integer numbers are ignored. Hence `-n+2` means the "only the first and second [from last, if using nth-last-]"  */
        &:nth-of-type(-n+2)>BUTTON[title]::AFTER,
        &:nth-last-of-type(-n+2)>BUTTON[title]::BEFORE{
          /* Adjustable */
          margin: 0 .25rem;
          /* Essential */
          content: attr(title);/* Takes the value of the BUTTON[title] attribute */
          display:inline-block;
        }

        &:nth-of-type(-n+2)>BUTTON[title]::AFTER{margin-right: 0;}
        &:nth-last-of-type(-n+2)>BUTTON[title]::BEFORE{
          margin-left:0;
          position: static;
        }

        &:nth-of-type(2)>BUTTON[title*="Prev"]::AFTER{content:"Prev";}/* Shortening the label */

      }/*End of @container [the navbar] (width > 504px)*/

      /* If the screen is teensy like a smartwatch, wrap "Page # of ##" onto multiple lines and shrink the font a little */
      @container (width < 316px){
          UL:has(INPUT[type=number])>&{
              margin-top:-.8rem;
              color:#0006;
              font-size:small;
              
              &> INPUT {
                  display:block;
                  margin:0 auto;
              }
          }
      }

    }/* &>LI */
  }/* navbar:  &> NAV > :is(OL,UL) */
}/* wrapper: SECTION.enlisted */


/* Class for Screen Reader Instructions/Announcements; otherwise visibly hidden. */
.sr-only,.skip-link{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.skip-link:focus{width:unset;height:unset;padding:unset;margin:unset;overflow:unset;clip-path:unset;white-space:unset;border:unset;}
[hidden]{display:none}/* Overcautious shim rule? */