/* The few rules this site adds to the Vibey stylesheet: the teaching scenes, tables that read as tables, and a readable measure. */
.col-md-9 { max-width: 62rem; }

/* The scenes. */
blockquote { margin: 1.5rem 0; padding: .25rem 1.25rem; border-left: .25rem solid var(--bs-primary, #4c6ef5); }
blockquote p { margin: .6rem 0; }
blockquote strong:first-child { letter-spacing: .01em; }

/* Tables. A wide table scrolls inside itself instead of widening the page. The Vibey stylesheet keeps every cell on
   one line and leaves the colour of the striped rows unset, which made prose run off the edge and every other row black. */
table { display: block; max-width: 100%; overflow-x: auto; }
.table.table-striped, .table.table-hover, .table { --bs-table-striped-color: var(--bs-table-color); --bs-table-hover-color: var(--bs-table-color); }
th, td { white-space: normal; vertical-align: top; }
td { min-width: 7rem; }
td code, th code, p code, li code { white-space: normal; overflow-wrap: break-word; word-break: normal; }
pre code { white-space: pre; }

/* A heading's permalink shows only when the heading is pointed at. */
.headerlink { opacity: 0; margin-left: .35rem; text-decoration: none; }
:is(h1, h2, h3, h4, h5, h6):hover > .headerlink { opacity: .55; }

/* The navigation menus. Bootstrap sets each menu's own background from a variable, and the Vibey theme makes it
   transparent, so the page text showed through the items. Each menu gets a solid background in the colours of the
   current theme, set on the menu itself, and a long menu scrolls. */
.dropdown-menu, [data-bs-theme="light"] .dropdown-menu {
  --bs-dropdown-color: #17324d;
  --bs-dropdown-link-hover-bg: #eef5fa;
  --bs-dropdown-border-color: #c6cbda;
  background-color: #ffffff !important;
  color: #17324d;
}
[data-bs-theme="dark"] .dropdown-menu {
  --bs-dropdown-color: #f7f8ff;
  --bs-dropdown-link-hover-bg: #1c2542;
  --bs-dropdown-border-color: #252e4b;
  background-color: #0f1424 !important;
  color: #f7f8ff;
}
.dropdown-menu {
  opacity: 1;
  border: 1px solid var(--bs-dropdown-border-color);
  border-radius: .6rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  max-height: 70vh;
  overflow-y: auto;
  padding: .4rem 0;
  min-width: 16rem;
}
.dropdown-menu .dropdown-item {
  color: var(--bs-dropdown-color) !important;
  padding: .45rem 1rem;
  white-space: normal;
}
.dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus {
  background-color: var(--bs-dropdown-link-hover-bg) !important;
}
