/* .header — the fixed bar on every page (rebuild spec §5.2).
   primitive tried: cluster (space-between gives equal gaps, so with the phone or EN | FR showing
   the nav sits left of the middle between brand and button: fails the ruled centring, layout
   check #49); with-sidebar (two pieces; the row has four). Kept: the five-track grid of
   layouts.md §3, brand | free | nav | extras | button. The two 1fr tracks are equal, so the nav
   sits in the middle of the room between brand and button; 1fr cannot shrink below its content,
   so the extras' track keeps its room and the empty track gives way first. */
.header {
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  column-gap: var(--space-md);
  padding-block: var(--space-s);
  /* The page sides, or past 1920 the sides of the centred page box (the bar itself runs the full width). */
  padding-inline: max(var(--page-side-left), (100% - var(--measure-page)) / 2 + var(--space-md-lg)) max(var(--page-side-right), (100% - var(--measure-page)) / 2 + var(--space-md-lg));
  /* The see-through bar: the page shows faintly through, blurred, over a hairline (ruled). */
  border-block-end: var(--border-1) solid var(--hairline-color);
  background: var(--overlay-scrim);
  backdrop-filter: blur(12px);
}

.header > nav {
  grid-column: 3;
}

.header nav {
  font-size: var(--step--1);
  letter-spacing: var(--tracking-xs);
}

/* The bar's button: compact, one text step down (decision 36: the size dial; the padding follows). */
.header .btn {
  font-size: var(--step--1);
}

.header nav > ul {
  --cluster-space: var(--space-md);
}

.header summary {
  list-style: none;
}

/* The More panel hangs under More from its own place in the flow (no top or left needed), shifted
   left by the box's padding so its words line up with More's. */
.header details > ul {
  --stack-space: var(--space-s);
  --box-bg: var(--color-bg-base);
  --box-border: var(--border-1) solid var(--hairline-color);
  margin-inline-start: calc(-1 * var(--space-md));
}

/* The extras (EN | FR, phone), spread evenly between More and the button (ruled): with the same
   gap as the grid's, every space between More, each extra and the button comes out equal. No
   wrapping inside: the track keeps the extras' one-line width (EN | FR wrapped at 1196). */
.header > .cluster {
  --cluster-space: var(--space-md);
  --cluster-horizontal-alignment: space-evenly;
}

/* ☰ sits in the last track; shown only in the ☰ band. */
.header > button {
  display: none;
  grid-column: -2;
}

@media (max-width: 95.1875em) { /* 1523px: no phone (ruled) */
  .header a[href^="tel"] {
    display: none;
  }
}

@media (max-width: 74.875em) { /* 1198px: the ☰ band (ruled; 1195 until the quote button gained its → , 2026-11-30), brand and ☰ only */
  .header {
    grid-template-columns: auto 1fr;
  }

  .header > :is(nav, .cluster, .btn) {
    display: none;
  }

  /* the bars end on the page side: the icon is centred in its 44px square */
  .header > button {
    display: grid;
    justify-self: end;
    margin-inline-end: calc((var(--space-md) - var(--space-xl)) / 2);
  }
}
