/* PMAU360 -> NDS transition scaffold.
   ============================================================================
   THIS FILE IS TEMPORARY AND SHOULD END UP EMPTY.

   The migration removes Bootstrap, but ~3,000 Bootstrap class usages are still
   sitting in templates while the eight page agents convert them. This sheet
   re-implements the grid and the utilities those templates actually use - and
   nothing else - on NDS tokens, so that a page keeps its layout on the day
   bootstrap.min.css stops loading.

   Every rule here is scaffolding around markup that has not been converted yet.
   As each page agent replaces `<div class="row g-3">` with a real NDS layout and
   `<span class="badge text-bg-light">` with `<span class="nds-tag">`, the
   corresponding rules stop being referenced. When the last page is converted
   this file is empty and gets deleted along with the <link> that loads it.

   Two rules about what goes in here:

   1. Grid and utilities only. Bootstrap COMPONENTS - .btn, .card, .table,
      .modal, .alert, .badge, .form-control - are deliberately absent. They have
      NDS equivalents (docs/NDS_CONTRACT.md) and re-implementing them here would
      remove the pressure to convert them, which is the entire point.

   2. Logical properties only. `me-2` is `margin-inline-end`, never
      `margin-right`; `text-end` is `text-align: end`, never `right`. That is
      what lets ONE stylesheet serve both Arabic and English and retires the
      bootstrap.min.css / bootstrap.rtl.min.css split.

   The `!important` on the utility rules mirrors Bootstrap's own, for two
   reasons: templates were written expecting utilities to win over component
   styles, and while both sheets are loaded this is what keeps a logical rule
   from losing to Bootstrap's physical one.

   Requires nds-critical.css / nds-main.css to be loaded first.
   ============================================================================ */


/* ============================================================
   Containers
   ============================================================ */

.container,
.container-fluid {
  width: 100%;
  padding-inline: var(--spacing-4);
  margin-inline: auto;
}

@media (min-width: 576px) {
  .container { max-width: 540px; }
}

@media (min-width: 768px) {
  .container { max-width: 720px; }
}

@media (min-width: 992px) {
  .container { max-width: 960px; }
}

@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}


/* ============================================================
   Grid
   ============================================================
   Bootstrap's 12-column flex grid, with the gutters expressed as logical
   margin/padding so a row is not mirrored by hand. `--seu-gutter-*` is
   namespaced rather than reusing `--bs-gutter-*`, so that nothing here depends
   on Bootstrap still being loaded. */

.row {
  --seu-gutter-x: var(--spacing-6);
  --seu-gutter-y: 0;
  display: flex;
  flex-wrap: wrap;
  margin-block-start: calc(-1 * var(--seu-gutter-y));
  margin-inline: calc(-0.5 * var(--seu-gutter-x));
}

.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-inline: calc(var(--seu-gutter-x) * 0.5);
  margin-block-start: var(--seu-gutter-y);
}

.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }

.col-1 { flex: 0 0 auto; width: 8.333333333%; }
.col-2 { flex: 0 0 auto; width: 16.66666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-5 { flex: 0 0 auto; width: 41.66666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.33333333%; }
.col-8 { flex: 0 0 auto; width: 66.66666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.33333333%; }
.col-11 { flex: 0 0 auto; width: 91.66666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 576px) {
  .col-sm { flex: 1 0 0%; }
  .col-sm-auto { flex: 0 0 auto; width: auto; }
  .col-sm-1 { flex: 0 0 auto; width: 8.333333333%; }
  .col-sm-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-sm-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-sm-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 768px) {
  .col-md { flex: 1 0 0%; }
  .col-md-auto { flex: 0 0 auto; width: auto; }
  .col-md-1 { flex: 0 0 auto; width: 8.333333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-md-9 { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-md-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 992px) {
  .col-lg { flex: 1 0 0%; }
  .col-lg-auto { flex: 0 0 auto; width: auto; }
  .col-lg-1 { flex: 0 0 auto; width: 8.333333333%; }
  .col-lg-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-lg-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 1200px) {
  .col-xl { flex: 1 0 0%; }
  .col-xl-auto { flex: 0 0 auto; width: auto; }
  .col-xl-1 { flex: 0 0 auto; width: 8.333333333%; }
  .col-xl-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-xl-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .col-xl-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-xl-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-xl-9 { flex: 0 0 auto; width: 75%; }
  .col-xl-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-xl-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-xl-12 { flex: 0 0 auto; width: 100%; }
}

/* Gutters. `g-*` sets both axes, as in Bootstrap. */
.g-0 { --seu-gutter-x: 0; --seu-gutter-y: 0; }
.g-1 { --seu-gutter-x: var(--spacing-1); --seu-gutter-y: var(--spacing-1); }
.g-2 { --seu-gutter-x: var(--spacing-2); --seu-gutter-y: var(--spacing-2); }
.g-3 { --seu-gutter-x: var(--spacing-4); --seu-gutter-y: var(--spacing-4); }
.g-4 { --seu-gutter-x: var(--spacing-6); --seu-gutter-y: var(--spacing-6); }
.g-5 { --seu-gutter-x: var(--spacing-12); --seu-gutter-y: var(--spacing-12); }
.gx-0 { --seu-gutter-x: 0; }
.gx-1 { --seu-gutter-x: var(--spacing-1); }
.gx-2 { --seu-gutter-x: var(--spacing-2); }
.gx-3 { --seu-gutter-x: var(--spacing-4); }
.gx-4 { --seu-gutter-x: var(--spacing-6); }
.gx-5 { --seu-gutter-x: var(--spacing-12); }
.gy-0 { --seu-gutter-y: 0; }
.gy-1 { --seu-gutter-y: var(--spacing-1); }
.gy-2 { --seu-gutter-y: var(--spacing-2); }
.gy-3 { --seu-gutter-y: var(--spacing-4); }
.gy-4 { --seu-gutter-y: var(--spacing-6); }
.gy-5 { --seu-gutter-y: var(--spacing-12); }


/* ============================================================
   Display
   ============================================================ */

.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-grid { display: grid !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-block { display: block !important; }
  .d-sm-grid { display: grid !important; }
  .d-sm-table { display: table !important; }
  .d-sm-table-row { display: table-row !important; }
  .d-sm-table-cell { display: table-cell !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-inline-flex { display: inline-flex !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-block { display: block !important; }
  .d-md-grid { display: grid !important; }
  .d-md-table { display: table !important; }
  .d-md-table-row { display: table-row !important; }
  .d-md-table-cell { display: table-cell !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-flex { display: inline-flex !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-inline { display: inline !important; }
  .d-lg-inline-block { display: inline-block !important; }
  .d-lg-block { display: block !important; }
  .d-lg-grid { display: grid !important; }
  .d-lg-table { display: table !important; }
  .d-lg-table-row { display: table-row !important; }
  .d-lg-table-cell { display: table-cell !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-inline-flex { display: inline-flex !important; }
}

@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-inline { display: inline !important; }
  .d-xl-inline-block { display: inline-block !important; }
  .d-xl-block { display: block !important; }
  .d-xl-grid { display: grid !important; }
  .d-xl-table { display: table !important; }
  .d-xl-table-row { display: table-row !important; }
  .d-xl-table-cell { display: table-cell !important; }
  .d-xl-flex { display: flex !important; }
  .d-xl-inline-flex { display: inline-flex !important; }
}


/* ============================================================
   Flex
   ============================================================ */

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-fill { flex: 1 1 auto !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-1 { flex-shrink: 1 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.justify-content-evenly { justify-content: space-evenly !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.align-self-start { align-self: flex-start !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-center { align-self: center !important; }
.align-self-stretch { align-self: stretch !important; }

/* Gap uses the physical-free `gap` shorthand, so it needs no mirroring. */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--spacing-1) !important; }
.gap-2 { gap: var(--spacing-2) !important; }
.gap-3 { gap: var(--spacing-4) !important; }
.gap-4 { gap: var(--spacing-6) !important; }
.gap-5 { gap: var(--spacing-12) !important; }


/* ============================================================
   Spacing
   ============================================================
   `s` is inline-start and `e` is inline-end - the same letters Bootstrap uses,
   now backed by logical properties instead of an RTL rebuild of the sheet. */

.m-0 { margin: 0 !important; }
.m-1 { margin: var(--spacing-1) !important; }
.m-2 { margin: var(--spacing-2) !important; }
.m-3 { margin: var(--spacing-4) !important; }
.m-4 { margin: var(--spacing-6) !important; }
.m-5 { margin: var(--spacing-12) !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-block-start: 0 !important; }
.mt-1 { margin-block-start: var(--spacing-1) !important; }
.mt-2 { margin-block-start: var(--spacing-2) !important; }
.mt-3 { margin-block-start: var(--spacing-4) !important; }
.mt-4 { margin-block-start: var(--spacing-6) !important; }
.mt-5 { margin-block-start: var(--spacing-12) !important; }
.mt-auto { margin-block-start: auto !important; }

.mb-0 { margin-block-end: 0 !important; }
.mb-1 { margin-block-end: var(--spacing-1) !important; }
.mb-2 { margin-block-end: var(--spacing-2) !important; }
.mb-3 { margin-block-end: var(--spacing-4) !important; }
.mb-4 { margin-block-end: var(--spacing-6) !important; }
.mb-5 { margin-block-end: var(--spacing-12) !important; }
.mb-auto { margin-block-end: auto !important; }

.ms-0 { margin-inline-start: 0 !important; }
.ms-1 { margin-inline-start: var(--spacing-1) !important; }
.ms-2 { margin-inline-start: var(--spacing-2) !important; }
.ms-3 { margin-inline-start: var(--spacing-4) !important; }
.ms-4 { margin-inline-start: var(--spacing-6) !important; }
.ms-5 { margin-inline-start: var(--spacing-12) !important; }
.ms-auto { margin-inline-start: auto !important; }

.me-0 { margin-inline-end: 0 !important; }
.me-1 { margin-inline-end: var(--spacing-1) !important; }
.me-2 { margin-inline-end: var(--spacing-2) !important; }
.me-3 { margin-inline-end: var(--spacing-4) !important; }
.me-4 { margin-inline-end: var(--spacing-6) !important; }
.me-5 { margin-inline-end: var(--spacing-12) !important; }
.me-auto { margin-inline-end: auto !important; }

.mx-0 { margin-inline: 0 !important; }
.mx-1 { margin-inline: var(--spacing-1) !important; }
.mx-2 { margin-inline: var(--spacing-2) !important; }
.mx-3 { margin-inline: var(--spacing-4) !important; }
.mx-4 { margin-inline: var(--spacing-6) !important; }
.mx-5 { margin-inline: var(--spacing-12) !important; }
.mx-auto { margin-inline: auto !important; }

.my-0 { margin-block: 0 !important; }
.my-1 { margin-block: var(--spacing-1) !important; }
.my-2 { margin-block: var(--spacing-2) !important; }
.my-3 { margin-block: var(--spacing-4) !important; }
.my-4 { margin-block: var(--spacing-6) !important; }
.my-5 { margin-block: var(--spacing-12) !important; }
.my-auto { margin-block: auto !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-1) !important; }
.p-2 { padding: var(--spacing-2) !important; }
.p-3 { padding: var(--spacing-4) !important; }
.p-4 { padding: var(--spacing-6) !important; }
.p-5 { padding: var(--spacing-12) !important; }

.pt-0 { padding-block-start: 0 !important; }
.pt-1 { padding-block-start: var(--spacing-1) !important; }
.pt-2 { padding-block-start: var(--spacing-2) !important; }
.pt-3 { padding-block-start: var(--spacing-4) !important; }
.pt-4 { padding-block-start: var(--spacing-6) !important; }
.pt-5 { padding-block-start: var(--spacing-12) !important; }

.pb-0 { padding-block-end: 0 !important; }
.pb-1 { padding-block-end: var(--spacing-1) !important; }
.pb-2 { padding-block-end: var(--spacing-2) !important; }
.pb-3 { padding-block-end: var(--spacing-4) !important; }
.pb-4 { padding-block-end: var(--spacing-6) !important; }
.pb-5 { padding-block-end: var(--spacing-12) !important; }

.ps-0 { padding-inline-start: 0 !important; }
.ps-1 { padding-inline-start: var(--spacing-1) !important; }
.ps-2 { padding-inline-start: var(--spacing-2) !important; }
.ps-3 { padding-inline-start: var(--spacing-4) !important; }
.ps-4 { padding-inline-start: var(--spacing-6) !important; }
.ps-5 { padding-inline-start: var(--spacing-12) !important; }

.pe-0 { padding-inline-end: 0 !important; }
.pe-1 { padding-inline-end: var(--spacing-1) !important; }
.pe-2 { padding-inline-end: var(--spacing-2) !important; }
.pe-3 { padding-inline-end: var(--spacing-4) !important; }
.pe-4 { padding-inline-end: var(--spacing-6) !important; }
.pe-5 { padding-inline-end: var(--spacing-12) !important; }

.px-0 { padding-inline: 0 !important; }
.px-1 { padding-inline: var(--spacing-1) !important; }
.px-2 { padding-inline: var(--spacing-2) !important; }
.px-3 { padding-inline: var(--spacing-4) !important; }
.px-4 { padding-inline: var(--spacing-6) !important; }
.px-5 { padding-inline: var(--spacing-12) !important; }

.py-0 { padding-block: 0 !important; }
.py-1 { padding-block: var(--spacing-1) !important; }
.py-2 { padding-block: var(--spacing-2) !important; }
.py-3 { padding-block: var(--spacing-4) !important; }
.py-4 { padding-block: var(--spacing-6) !important; }
.py-5 { padding-block: var(--spacing-12) !important; }

/* The responsive spacing scale is NOT generated in full - that would be ~1,200
   rules for a scaffold. Exactly one breakpoint-scoped spacing class appears in
   the templates, in the footer's stack-on-mobile columns. */
@media (min-width: 768px) {
  .mb-md-0 { margin-block-end: 0 !important; }
}


/* ============================================================
   Sizing
   ============================================================ */

.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.mw-100 { max-width: 100% !important; }
.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }
.mh-100 { max-height: 100% !important; }


/* ============================================================
   Text
   ============================================================ */

.text-start { text-align: start !important; }
.text-end { text-align: end !important; }
.text-center { text-align: center !important; }

@media (min-width: 576px) {
  .text-sm-start { text-align: start !important; }
  .text-sm-end { text-align: end !important; }
  .text-sm-center { text-align: center !important; }
}

@media (min-width: 768px) {
  .text-md-start { text-align: start !important; }
  .text-md-end { text-align: end !important; }
  .text-md-center { text-align: center !important; }
}

@media (min-width: 992px) {
  .text-lg-start { text-align: start !important; }
  .text-lg-end { text-align: end !important; }
  .text-lg-center { text-align: center !important; }
}

@media (min-width: 1200px) {
  .text-xl-start { text-align: start !important; }
  .text-xl-end { text-align: end !important; }
  .text-xl-center { text-align: center !important; }
}


/* Bootstrap's colour names, resolved to NDS semantic tokens. Two of these do
   NOT map to the token of the same name, and that is deliberate:

     .text-primary   is Bootstrap's blue -> re-pointed at the PMAU brand green.
     .text-secondary is Bootstrap's GREY. NDS's `--text-secondary` is the accent
                     GOLD, so this uses `--text-primary-paragraph` instead.

   Every token below flips with the theme, which is why the ~650 lines of
   `[data-theme="dark"] .text-muted { … }` patches in style.css are gone. */

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-primary-paragraph) !important; }
.text-success { color: var(--text-success) !important; }
.text-danger { color: var(--text-error) !important; }
.text-warning { color: var(--text-warning) !important; }
.text-info { color: var(--text-info) !important; }
.text-light { color: var(--colors-neutral-200) !important; }
.text-dark { color: var(--text-default) !important; }
.text-body { color: var(--text-default) !important; }
.text-muted { color: var(--text-secondary-paragraph) !important; }
.text-white { color: var(--text-white) !important; }
.text-black { color: var(--text-black) !important; }
.text-reset { color: inherit !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.text-nowrap { white-space: nowrap !important; }
.text-wrap { white-space: normal !important; }
.text-break { word-wrap: break-word !important; word-break: break-word !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }

.small { font-size: 0.875em; }
.font-monospace { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; }

.align-top { vertical-align: top !important; }
.align-middle { vertical-align: middle !important; }
.align-bottom { vertical-align: bottom !important; }


/* ============================================================
   Backgrounds
   ============================================================ */

.bg-primary { background-color: var(--background-primary) !important; }
.bg-secondary { background-color: var(--colors-neutral-500) !important; }
.bg-success { background-color: var(--background-success) !important; }
.bg-danger { background-color: var(--background-error) !important; }
.bg-warning { background-color: var(--background-warning) !important; }
.bg-info { background-color: var(--background-info) !important; }
.bg-light { background-color: var(--background-neutral-light) !important; }
.bg-dark { background-color: var(--colors-neutral-800) !important; }
.bg-white { background-color: var(--background-white) !important; }
.bg-body { background-color: var(--background-body) !important; }
.bg-transparent { background-color: transparent !important; }

/* The `*-subtle` fills use NDS's 10% alpha tints rather than a 50-step of the
   ramp, because an alpha tint is the only one that stays readable over both a
   white and a near-black surface without a dark-mode twin. */
.bg-primary-subtle { background-color: var(--alpha-primary-10) !important; }
.bg-secondary-subtle { background-color: var(--background-neutral-light) !important; }
.bg-success-subtle { background-color: var(--alpha-success-10) !important; }
.bg-danger-subtle { background-color: var(--alpha-error-10) !important; }
.bg-warning-subtle { background-color: var(--alpha-warning-10) !important; }
.bg-info-subtle { background-color: var(--alpha-info-10) !important; }

/* `text-bg-*` pairs a fill with ink that is legible on it - the reason 36
   badges in this app use it instead of `bg-*` plus a colour. */
.text-bg-primary { color: var(--text-oncolor-primary) !important; background-color: var(--background-primary) !important; }
.text-bg-secondary { color: var(--text-oncolor-primary) !important; background-color: var(--colors-neutral-500) !important; }
.text-bg-success { color: var(--text-oncolor-primary) !important; background-color: var(--background-success) !important; }
.text-bg-danger { color: var(--text-oncolor-primary) !important; background-color: var(--background-error) !important; }
.text-bg-warning { color: var(--text-black) !important; background-color: var(--colors-yellow-300) !important; }
.text-bg-info { color: var(--text-oncolor-primary) !important; background-color: var(--background-info) !important; }
.text-bg-light { color: var(--text-default) !important; background-color: var(--background-neutral-light) !important; }
.text-bg-dark { color: var(--text-oncolor-primary) !important; background-color: var(--colors-neutral-800) !important; }


/* ============================================================
   Borders, radius, shadow
   ============================================================ */

.border { border: 1px solid var(--border-neutral-secondary) !important; }
.border-0 { border: 0 !important; }
.border-top { border-block-start: 1px solid var(--border-neutral-secondary) !important; }
.border-bottom { border-block-end: 1px solid var(--border-neutral-secondary) !important; }
.border-start { border-inline-start: 1px solid var(--border-neutral-secondary) !important; }
.border-end { border-inline-end: 1px solid var(--border-neutral-secondary) !important; }
.border-top-0 { border-block-start: 0 !important; }
.border-bottom-0 { border-block-end: 0 !important; }
.border-start-0 { border-inline-start: 0 !important; }
.border-end-0 { border-inline-end: 0 !important; }
.border-primary { border-color: var(--border-primary) !important; }
.border-danger { border-color: var(--border-error) !important; }
.border-success { border-color: var(--border-success) !important; }
.border-warning { border-color: var(--border-warning) !important; }

.rounded { border-radius: var(--radius-md) !important; }
.rounded-0 { border-radius: 0 !important; }
.rounded-1 { border-radius: var(--radius-sm) !important; }
.rounded-2 { border-radius: var(--radius-md) !important; }
.rounded-3 { border-radius: var(--radius-lg) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill { border-radius: var(--radius-full) !important; }

.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }


/* ============================================================
   Position, overflow, visibility
   ============================================================ */

.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Turns a whole card into one click target without nesting an <a> around it.
   `inset` is already direction-neutral. */
.stretched-link::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
}

.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

.invisible { visibility: hidden !important; }
.visible { visibility: visible !important; }

/* Reachable by a screen reader, invisible to everyone else. Load-bearing for
   accessibility, so it is here even at six usages. */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ============================================================
   Two layout helpers that are not really utilities
   ============================================================
   Both wrap markup that no page agent has converted yet. `.table-responsive`
   becomes `.nds-table-wrapper`; `.form-check` becomes `.nds-check-container`
   (docs/NDS_CONTRACT.md §7, §8). They are here because a table that cannot
   scroll and a checkbox that has lost its label are broken pages, not
   cosmetic regressions. */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Replaces 22 lines of paired [dir="rtl"] / [dir="ltr"] float-and-margin
   patching in style.css: a flex row needs no mirroring at all. */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-height: 1.5rem;
}

.form-check-input {
  flex-shrink: 0;
  margin: 0;
}

.form-check-label {
  margin: 0;
}

