/* ---------------------------------------------------------------------------
   Elements, the type scale and the handful of primitives every section reuses.
   --------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

body.bs-chrome {
  margin: 0;
  background: var(--bs-white);
  color: var(--bs-black);
  font-family: var(--bs-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Plugin and WooCommerce stylesheets style bare elements — headings at #555,
   uppercase buttons, blue links. This puts them back inside our own markup and
   nowhere else. It must stay at (0,0,2): one step above a bare element rule,
   one step below any single .bs-* class of ours. Writing `body.bs-chrome` here
   makes it (0,1,2) and it starts beating our own components. */
body :where([class^="bs-"], [class*=" bs-"]) :is(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  color: inherit;
  font-family: inherit;
}

body :where([class^="bs-"], [class*=" bs-"]) a {
  color: inherit;
  text-decoration: none;
}

body :where([class^="bs-"], [class*=" bs-"]) button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

body :where([class^="bs-"], [class*=" bs-"]) :is(ul, ol, li) { margin: 0; }
body :where([class^="bs-"], [class*=" bs-"]) :is(ul, ol) { padding: 0; list-style: none; }
body :where([class^="bs-"], [class*=" bs-"]) img { max-width: 100%; height: auto; }

.bs-locked { overflow: hidden; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Container ---------- */

.bs-container {
  width: 100%;
  padding-inline: var(--bs-pad);
}

/* The only place the reference narrows its measure: long-form copy. */
.bs-container--text { max-width: 1152px; margin-inline: auto; }

/* ---------- Type scale ---------- */

.bs-f-11 { font-size: 11px; }
.bs-f-12 { font-size: 12px; }
.bs-f-14 { font-size: 14px; }
.bs-f-24 { font-size: 24px; line-height: 30px; }

.bs-w-medium { font-weight: 500; }
.bs-w-bold { font-weight: 700; }
.bs-upper { text-transform: uppercase; }
.bs-gray { color: var(--bs-gray); }

/* Section headings: 48/60 on desktop, 32/40 on a phone. */
.bs-h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -.01em;
}

@media only screen and (min-width: 990px) {
  .bs-h2 { font-size: 48px; line-height: 60px; }
}

.bs-h3 { font-size: 24px; font-weight: 700; line-height: 30px; }

/* ---------- Section rhythm ---------- */

.bs-section { padding-block: 40px; }

@media only screen and (min-width: 990px) {
  .bs-section { padding-block: 50px; }
}

/* Heading on the left, a quiet text link on the right, chips underneath. */
.bs-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.bs-section__link {
  flex: none;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bs-section__link:hover { color: var(--bs-blue); }

/* ---------- Buttons ---------- */

.bs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 32px;
  border: 1px solid var(--bs-black);
  border-radius: 48px;
  background: none;
  color: var(--bs-black);
  font-family: var(--bs-font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--bs-dur) var(--bs-ease), color var(--bs-dur) var(--bs-ease);
}

.bs-btn:hover { background: var(--bs-black); color: var(--bs-white); }

.bs-btn--solid { border-color: var(--bs-black); background: var(--bs-black); color: var(--bs-white); }
.bs-btn--solid:hover { background: var(--bs-black-light); border-color: var(--bs-black-light); }

.bs-btn--light { border-color: var(--bs-white); background: var(--bs-white); color: var(--bs-black); }
.bs-btn--light:hover { background: transparent; color: var(--bs-white); }

/* ---------- Chips: the filter row under a section heading ---------- */

.bs-chips {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin-top: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.bs-chips::-webkit-scrollbar { display: none; }

.bs-chip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--bs-gray-light);
  color: var(--bs-gray);
  font-family: var(--bs-font);
  font-size: 16px;
  line-height: 32px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--bs-dur) var(--bs-ease), color var(--bs-dur) var(--bs-ease);
}

.bs-chip:hover { color: var(--bs-black); }
.bs-chip.is-active { background: var(--bs-black); color: var(--bs-white); }

/* ---------- Rich text ---------- */

.bs-rich { font-size: 16px; line-height: 1.6; }
.bs-rich > * { margin: 0 0 16px; }
.bs-rich > *:last-child { margin-bottom: 0; }
.bs-rich h2 { margin: 32px 0 16px; font-size: 24px; font-weight: 700; line-height: 30px; }
.bs-rich h3 { margin: 24px 0 12px; font-size: 18px; font-weight: 700; }
.bs-rich a { text-decoration: underline; text-underline-offset: 3px; }
.bs-rich ul { padding-left: 20px; list-style: disc; }
.bs-rich li { margin-bottom: 8px; }

/* Content pasted into an editor arrives with fixed sizes: a caption box
   with style="width: 900px", an image with width="900", a table wider than
   the column. Inside the column, none of that may set the page's width. */
.bs-rich { min-width: 0; overflow-wrap: anywhere; }
.bs-rich h1 { margin: 32px 0 16px; font-size: 24px; font-weight: 700; line-height: 30px; }
.bs-rich img, .bs-rich video, .bs-rich iframe, .bs-rich embed, .bs-rich object { max-width: 100%; height: auto; }
.bs-rich figure, .bs-rich .wp-caption, .bs-rich .wp-block-image, .bs-rich .wp-block-embed { max-width: 100% !important; width: auto !important; margin-left: 0; margin-right: 0; }
.bs-rich .wp-caption img { display: block; margin: 0 auto; }
.bs-rich .wp-caption-text { font-size: 14px; color: var(--bs-gray); text-align: center; }
.bs-rich table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.bs-rich pre { max-width: 100%; overflow-x: auto; }
