/**
 * Layout compensation for <mind-header>.
 *
 * Hand-written, NOT generated - unlike brand-override.css and
 * font-override.css. Nothing regenerates this file.
 *
 * The header pins itself with position:fixed from inside its shadow root, so
 * it is out of the document flow and page content would otherwise start
 * underneath it. The shadow boundary works both ways: we cannot style the
 * header from here, and it cannot reserve space for itself out there. The
 * offset has to be declared on our side.
 *
 * Heights are the front-end dev's stated figures (~72px mobile, ~96px
 * desktop) plus the 10-20px the header floats from the top. Kept in custom
 * properties so they can be tuned in one place once it is on screen.
 */

:root {
  --mind-header-height: 92px;   /* 72 tall + ~20 offset */
}

@media (min-width: 992px) {
  :root {
    --mind-header-height: 116px; /* 96 tall + ~20 offset */
  }
}

/**
 * Applied to <main> rather than <body>.
 *
 * Drupal's admin toolbar sets `padding-top` on body inline via JavaScript for
 * logged-in users, which would fight this rule and win. <main> is untouched
 * by the toolbar, so the offset survives whether or not someone is logged in.
 */
main[role="main"] {
  padding-top: var(--mind-header-height);
}

/**
 * Anchor links and in-page jumps would otherwise land beneath the fixed
 * header. Costs nothing and prevents a class of "the link goes to the wrong
 * place" bug that is tedious to diagnose later.
 */
html {
  scroll-padding-top: var(--mind-header-height);
}
