/* =========================================================================
   SWVT Brand OS — v3 stylesheet
   Inspired by Walmart Brand Center: floating navy header, bright blue hero,
   large rounded swatches, generous Inter typography.
   ========================================================================= */

/* Fonts: native system stack — no external font imports.
   RTL/Arabic overrides the var stack with sans fonts that include Arabic glyphs
   (Segoe UI on Windows, Tahoma on macOS) so bold Arabic never falls back to
   a Naskh serif like Geeza Pro. */
html[dir="rtl"] {
  --ff-display: "Segoe UI", Tahoma, system-ui, -apple-system, Arial, sans-serif;
  --ff-sans:    "Segoe UI", Tahoma, system-ui, -apple-system, Arial, sans-serif;
}
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
  font-family: "Segoe UI", Tahoma, system-ui, -apple-system, Arial, sans-serif;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --brand:           #0F5BD4;   /* SWVT Brand Blue */
  --brand-600:       #0B4FBE;   /* hover */
  --brand-700:       #0A44A4;
  --brand-deep:      #0A2A66;   /* deep navy — header pill, body text */
  --brand-sky:       #A9DDF7;   /* sky blue */
  --brand-everyday:  #4DBDF5;   /* bright cyan */
  --brand-soft:      #E8F1FF;
  --yellow:          #FFC220;
  --yellow-deep:     #E2A800;

  /* Surfaces & ink */
  --bg:              #FFFFFF;
  --surface:         #FFFFFF;
  --surface-2:       #F6F8FC;
  --ink:             var(--brand-deep);
  --ink-2:           #3C4858;
  --muted:           #7A8AA5;
  --muted-2:         #A9B3C5;
  --hairline:        #E2E7EE;
  --hairline-2:      #D2D9E3;

  /* Semantic */
  --success:         #128A4D;
  --danger:          #C0392B;
  --warn:            #C97A0E;

  /* Type — system-ui stack */
  --ff-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-sans:    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Compatibility aliases (older selectors still in HTML) */
  --paper:    var(--bg);
  --white:    #FFFFFF;
  --mist:     var(--hairline);
  --fog:      var(--hairline-2);
  --concrete: var(--muted);
  --steel:    var(--ink-2);
  --graphite: var(--ink);
  --forge:    var(--ink);
  --signal:   var(--brand);
  --voltage:  var(--brand-everyday);
  --hivis:    var(--yellow);
  --verified: var(--success);
  --alert:    var(--danger);
  --ink-soft: var(--ink-2);
  --ink-mute: var(--muted);
  --rule:     var(--hairline);
  --rule-strong: var(--ink);
  --accent:   var(--brand);
  --yellow-soft: #FFF1B8;
  --yellow-ink:  #6B5400;
  --success-soft: #E3F5EA;
  --warn-soft:    #FFF1DA;

  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --rail-w: 260px;
  --header-h: 72px;
  --header-margin: 16px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
hr { border: 0; height: 1px; background: var(--hairline); margin: 0; }
code {
  font-family: var(--ff-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--brand-deep);
}

/* =========================================================================
   HEADER — full-width bright-blue bar with nav
   ========================================================================= */
.bs-top {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  background: #0053E2;
  color: #FFFFFF;
  border-radius: 0;
  height: var(--header-h);
}
.bs-top__inner {
  position: relative;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 40px);
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
/* Search sits dead-center of the header, independent of side widths */
.bs-top__inner > .bs-search {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
/* The 3rd grid track is just flexible empty space the absolute search floats over */
.bs-top__inner > .bs-sections { justify-self: start; }
.bs-top__inner > .bs-topnav { justify-self: end; }
@media (max-width: 1240px) {
  /* not enough room to float-center — return search to normal flow */
  .bs-top__inner > .bs-search {
    position: static;
    transform: none;
    left: auto; top: auto;
    grid-column: 3;
    width: 100%;
    justify-self: stretch;
  }
}

/* Sections launcher (2×2 grid icon + dropdown) */
.bs-sections { position: relative; display: inline-flex; align-items: center; gap: 6px; }
/* Back-to-all-sections button — only visible once a section is chosen */
.bs-sections__back {
  display: none;
  width: 40px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.14);
  color: #FFFFFF;
  flex: 0 0 auto;
  transition: background 160ms ease;
}
.bs-sections__back:hover { background: rgba(255,255,255,0.26); }
.bs-sections__back svg { width: 20px; height: 20px; }
.bs-sections.is-chosen .bs-sections__back { display: inline-flex; }
html[dir="rtl"] .bs-sections__back svg { transform: scaleX(-1); }
.bs-sections__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px 0 13px;
  border-radius: 6px;
  background: rgba(255,255,255,0.14);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 160ms ease;
}
.bs-sections__btn:hover,
.bs-sections.is-open .bs-sections__btn { background: rgba(255,255,255,0.24); }
.bs-sections__btn svg { width: 21px; height: 21px; }
.bs-sections__btn .bs-sections__gridicon { width: 22px; height: 22px; flex: 0 0 auto; }
.bs-sections__btn .bs-sections__caret {
  width: 13px; height: 13px; opacity: 0.85;
  transition: transform 200ms ease;
}
.bs-sections.is-open .bs-sections__caret { transform: rotate(180deg); }

/* Full-page dark overlay behind the open menu (sits below header, above page) */
.bs-sections__overlay {
  position: fixed;
  left: 0; right: 0;
  top: var(--header-h);
  bottom: 0;
  background: rgba(8, 20, 48, 0.55);
  display: none;
  z-index: 40;
}
.bs-sections.is-open .bs-sections__overlay { display: block; }

.bs-sections__panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: min(620px, calc(100vw - 32px));
  background: #FFFFFF;
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid var(--hairline);
  padding: 16px;
  display: none;  z-index: 60;
}
.bs-sections.is-open .bs-sections__panel { display: block; }
.bs-sections__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 4px 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.bs-sections__head h3 { margin: 0; font-family: var(--ff-display); font-size: 15px; font-weight: 700; color: var(--brand-deep); }
.bs-sections__head span { font-size: 12px; color: var(--muted); }
.bs-sections__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.bs-sections__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 4px;
  transition: background 150ms ease;
}
.bs-sections__item:hover { background: var(--brand-soft); }
.bs-sections__ico {
  width: 44px; height: 44px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  transition: background 150ms ease, color 150ms ease;
}
.bs-sections__item:hover .bs-sections__ico { background: var(--brand); color: #FFFFFF; }
.bs-sections__item:hover .bs-sections__t { color: var(--brand); }
.bs-sections__ico svg { width: 22px; height: 22px; }
.bs-sections__t {
  display: block;
  font-family: var(--ff-display);
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--brand-deep);
  line-height: 1.2;
}
.bs-sections__d {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}
@media (max-width: 600px) {
  .bs-sections__btn span { display: none; }
  .bs-sections__btn { padding: 0 12px; }
  .bs-sections__grid { grid-template-columns: 1fr; }
}

/* ===== Mega-menu: two-pane (sections list + preview) ===== */
.bs-sections__panel--mega { width: min(880px, calc(100vw - 180px)); }
.bs-sections__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
}
.bs-sections__panel--mega .bs-sections__grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 10px;
  border-right: 1px solid var(--hairline);
}
.bs-sections__panel--mega .bs-sections__item {
  grid-template-columns: 40px 1fr auto;
}
.bs-sections__item.is-active { background: var(--brand-soft); }
.bs-sections__item.is-active .bs-sections__ico { background: var(--brand); color: #FFFFFF; }
.bs-sections__item.is-active .bs-sections__t { color: var(--brand); }
.bs-sections__chev {
  width: 16px; height: 16px;
  color: var(--muted-2);
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}
.bs-sections__item:hover .bs-sections__chev,
.bs-sections__item.is-active .bs-sections__chev { opacity: 1; color: var(--brand); }

.bs-sections__preview { position: relative; padding: 6px 6px 6px 12px; min-height: 220px; }
.bs-sections__pane { display: none; }
.bs-sections__pane.is-active { display: block; animation: bs-fade 180ms ease; }
@keyframes bs-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.bs-sections__pane-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.bs-sections__pane-ico {
  width: 34px; height: 34px; border-radius: 5px;
  background: var(--brand); color: #FFFFFF;
  display: grid; place-items: center;
}
.bs-sections__pane-ico svg { width: 18px; height: 18px; }
.bs-sections__pane-title {
  font-family: var(--ff-display); font-weight: 700; font-size: 15px;
  color: var(--brand-deep); letter-spacing: -0.01em;
}
.bs-sections__links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.bs-sections__links a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 5px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background 140ms ease, color 140ms ease;
}
.bs-sections__links a::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted-2); flex: 0 0 auto; transition: background 140ms ease;
}
.bs-sections__links a:hover { background: var(--brand-soft); color: var(--brand); }
.bs-sections__links a:hover::before { background: var(--brand); }

/* Clicked (selected) state: emphasize the chosen item + its pane */
.bs-sections__panel--mega.is-selected .bs-sections__item:not(.is-active) { opacity: 0.5; }
.bs-sections__panel--mega.is-selected .bs-sections__item.is-active {
  box-shadow: inset 3px 0 0 var(--brand);
}
.bs-sections__panel--mega.is-selected .bs-sections__preview {
  background: var(--brand-soft);
  border-radius: 6px;
}
html[dir="rtl"] .bs-sections__panel--mega.is-selected .bs-sections__item.is-active {
  box-shadow: inset -3px 0 0 var(--brand);
}

/* RTL: flip chevrons + borders */
html[dir="rtl"] .bs-sections__chev { transform: scaleX(-1); }
html[dir="rtl"] .bs-sections__panel--mega .bs-sections__grid { border-right: 0; border-left: 1px solid var(--hairline); padding-right: 0; padding-left: 10px; }
html[dir="rtl"] .bs-sections__preview { padding: 6px 12px 6px 6px; }
/* RTL: the dropdown opens toward the left (button sits on the right side of the header) */
html[dir="rtl"] .bs-sections__panel { left: auto; right: 0; text-align: right; }
html[dir="rtl"] .bs-sections__caret { /* caret stays vertical */ }
html[dir="rtl"] .bs-sections__links a { flex-direction: row; }
html[dir="rtl"] .bs-sections__pane-head { flex-direction: row; }
html[dir="rtl"] .bs-sections__head { direction: rtl; }

@media (max-width: 760px) {
  .bs-sections__panel--mega { width: min(440px, calc(100vw - 24px)); }
  .bs-sections__body { grid-template-columns: 1fr; }
  .bs-sections__panel--mega .bs-sections__grid { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--hairline); padding-bottom: 8px; margin-bottom: 8px; }
  html[dir="rtl"] .bs-sections__panel--mega .bs-sections__grid { border-left: 0; padding-left: 0; }
  .bs-sections__links { grid-template-columns: 1fr 1fr; }
}
.bs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
}
.bs-brand__mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bs-brand__mark svg, .bs-brand__mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.bs-brand__word {
  font-size: 24px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}
.bs-brand__suffix { display: none; }

/* Search box — white pill, fixed width next to logo */
.bs-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  height: 44px;
  width: clamp(260px, 30vw, 520px);
  margin: 0;
  background: #FFFFFF;
  color: var(--brand-deep);
  border-radius: 6px;
  border: 0;
  overflow: hidden;
  transition: box-shadow 160ms ease;
}
.bs-search:focus-within {
  box-shadow: 0 0 0 3px var(--yellow);
}
.bs-search__scope {
  display: grid; place-items: center;
  width: 40px; height: 100%;
  padding-left: 8px;
  color: var(--muted);
}
.bs-search__scope svg { width: 18px; height: 18px; }
.bs-search__scope select, .bs-search__btn { display: none; }
.bs-search__input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 18px 0 6px;
  font-family: var(--ff-sans);
  font-size: 14px;
  color: var(--brand-deep);
  min-width: 0;
  width: 100%;
}
.bs-search__input::placeholder { color: var(--muted); }

.bs-search__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #FFFFFF;
  color: var(--brand-deep);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  box-shadow: 0 16px 40px -16px rgba(10,42,102,0.25);
  padding: 6px 0;
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}
.bs-search.is-open .bs-search__panel { display: block; }
.bs-search__hit {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  width: 100%;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
}
.bs-search__hit:hover,
.bs-search__hit.is-focused { background: var(--surface-2); }
.bs-search__hit__num {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
}
.bs-search__hit__title { font-weight: 500; color: var(--brand-deep); }
.bs-search__hit__kind {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.bs-search__empty {
  padding: 16px 18px;
  font-size: 13px;
  color: var(--muted);
}

/* Top navigation links (with caret + active underline) */
/* Top navigation — social media icons */
.bs-topnav {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: clamp(6px, 1vw, 12px);
}
.bs-topnav a {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #FFFFFF;
  background: transparent;
  transition: background 160ms ease, transform 160ms ease;
}
.bs-topnav a:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.bs-topnav a svg { width: 20px; height: 20px; display: block; }
.bs-topnav a::after { content: none; }
.bs-cart { display: none; }
.bs-deliver, .bs-meta, .bs-topstrip { display: none; }

.bs-burger {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: #FFFFFF;
  background: rgba(255,255,255,0.16);
  transition: background 160ms ease;
}
.bs-burger:hover { background: rgba(255,255,255,0.28); }
.bs-burger__bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
}
.bs-burger__bars::before, .bs-burger__bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: #FFFFFF; border-radius: 2px;
}
.bs-burger__bars::before { top: -6px; }
.bs-burger__bars::after  { top:  6px; }
.bs-burger span:not(.bs-burger__bars) { display: none; }

@media (max-width: 1140px) {
  .bs-topnav { display: none; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .bs-search { width: 100%; }
  .bs-brand__word { display: none; }
}

/* =========================================================================
   HERO — full-bleed colored block (used on chapter covers)
   ========================================================================= */
:root { --header-h: 72px; }
.bs-hero {
  position: relative;
  margin-top: 0;
  padding: clamp(56px, 8vw, 96px) 0 0;
  overflow: hidden;
  text-align: center;
}
.bs-hero--blue { background: var(--brand); color: #FFFFFF; }
.bs-hero--sky  { background: var(--brand-sky); color: var(--brand-deep); }
.bs-hero--white { background: #FFFFFF; color: var(--brand-deep); }
.bs-hero--navy { background: var(--brand-deep); color: #FFFFFF; }

.bs-hero__title {
  margin: 0 0 64px;
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: inherit;
}
.bs-hero__title em { font-style: normal; font-weight: 400; color: var(--yellow); }

/* Tray of swatches peeking up from the bottom edge */
.bs-hero__tray {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.bs-hero__tray > div {
  aspect-ratio: 1 / 1;
  border-radius: 3px 24px 0 0;
  transform: translateY(20%);
}
@media (max-width: 720px) {
  .bs-hero__tray { gap: 8px; padding: 0 12px; }
  .bs-hero__tray > div { border-radius: 5px 16px 0 0; }
}

/* Lede paragraph block (white background, large semi-light copy) */
.bs-lede-section {
  background: var(--surface);
  padding: 96px 0 64px;
}
.bs-lede-section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.bs-lede-section p {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 28ch;
  color: var(--brand-deep);
}
.bs-lede-section__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  padding: 16px 28px;
  background: var(--brand);
  color: #FFFFFF;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  transition: background 160ms ease;
}
.bs-lede-section__cta:hover { background: var(--brand-600); }

/* =========================================================================
   PAGE SHELL — sidebar + article
   ========================================================================= */
.bs-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.bs-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  padding: 80px 0 160px;
  align-items: start;
}
@media (max-width: 880px) {
  .bs-shell { grid-template-columns: 1fr; gap: 24px; padding: 48px 0 96px; }
}

/* Sidebar */
.bs-rail {
  position: sticky;
  top: calc(var(--header-h) + var(--header-margin) * 2 + 32px);
}
@media (max-width: 880px) { .bs-rail { position: static; } }

.bs-rail__eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 24px;
}
.bs-rail__eyebrow span:nth-child(2) { display: none; }

.bs-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 0;
}
.bs-toc li { margin: 0; }
.bs-toc a {
  display: grid;
  grid-template-columns: 38px 14px 1fr;
  align-items: baseline;
  gap: 0;
  padding: 14px 0;
  font-size: 18px;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 400;
  transition: color 140ms ease;
}
.bs-toc a::before { display: none; }
.bs-toc a:hover { color: var(--brand-deep); }
.bs-toc a:hover .bs-toc__num,
.bs-toc a:hover .bs-toc__dash { color: var(--muted); }
.bs-toc a.is-active { color: var(--brand-deep); font-weight: 700; }
.bs-toc a.is-active .bs-toc__label { font-weight: 700; }
.bs-toc__num {
  display: block;
  font-size: 16px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: 0;
}
.bs-toc__dash {
  display: block;
  color: var(--muted-2);
  font-weight: 400;
  text-align: left;
}
.bs-toc__label { display: block; line-height: 1.4; }
.bs-toc__arrow { display: none; }

.bs-titleblock { display: none; } /* drawing title block retired in this version */

.bs-rail details > summary { display: none; }
@media (max-width: 880px) {
  .bs-rail details > summary {
    display: flex;
    align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface-2);
    border-radius: 4px;
    font-weight: 600; font-size: 14px;
    cursor: pointer;
  }
  .bs-rail details > summary::-webkit-details-marker { display: none; }
  .bs-rail details[open] > summary { margin-bottom: 8px; }
  .bs-rail__eyebrow { display: none; }
  .bs-toc { padding: 8px 16px; }
}

/* Article */
.bs-article { min-width: 0; }
.bs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}
.bs-eyebrow__num { color: var(--brand); font-weight: 600; }
.bs-eyebrow__bar { width: 32px; height: 1px; background: var(--hairline-2); }
.bs-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--brand-deep);
  margin: 0 0 24px;
}
.bs-lede {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--brand-deep);
  margin: 0 0 64px;
  max-width: 32ch;
}

/* Section titles & body */
.bs-section { margin: 0 0 96px; scroll-margin-top: calc(var(--header-h) + var(--header-margin) * 2 + 16px); }
.bs-section:first-of-type { margin-top: 8px; }
.bs-section + .bs-section { border-top: 0; padding-top: 0; }
.bs-section__head { display: block; margin-bottom: 24px; }
.bs-section__num { display: none; }
.bs-section__title {
  margin: 0 0 24px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
}
.bs-section__title::before { content: none; }
.bs-section__desc {
  margin: 0 0 48px;
  max-width: 60ch;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.55;
  color: var(--brand-deep);
}

.bs-indent { display: block; }
.bs-indent__body { display: block; }
.bs-h3 {
  margin: 56px 0 16px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.015em;
  color: var(--brand-deep);
}

.bs-body { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }
.bs-body p { margin: 0 0 16px; }
.bs-body strong { color: var(--brand-deep); font-weight: 600; }

/* =========================================================================
   SWATCH — large rounded color tile
   ========================================================================= */
.bs-swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 48px;
}
.bs-swatch-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .bs-swatch-grid, .bs-swatch-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bs-swatch-grid, .bs-swatch-grid--2 { grid-template-columns: 1fr; }
}

.bs-swatch {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--swatch, var(--surface));
  color: var(--swatch-ink, var(--brand-deep));
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 200ms ease;
}
.bs-swatch:hover { transform: translateY(-2px); }
.bs-swatch--ring { border-color: var(--brand-deep); }
.bs-swatch__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bs-swatch__role {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
}
.bs-swatch__values {
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0;
  display: flex; flex-direction: column;
  gap: 0;
}
.bs-swatch__values span {
  display: block;
  font-family: var(--ff-sans);
}
.bs-swatch__copy {
  position: absolute;
  bottom: 28px;
  right: 28px;
  width: 24px; height: 24px;
  opacity: 0.6;
  text-indent: -9999px;
  background:
    linear-gradient(currentColor, currentColor) 0 0/14px 14px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 4px/14px 14px no-repeat;
  -webkit-mask:
    linear-gradient(#000,#000) 0 0/14px 14px no-repeat,
    linear-gradient(#000,#000) 4px 4px/14px 14px no-repeat;
}
/* Pretty copy icon as inline SVG */
.bs-swatch__copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='8' width='12' height='12' rx='2' fill='none' stroke='black' stroke-width='1.8'/><rect x='4' y='4' width='12' height='12' rx='2' fill='none' stroke='black' stroke-width='1.8'/></svg>") center / 22px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='8' width='12' height='12' rx='2' fill='none' stroke='black' stroke-width='1.8'/><rect x='4' y='4' width='12' height='12' rx='2' fill='none' stroke='black' stroke-width='1.8'/></svg>") center / 22px no-repeat;
}
.bs-swatch__copy:hover { opacity: 1; }
.bs-swatch.is-copied .bs-swatch__copy::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12l5 5L20 6' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 22px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12l5 5L20 6' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 22px no-repeat;
}

/* =========================================================================
   PAIRING TILE — solid-background type sample
   ========================================================================= */
.bs-pairings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 48px;
}
@media (max-width: 720px) { .bs-pairings { grid-template-columns: 1fr; } }
.bs-pair {
  position: relative;
  background: var(--p-bg, var(--surface));
  color: var(--p-ink, var(--brand-deep));
  aspect-ratio: 5 / 3;
  border-radius: 3px;
  padding: 36px;
  display: grid;
  place-content: center start;
  overflow: hidden;
}
.bs-pair__a {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(64px, 9vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.bs-pair__mark {
  position: absolute;
  right: 24px; bottom: 24px;
  width: 36px; height: 36px;
}
.bs-pair__mark svg { width: 100%; height: 100%; }
.bs-pair--ring { box-shadow: inset 0 0 0 1px var(--brand-deep); }

/* =========================================================================
   ACCESSIBILITY TABLE
   ========================================================================= */
.bs-a11y-wrap { overflow-x: auto; margin: 24px 0 48px; }
.bs-a11y {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.bs-a11y th, .bs-a11y td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.bs-a11y th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid var(--brand-deep);
}
.bs-a11y .mini {
  display: inline-block;
  width: 32px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  vertical-align: middle;
}
.bs-a11y .chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.bs-a11y .chip--pass { background: var(--success-soft); color: var(--success); }
.bs-a11y .chip--warn { background: var(--warn-soft); color: var(--warn); }
.bs-a11y .chip--fail { background: #FBE7E5; color: var(--danger); }

/* =========================================================================
   DON'TS — rule cards
   ========================================================================= */
.bs-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 48px; }
@media (max-width: 720px) { .bs-rules { grid-template-columns: 1fr; } }
.bs-rule {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 24px;
  border: 0;
}
.bs-rule__head {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.bs-rule__head--do  { color: var(--success); }
.bs-rule__head--no  { color: var(--danger); }
.bs-rule__head .dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
}
.bs-rule__body { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.bs-rule__demo { margin: 16px 0; border-radius: 4px; overflow: hidden; }

/* =========================================================================
   GENERIC GRIDS (kept compatible with older pages)
   ========================================================================= */
.bs-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bs-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bs-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 880px) { .bs-grid-3, .bs-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bs-grid-2, .bs-grid-3, .bs-grid-4 { grid-template-columns: 1fr; } }

/* =========================================================================
   PROMO ROW — 4 chapter-overview photo cards under the hero/lede
   ========================================================================= */
.bs-promo {
  background: var(--surface);
  padding: 16px 0 32px;
}
.bs-promo__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.bs-promo__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.bs-promoCard {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 3px;
  overflow: hidden;
  padding: clamp(18px, 2vw, 28px);
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--brand-deep);
  text-decoration: none;
  isolation: isolate;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.bs-promoCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -20px rgba(10,42,102,0.35);
}
.bs-promoCard__art { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.bs-promoCard__art img { width: 100%; height: 100%; object-fit: cover; }
.bs-promoCard__scrim {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(10,42,102,0.05) 0%, rgba(10,42,102,0.55) 60%, rgba(10,42,102,0.85) 100%);
}
.bs-promoCard--photo { color: #FFFFFF; }
.bs-promoCard--photo .bs-promoCard__title { color: #FFFFFF; text-shadow: 0 1px 24px rgba(0,0,0,0.35); }
.bs-promoCard--photo .bs-promoCard__sub { color: rgba(255,255,255,0.92); }
.bs-promoCard__head { position: relative; z-index: 1; }
.bs-promoCard__foot { position: relative; z-index: 1; }
.bs-promoCard__title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.bs-promoCard__sub {
  margin-top: 10px;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.45;
  font-weight: 400;
  opacity: 0.92;
}
.bs-promoCard__cta {
  display: inline-flex; align-items: center;
  margin-top: 14px;
  background: var(--yellow);
  color: var(--brand-deep);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
}
.bs-promoCard__foot--meta {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.bs-promoCard--yellow { background: var(--yellow); color: var(--brand-deep); }
.bs-promoCard--brand { background: var(--brand); color: #FFFFFF; }
.bs-promoCard--ink { background: var(--brand-deep); color: #FFFFFF; }
.bs-promoCard--white { background: #FFFFFF; border: 1px solid var(--hairline); }
@media (max-width: 1100px) {
  .bs-promo__row { grid-template-columns: repeat(4, 78%); overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
  .bs-promoCard { scroll-snap-align: start; aspect-ratio: 4/5; }
}
@media (max-width: 720px) { .bs-promo__row { grid-template-columns: repeat(4, 86%); } }

.bs-slider { display: none; }

/* =========================================================================
   FOOTER — removed per design
   ========================================================================= */
.bs-footer { display: none; }

/* =========================================================================
   PAGER (prev / next)
   ========================================================================= */
.bs-pager {
  margin-top: 96px;
  border-top: 1px solid var(--hairline);
  padding-top: 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.bs-pager a {
  display: block;
  padding: 24px;
  border-radius: 5px;
  background: var(--surface-2);
  transition: background 160ms ease;
}
.bs-pager a:hover { background: var(--brand-soft); }
.bs-pager__label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.bs-pager__title { font-family: var(--ff-display); font-weight: 600; font-size: 18px; color: var(--brand-deep); }
.bs-pager__right { text-align: right; }

/* =========================================================================
   INDEX CARD GRID — used on landing page
   ========================================================================= */
.bs-index {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--hairline);
}
.bs-index__row {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--brand-deep);
  transition: padding 160ms ease;
}
.bs-index__row:hover { padding-left: 8px; }
.bs-index__num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bs-index__title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.015em;
}
.bs-index__desc { font-size: 14px; color: var(--muted); max-width: 44ch; }
.bs-index__arrow { color: var(--brand); font-size: 18px; transition: transform 160ms ease; }
.bs-index__row:hover .bs-index__arrow { transform: translateX(6px); }
@media (max-width: 720px) {
  .bs-index__row { grid-template-columns: 56px 1fr auto; }
  .bs-index__desc { display: none; }
}

/* =========================================================================
   LEGACY components used on other chapter pages — left functional, restyled
   ========================================================================= */
.bs-spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.bs-spec__cell { padding: 20px; border-right: 1px solid var(--hairline); }
.bs-spec__cell:last-child { border-right: 0; }
.bs-spec__k { font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.bs-spec__v { font-family: var(--ff-display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--brand-deep); }
@media (max-width: 720px) { .bs-spec { grid-template-columns: 1fr 1fr; } }

.bs-logoTile {
  position: relative;
  background: #FFFFFF;
  aspect-ratio: 4/3;
  border-radius: 3px;
  display: grid; place-items: center;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.bs-logoTile--dark { background: var(--brand-deep); border-color: var(--brand-deep); }
.bs-logoTile--signal { background: var(--brand); border-color: var(--brand); }
.bs-logoTile__label {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.bs-logoTile--dark .bs-logoTile__label,
.bs-logoTile--signal .bs-logoTile__label { color: rgba(255,255,255,0.7); }

.bs-lockup { background: #FFFFFF; border-radius: 6px; padding: 48px; display: grid; place-items: center; min-height: 220px; border: 1px solid var(--hairline); }
.bs-bgSample { aspect-ratio: 5 / 3; position: relative; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-radius: 6px; }
.bs-bgSample__eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.bs-bgSample__title { font-family: var(--ff-display); font-weight: 600; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1; max-width: 12ch; }

.bs-photo { position: relative; aspect-ratio: 5/3; border-radius: 6px; overflow: hidden; display: flex; align-items: end; padding: 28px; color: #FFFFFF; }
.bs-photo__overlay { position: absolute; inset: 0; }
.bs-photo__content { position: relative; z-index: 1; }
.bs-photo__eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.bs-photo__title { font-family: var(--ff-display); font-size: clamp(28px, 4vw, 44px); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; margin-top: 8px; }

.bs-icon { aspect-ratio: 1/1; border: 1px solid var(--hairline); border-radius: 5px; background: var(--surface); display: grid; place-items: center; position: relative; }
.bs-icon svg { width: 44%; height: 44%; }
.bs-icon__name { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.bs-mark-XL { font-family: var(--ff-display); font-weight: 800; font-size: clamp(96px, 18vw, 200px); letter-spacing: -0.04em; line-height: 0.8; color: var(--brand-deep); }
.bs-mark-XL em { font-style: italic; color: var(--brand); }

.bs-quote { font-family: var(--ff-display); font-size: clamp(28px, 4vw, 48px); font-weight: 400; line-height: 1.15; letter-spacing: -0.015em; color: var(--brand-deep); max-width: 22ch; }
.bs-quote em { color: var(--brand); font-style: normal; }

.bs-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.bs-stat__n { font-family: var(--ff-display); font-size: clamp(64px, 9vw, 120px); font-weight: 600; line-height: 0.9; letter-spacing: -0.04em; color: var(--brand-deep); }
.bs-stat__n em { color: var(--brand); font-style: normal; }
.bs-stat__c { color: var(--ink-2); max-width: 36ch; align-self: end; }

.bs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--surface-2); font-size: 12px; }

.bs-surface { border: 1px solid var(--hairline); background: #FFFFFF; border-radius: 6px; overflow: hidden; }
.bs-pair-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bs-pair-grid-3 .bs-pair { aspect-ratio: 5/3; }

/* =========================================================================
   PRINT
   ========================================================================= */
@media print {
  .bs-top, .bs-footer, .bs-pager, .bs-rail, .bs-hero__tray { display: none; }
  .bs-shell { display: block; padding: 0; }
}

/* hide legacy chapter chrome — chapters render inside the SWVT app shell */
.bs-top { display: none !important; }
