/* LeanOS site composition. Parts and values come unmodified from the design system (tokens.css, components.css);
   this file only arranges the site's header, footer and anchors. */

/* Header (IA navigation.json): the wordmark, three family menus that open on click (family page, then its products),
   then Custom builds, Blog and Referrals. Under 720 px the labelled Menu lists the same, family by family. */
.site-nav__trigger { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0; background: none; border: 0; color: var(--text-secondary); font: inherit; cursor: pointer; min-height: 24px; }
.site-nav__trigger:hover, .site-nav__trigger[aria-expanded="true"], .site-nav__trigger[aria-current] { color: var(--text); }
.site-nav__trigger[aria-current] { box-shadow: 0 2px 0 var(--signal); padding-block: 2px; }
.site-nav__family .menu { min-width: var(--measure-3); }
.site-nav__phone { display: none; }
.site-nav__group { margin: var(--space-3) 0 0; font: 400 var(--size-label)/var(--leading-heading) var(--font-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin-bottom: var(--space-6); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 24px; color: var(--text-secondary); text-decoration: none; font: 400 var(--size-meta)/var(--leading-heading) var(--font-label); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__mark { --logo-height: 24px; min-height: 24px; align-items: center; }
@media (min-width: 45.0001em) {
  .site-header .header__row { display: grid; grid-template-columns: 1fr auto 1fr; }
  .site-header .header__nav { justify-self: center; }
}

/* Menus: inside a family list the current page is marked by weight and the signal light in the left padding, never by
   the header's underline; names keep one left edge. Under 720 px the header keeps its row when the Menu opens. */
.header__nav a.menu__item[aria-current]:not(.button), .header__nav .site-nav__phone a[aria-current]:not(.button) { position: relative; box-shadow: none; justify-content: flex-start; padding-block: var(--space-2); color: var(--text); font-weight: var(--weight-strong); }
.header__nav .menu__item[aria-current]::before, .header__nav .site-nav__phone a[aria-current]::before { content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: var(--radius-round); background: var(--signal); }
@media (max-width: 45em) {
  .site-nav__family { display: none; }
  .site-nav__phone { display: grid; padding-bottom: var(--space-2); border-bottom: var(--line) solid var(--line-regular); margin-bottom: var(--space-2); }
  .header__nav .site-nav__phone a { padding-left: var(--space-4); }
  .site-header .header__row { display: grid; grid-template-columns: 1fr auto; align-items: center; align-content: start; }
  .site-header .header__row > .wordmark, .site-header .header__toggle { min-height: var(--header-height); display: inline-flex; align-items: center; }
  .site-header .header__toggle { min-height: 44px; }
  .site-header .header__nav { grid-column: 1 / -1; padding-bottom: var(--space-4); }
}

/* Anchors land below the sticky header. */
[id] { scroll-margin-top: calc(var(--header-height) + var(--space-4)); }
/* Long words in headings break rather than widen the page when text is enlarged (WCAG 1.4.4 at 320 px). */
.display, .title, .heading { overflow-wrap: anywhere; }
/* Inline exact names (a path, a skill) break inside running text rather than widen it. */
p .code, li .code, td .code, dd .code { overflow-wrap: anywhere; }

/* The footer stays at the foot of the window when a page is shorter than the window */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
