/*
 * Extra stylesheet for the generated docs.
 *
 * Doxygen loads it after doxygen.css (HTML_EXTRA_STYLESHEET), so it only overrides
 * single properties and never replaces the default sheet. That keeps it safe across
 * Doxygen upgrades.
 */

/*
 * Global font size, +10%.
 *
 * Doxygen sets one base size that most of its other rules scale from with
 * percentages, so raising that single value carries through body text, tables and
 * lists. The navigation tree is the exception: it does not read the base size but
 * three custom properties of its own, raised by the same 10% below.
 */
body, table, div, p, dl
{
	font-size: 15.4px;      /* 14px x 1.1 */
	line-height: 24.2px;    /* 22px x 1.1, keeps the original ratio */
}

/* Both themes declare these; one rule matches the specificity of the dark selector. */
html, html.dark-mode
{
	--nav-font-size-level1: 14.3px;   /* 13px x 1.1 */
	--nav-font-size-level2: 11px;     /* 10px x 1.1 */
	--nav-font-size-level3: 9.9px;    /*  9px x 1.1 */
}

/*
 * Header logo.
 *
 * Doxygen puts the image in the header but sets no size on it, so the file would
 * render at its own intrinsic size. This one declares a square 38pt while its
 * viewBox is 70 x 38, so left alone it draws the fox letterboxed inside a square,
 * with dead space above and below. Pinning the height and letting the width follow
 * restores the real proportions. Change the height alone to resize it.
 */
#projectlogo img
{
	height: 44px;
	width: auto;

	/*
	 * An inline image sits on the baseline of its line box, which leaves a gap
	 * under it the size of a descender. Block removes that, so the height above
	 * is the whole space the image takes.
	 */
	display: block;
}

/*
 * Top-align the logo with the title.
 *
 * The header is a table row of a fixed 56px, taller than either cell needs.
 * Doxygen hangs the logo off the bottom of it and centres the text block, so the
 * two line up with nothing. Sending both to the top puts the logo and the first
 * line of the title on the same edge.
 */
#projectlogo,
#projectalign
{
	vertical-align: top;
}

/*
 * Breathing room above the header.
 *
 * Doxygen starts the title flush against the top of the page (its own rule is
 * `padding: 0 0 0 5px`). The padding goes on the whole title area rather than on
 * the title cell, so the logo moves down with it and the two stay top-aligned.
 */
#titlearea
{
	padding-top: 10px;
}

/*
 * Optical position of the logo.
 *
 * Top-aligning the two cells lines up their boxes, but not what the eye sees: the
 * title's box starts above the letters, because text carries leading over the cap
 * height, so the fox reads as sitting too low against it. This lifts it by that
 * amount. `position: relative` shifts only the painted image and leaves the
 * header's height alone, so the rest of the page does not move.
 *
 * This is the knob for the vertical position: more negative moves the logo up.
 */
#projectlogo img
{
	position: relative;
	top: -10px;
}
