/* /a/hdr.css — the locked header. job-review-import-260914 step 0.
 *
 * Thom's ruling, 2026-09-14: SMART, FLOORED. One header, no cuts, no ?hdr= param. The
 * eleven cuts this file used to carry (1|2|3, a|b|c, g0..g3, gs) were removed in the same
 * commit that made this one the default; /review/nav.htm records the ruling and the
 * comparison pages that produced it are history, not live options.
 *
 * What it is: white glass, black text, blur(16px) saturate(1.6). Clear-ish over the wall
 * at 0.40 white, frosted to 0.72 the moment the wall's bottom edge passes under the bar
 * (hdr.js, one IntersectionObserver). A page with no wall starts frosted and gets the
 * bar's height back as body padding.
 *
 * Why 0.40 and not 0. MEASURED, qa/glassqa.mjs: black nav text on a fully clear bar over
 * the wall video reads 1.21:1 at 390. Clear glass with black text is not a contrast-passing
 * state over dark moving media at any blur. 0.40 is the lowest rung measured >= 4.5:1
 * there — 4.58:1 at 390, 5.81:1 at 1440. That 4.58:1 is the worst body-text contrast the
 * locked header produces, and it is the number in the evidence file.
 *
 * Why fixed and not sticky. The header markup says position:sticky and has never stuck:
 * home.css sets overflow-x:hidden on html AND body, and a box with one axis hidden computes
 * the other to auto, so body becomes a scroll container that never scrolls and the sticky
 * header sticks to it instead of to the viewport. Measured at 1440 and 390, Chromium:
 * scrollY 2400 -> header top -2400. position:fixed does not care what an ancestor's
 * overflow says, and it leaves the body rule alone, so the horizontal-overflow guard that
 * rule was written for still holds.
 */

html[data-hdr="gf"] {
  --hh: 80px;                /* resting height, at every scroll position: no compact state */
  --fg: #000;
  --fg-mute: #3a3a3a;
  --glass-a: .40;            /* over the wall — the measured floor, see above */
  scroll-padding-top: calc(var(--hh) + 8px);
}
@media (max-width: 767px) { html[data-hdr="gf"] { --hh: 64px } }

html[data-hdr="gf"] .hdrin { height: var(--hh) }
/* the wall runs under the bar from the first pixel; a text page has no wall to run
 * under it, so that page gets the bar's height back as padding instead. */
html[data-hdr="gf"] body { padding-top: 0 }
html[data-hdr="gf"].hdr-nowall body { padding-top: var(--hh) }

html[data-hdr="gf"] .hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  /* D18b (Thom 9/18 6:00-7:40 AM ET) - RESTORE the ruled "Smart, floored" glass, byte-for-byte
   * as it shipped at fdbfb6ac (DECISIONS-website 9/14 3:40 PM). This block is a REVERT, not a
   * new design: the four declarations below are the ones round4c B5 H3 replaced with solid
   * paper and round4d D18 then replaced with `transparent`. Both are superseded here, and
   * R-R closes with them.
   * What D18 got wrong, in Thom's shot of 5:54 AM: over the Home caption bars the bar painted
   * NOTHING (alpha 0), so the logo collided with "Dick's Sporting Goods"; and every page with
   * no wall went hard white instead of frosted glass. The ruled state is neither - it is white
   * glass at 0.40 over the wall and 0.72 everywhere else, which is why --glass-a exists.
   * H3's words were "no blurred overlays; solid paper header" - that is the ruling being
   * reversed, openly: the 16px backdrop blur is deliberately back. 0.40 is not a taste
   * choice, it is the measured contrast floor (qa/glassqa.mjs, 4.58:1 at 390) recorded in the
   * file header above, which is why clear-over-media is not an available state. */
  background: rgba(255, 255, 255, var(--glass-a));
  color: var(--fg);
  /* the hairline is an inset shadow, not a border: a border would add its 1px to the box. */
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .06);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  transition: background-color .15s ease;
}
html[data-hdr="gf"] .pnav a { color: var(--fg); font-size: 16px }
html[data-hdr="gf"] .pnav a:hover { color: var(--fg-mute) }

/* D18b: frosted - over page content, and from the first paint on a page with no wall. The
 * class is set by hdr.js's one IntersectionObserver on the wall (opt-out, the shape the
 * ruling describes: "clears again on scroll-up"), and .hdr-nowall carries it from the top. */
html[data-hdr="gf"].hdr-frost { --glass-a: .72 }

/* D18b: prefers-reduced-motion -> no ease (the ruling says so in as many words). */
@media (prefers-reduced-motion: reduce) {
  html[data-hdr="gf"] .hdr { transition: none !important }
}

/* D18b: no backdrop-filter (old WebKit, Firefox with the flag off): the frost is what turns
 * page text into tone. Without it, go fully opaque rather than shipping nav text laid
 * over page text at 40% white. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-hdr="gf"] .hdr { background: #fff }
}
