/* Original look, with one rule set so every page matches. */
:root { --md-primary-fg-color: #116dff; --md-primary-fg-color--dark: #0b4fc2; --md-accent-fg-color: #116dff; }

/* Images */
.md-typeset img { border: 1px solid var(--md-default-fg-color--lightest); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08); margin: 0; display: block; }
.md-typeset p:has(> img), .md-typeset p:has(> a.glightbox) { margin: .6rem 0 1rem; }
.md-typeset a.glightbox { display: block; line-height: 0; }
.md-typeset figure { margin: .6rem 0 1rem; }
.md-typeset figure img { margin-bottom: .4rem; }
.md-typeset figcaption { font-size: .72rem; font-weight: 600; color: var(--md-default-fg-color--light); }

/* Sidebar: every section title (and the site title) looks identical; only the current page is blue */
.md-nav--primary .md-nav__title,
.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
  color: var(--md-default-fg-color--light);
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.md-nav__link--active { font-weight: 600; }

/* Sidebar spacing: identical on every page.
   Material adds 8px of bottom padding to the nav list, which makes the sidebar 8px taller than its box.
   On pages near the bottom (Contact, Plans...) it then auto-scrolls by 8px, pushing "Home" up under the
   site title and changing the Home -> Dashboard gap. Remove the overflow so nothing ever shifts. */
.md-sidebar--primary .md-nav--primary > .md-nav__list { padding-bottom: 0; }
/* The site title is sticky by default and its background covers "Home" whenever the sidebar scrolls.
   Let it scroll with the list so Title -> Home -> Dashboard spacing is the same at any scroll position. */
.md-sidebar--primary .md-nav--primary > .md-nav__title { position: static; background: none; box-shadow: none; }

/* Headings: same weight, color and spacing on every page */
.md-typeset h1, .md-typeset h2, .md-typeset h3 { color: var(--md-default-fg-color); font-weight: 700; letter-spacing: -.01em; }
.md-typeset h1 { font-size: 2rem; margin: 0 0 1rem; }
.md-typeset h2 { font-size: 1.45rem; margin: 1.8rem 0 .6rem; }
.md-typeset h3 { font-size: 1.1rem; margin: 1.3rem 0 .5rem; }
.md-typeset h1 + p, .md-typeset h2 + p, .md-typeset h3 + p { margin-top: .5rem; }

/* Cards, tables and notes */
.md-typeset .grid.cards > ul > li { border-radius: 8px; border: 1px solid var(--md-default-fg-color--lightest); }
.md-typeset .grid.cards > ul > li:hover { border-color: var(--md-primary-fg-color); box-shadow: 0 2px 8px rgba(17,109,255,.18); }
.md-typeset .grid.cards .twemoji { color: var(--md-primary-fg-color); }
.md-typeset table:not([class]) { border-radius: 8px; }
.md-typeset .admonition, .md-typeset details { border-radius: 8px; }

/* Sidebar: the top-level Contact link sits right under the last section, like every other link */
.md-nav--primary > .md-nav__list > .md-nav__item--section:has(+ .md-nav__item:last-child:not(.md-nav__item--section)) { margin-bottom: 0; }
.md-typeset .admonition, .md-typeset details { margin: 1rem 0; }
