/* One gold title-box style per heading level, shared across the site. */
html body h1.gold-heading { --heading-size: 1.6rem; }
html body h2.gold-heading { --heading-size: 1.3rem; }
html body h3.gold-heading { --heading-size: 1.15rem; }
html body h4.gold-heading { --heading-size: 1rem; }

html body :is(h1, h2, h3, h4).gold-heading {
  box-sizing: border-box;
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 1 auto !important;
  margin-inline: auto !important;
  padding: 2px 12px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: #FFCC00 linear-gradient(#FFCC00, #FFCC00) !important;
  color: #000000 !important;
  font-family: 'Inter', Arial, Helvetica, sans-serif !important;
  font-size: var(--heading-size) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-align: center !important;
  text-transform: none !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
/* Nested links and spans inherit the title's size instead of adding a second box. */
html body :is(h1, h2, h3, h4).gold-heading :is(a.standalone-link[href], a, span, strong, b, em, font) {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  color: #000000 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  max-width: 100% !important;
  min-height: 0 !important;
  text-transform: inherit !important;
}
html body .gold-heading a[href] {
  display: inline !important;
  width: auto !important;
  white-space: normal !important;
}
html body a.gold-heading-link[href] {
  padding: 0 !important;
  border: 0 !important;
  margin-inline: auto !important;
  max-width: 100% !important;
}

/* Centre the title once its flanking lines have been removed. */
html body .heading-row {
  justify-content: center !important;
  gap: 0 !important;
}
html body .heading-row::before,
html body .heading-row::after,
html body .gold-heading::before,
html body .gold-heading::after,
html body .gold-heading :is(.theme-link-solid, .theme-link-hollow)::before,
html body .gold-heading :is(.theme-link-solid, .theme-link-hollow)::after,
html body .gold-heading-link::before,
html body .gold-heading-link::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 500px) {
  html body h1.gold-heading { --heading-size: 1.25rem; }
  html body h2.gold-heading { --heading-size: 1.125rem; }
  html body h3.gold-heading { --heading-size: 1rem; }
  html body h4.gold-heading { --heading-size: 0.95rem; }
}
