/* The base of the website's pages (layouts/SiteLayout.astro): what they used of Bootstrap, written for this site and no
   more. The container, the grid with the breakpoints of the vademecum (ui.md §3: phone up to 600px, tablet 601–900px,
   computer over 900px; Bootstrap's sm and md start at 601px, lg and xl at 901px) and the utilities the pages use.
   Colors, heights and durations only from the tokens of styles.css. Utilities win over components, as in Bootstrap */

/* Text */
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5rem; font-weight: 700; line-height: 1.2; color: var(--ink); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 0.9vw, 2rem); }
h3 { font-size: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem); }
h4, .h4 { font-size: clamp(1.2rem, 1.15rem + 0.3vw, 1.4rem); }
.h5, h5 { font-size: 1.2rem; }
.h6, h6 { font-size: 1rem; }
p { margin: 0 0 1rem; }
ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 2rem; }
dd { margin: 0 0 0.5rem; }
dt { font-weight: 700; }
img, svg { vertical-align: middle; }
a { text-underline-offset: 0.2em; }
.small, small { font-size: 0.875em; }
.lead { font-size: 1.15rem; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fst-italic { font-style: italic !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-decoration-none { text-decoration: none !important; }
.text-body { color: var(--text) !important; }
.text-body-secondary { color: var(--muted) !important; }
.text-body-tertiary { color: color-mix(in srgb, var(--muted) 70%, transparent) !important; }
.text-danger { color: var(--error) !important; }
.text-reset { color: inherit !important; }
.opacity-75 { opacity: 0.75 !important; }
.list-unstyled { padding-left: 0; list-style: none; }

/* Images, sizes, borders */
.img-fluid { max-width: 100%; height: auto; }
.w-100 { width: 100% !important; }
.position-relative { position: relative !important; }
.border { border: 1px solid var(--line) !important; }
.border-top { border-top: 1px solid var(--line) !important; }
.border-bottom { border-bottom: 1px solid var(--line) !important; }
.rounded-3 { border-radius: var(--radius) !important; }
.rounded-pill { border-radius: 999px !important; }

/* Tables */
.table { width: 100%; margin-bottom: 1rem; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Flex */
.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Spacing: 1 = .25rem, 2 = .5rem, 3 = 1rem, 4 = 1.5rem, 5 = 3rem */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mt-auto { margin-top: auto !important; }
.ms-1 { margin-left: 0.25rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.p-0 { padding: 0 !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-5 { padding-top: 3rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

/* Container: the same 1200px and side space as the bar and the footer */
.container { width: 100%; max-width: var(--page-width); margin-left: auto; margin-right: auto; padding-left: var(--page-gutter); padding-right: var(--page-gutter); }

/* Grid: rows of columns with gutters (--gx between columns, --gy between rows) */
.row { --gx: 1.5rem; --gy: 0; display: flex; flex-wrap: wrap; margin-top: calc(-1 * var(--gy)); margin-left: calc(-0.5 * var(--gx)); margin-right: calc(-0.5 * var(--gx)); }
.row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-left: calc(0.5 * var(--gx)); padding-right: calc(0.5 * var(--gx)); margin-top: var(--gy); }
.g-4 { --gx: 1.5rem; --gy: 1.5rem; }
.g-5 { --gx: 3rem; --gy: 3rem; }
@media (max-width: 600px) { .g-5 { --gx: 1.5rem; --gy: 2rem; } }
.col { flex: 1 0 0%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.row-cols-1 > * { flex: 0 0 auto; width: 100%; }
/* Tablet and up (Bootstrap's sm and md) */
@media (min-width: 601px) {
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-md-2 > * { flex: 0 0 auto; width: 50%; }
}
/* Computer (Bootstrap's lg and xl) */
@media (min-width: 901px) {
  .row-cols-lg-3 > * { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-xl-4 > * { flex: 0 0 auto; width: 25%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
}
