/* The version number sits on the charcoal navbar in both themes, so the
   default muted grey is too dark in light mode. */
.navbar .nav-text.text-muted {
  color: rgba(245, 240, 232, 0.65) !important;
}

/* Collapsible <details> blocks styled like a note callout. */
details {
  border: 1px solid #ddd5c6;
  border-left: 4px solid #398a9d;
  border-radius: 6px;
  padding: 0.6em 1em;
  margin: 1em 0;
  background: #fbf8f2;
}

details > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  content: "\25B6";
  color: #398a9d;
  display: inline-block;
  margin-right: 0.5em;
  font-size: 0.8em;
  transition: transform 0.15s ease;
}

details[open] > summary::before {
  transform: rotate(90deg);
}

details[open] > summary {
  margin-bottom: 0.6em;
  border-bottom: 1px solid #e8e1d4;
  padding-bottom: 0.4em;
}

/* Formula box: a result or formula set apart from the text, in the same
   colours as the <details> callout. */
.formula-box {
  border: 1px solid #ddd5c6;
  border-left: 4px solid #398a9d;
  border-radius: 6px;
  padding: 0.4em 1em;
  margin: 1em 0;
  background: #fbf8f2;
}

/* Content tables: rounded outer border, tinted header row, comfortable
   padding. Ported from the polished site. */
table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1.25px solid #ddd5c6;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.92rem;
}

table thead th {
  background-color: #ede7db;
  color: #2c2c2a;
  border-bottom: 1.5px solid #cfc6b5;
  font-weight: 600;
  text-align: left;
}

table td,
table th {
  padding: 6px 10px;
}

/* pkgdown makes tables full-width blocks; size each one to its content, so a
   few short numbers are not spread across the page. Wide tables still scroll. */
main table.table {
  width: fit-content;
  max-width: 100%;
}

/* pandoc gives wide pipe tables equal column widths; let each column take the
   width its content needs instead */
main table.table col {
  width: auto !important;
}

/* Dark mode: pkgdown's light-switch sets [data-bs-theme="dark"] on <html>. */
[data-bs-theme="dark"] details {
  border-color: #3d3d3a;
  border-left-color: #7fc3d3;
  background: #242422;
}

[data-bs-theme="dark"] .formula-box {
  border-color: #3d3d3a;
  border-left-color: #7fc3d3;
  background: #242422;
}

[data-bs-theme="dark"] details > summary::before {
  color: #7fc3d3;
}

[data-bs-theme="dark"] details[open] > summary {
  border-bottom-color: #3d3d3a;
}

[data-bs-theme="dark"] table {
  border: 1.25px solid #3d3d3a;
}

[data-bs-theme="dark"] table thead th {
  background-color: #2c2c2a;
  color: #f5f0e8;
  border-bottom: 1.5px solid #444441;
}

/* The logo and the page heading already name the package, so the navbar
   leaves out the name and links home through the home icon. */
.navbar-brand {
  display: none;
}
