/* One header for every dev page (header.js). Its palette is stated here, not borrowed from the page,
   so it looks the same on every page whatever that page's own tokens are. */
.qf-hdr {
  --h-ink: #1d1640; --h-muted: #6f669e; --h-line: rgba(45, 30, 110, .14); --h-line-2: rgba(45, 30, 110, .32);
  --h-pink: #ff5aa8; --h-pink-ink: #c8166a; --h-teal: #00a89a; --h-panel: #ece8fa; --h-cta: #1d1640; --h-on-cta: #ece8fa;
  position: fixed !important; z-index: 200; inset: 0 0 auto 0; height: 64px; margin: 0 !important; padding: 0 !important; box-sizing: border-box;
  font-family: "Zen Maru Gothic", ui-rounded, system-ui, sans-serif; color: var(--h-ink);
  background: transparent; border-bottom: 1px solid transparent; transition: background-color .2s ease-out, border-color .2s ease-out; }
[data-theme=dark] .qf-hdr {
  --h-ink: #ece8ff; --h-muted: #8d84b8; --h-line: rgba(200, 190, 255, .14); --h-line-2: rgba(200, 190, 255, .32);
  --h-pink: #ff4fa3; --h-pink-ink: #ff7ab8; --h-teal: #3ff0dc; --h-panel: #1b1741; --h-cta: #ece8ff; --h-on-cta: #1b1741; }
.qf-hdr *, .qf-hdr *::before, .qf-hdr *::after { box-sizing: border-box; }
.qf-hdr.is-scrolled, .qf-hdr.is-open { background: var(--h-panel); border-bottom-color: var(--h-line); }
.qf-hdr::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0; transition: opacity .2s ease-out; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--h-pink) 30%, var(--h-teal) 70%, transparent); }
.qf-hdr.is-scrolled::after { opacity: .6; }
.qf-hdr-in { height: 100%; max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.qf-hdr a { color: inherit; text-decoration: none; }
.qf-hdr-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; line-height: 1; font-weight: 500; letter-spacing: -.01em; justify-self: start; white-space: nowrap; }
.qf-hdr-brand em { font-style: normal; color: inherit; }   /* the logo is black and white */
.qf-hdr-mark { width: 30px; height: 30px; display: inline-grid; place-items: center; color: var(--h-ink); flex: none; }
.qf-hdr-mark svg { width: 100%; height: 100%; display: block; }
.qf-hdr-mark .qf-o { fill: none; stroke: currentColor; stroke-width: .165; stroke-linejoin: miter; }
.qf-hdr-mark .qf-c { fill: currentColor; }
.qf-hdr-nav { display: flex; gap: 4px; }
.qf-hdr-nav a { position: relative; padding: 10px 12px; font: 600 11.5px/1 "M PLUS 1 Code", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase;
  color: var(--h-muted); white-space: nowrap; transition: color .15s ease-out; }
.qf-hdr-nav a:hover { color: var(--h-ink); }
.qf-hdr-nav a[aria-current] { color: var(--h-ink); }
.qf-hdr-nav a[aria-current]::before { content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; background: var(--h-pink); transform: rotate(45deg); }
.qf-hdr-nav .qf-hdr-only-menu { display: none; }
.qf-hdr-act { display: flex; align-items: center; gap: 8px; justify-self: end; }
/* the icon buttons' outline is drawn, not clipped: four edges and the two 45° cuts in one colour (--qf-hdr-bd), so the
   chamfered corners have an edge too and the whole outline turns pink together on hover */
@property --qf-hdr-bd { syntax: "<color>"; inherits: false; initial-value: transparent; }
.qf-hdr-icon, .qf-hdr-menu { width: 36px; height: 36px; padding: 0; margin: 0; display: grid; place-items: center; color: var(--h-ink);
  border: 1px solid transparent; border-radius: 0; cursor: pointer; font: inherit;
  --qf-hdr-bd: var(--h-line-2); --leg: 6px; --cut: calc(var(--leg) * .7071);
  background:
    linear-gradient(135deg, transparent calc(var(--cut) - .5px), var(--qf-hdr-bd) calc(var(--cut) - .5px), var(--qf-hdr-bd) calc(var(--cut) + .6px), transparent calc(var(--cut) + .6px),
      transparent calc(100% - var(--cut) - .6px), var(--qf-hdr-bd) calc(100% - var(--cut) - .6px), var(--qf-hdr-bd) calc(100% - var(--cut) + .5px), transparent calc(100% - var(--cut) + .5px)) border-box,
    linear-gradient(var(--qf-hdr-bd), var(--qf-hdr-bd)) 100% 0 / calc(100% - var(--leg)) 1px no-repeat border-box,
    linear-gradient(var(--qf-hdr-bd), var(--qf-hdr-bd)) 100% 0 / 1px calc(100% - var(--leg)) no-repeat border-box,
    linear-gradient(var(--qf-hdr-bd), var(--qf-hdr-bd)) 0 100% / calc(100% - var(--leg)) 1px no-repeat border-box,
    linear-gradient(var(--qf-hdr-bd), var(--qf-hdr-bd)) 0 100% / 1px calc(100% - var(--leg)) no-repeat border-box;
  transition: --qf-hdr-bd .15s ease-out, color .15s ease-out; }
.qf-hdr-icon:hover, .qf-hdr-menu:hover { color: var(--h-pink-ink); --qf-hdr-bd: var(--h-pink); }
.qf-hdr-icon svg { width: 17px; height: 17px; display: block; }
.qf-hdr-theme .qf-sun { display: none; }
[data-theme=dark] .qf-hdr-theme .qf-sun { display: block; }
[data-theme=dark] .qf-hdr-theme .qf-moon { display: none; }
.qf-hdr-cta { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; font: 600 11.5px/1 "M PLUS 1 Code", ui-monospace, monospace; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap; color: var(--h-on-cta) !important; background: var(--h-cta);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: background-color .15s ease-out, color .15s ease-out; }
.qf-hdr-cta:hover { background: var(--h-pink); color: #1d1640 !important; }
.qf-hdr-menu { display: none; position: relative; }
.qf-hdr-menu i { position: absolute; inset: 0; }
.qf-hdr-menu i::before, .qf-hdr-menu i::after { content: ""; position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .2s ease-out; }
.qf-hdr-menu i::before { top: calc(50% - 4px); }
.qf-hdr-menu i::after { top: calc(50% + 2.5px); }
.qf-hdr.is-open .qf-hdr-menu i::before { transform: translateY(3.25px) rotate(45deg); }
.qf-hdr.is-open .qf-hdr-menu i::after { transform: translateY(-3.25px) rotate(-45deg); }
.qf-hdr :focus-visible { outline: 2px solid var(--h-teal); outline-offset: 2px; }
@media (max-width: 920px) {
  .qf-hdr { background: var(--h-panel); border-bottom-color: var(--h-line); }
  .qf-hdr-in { grid-template-columns: 1fr auto; }
  .qf-hdr-nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px clamp(16px, 3vw, 40px) 14px;
    background: var(--h-panel); border-bottom: 1px solid var(--h-line);
    visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s linear .16s; }
  .qf-hdr.is-open .qf-hdr-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s; }
  .qf-hdr-nav a { padding: 15px 0 15px 18px; border-bottom: 1px solid var(--h-line); font-size: 12px; }
  .qf-hdr-nav a:last-child { border-bottom: 0; }
  .qf-hdr-nav a[aria-current]::before { left: 2px; top: 50%; bottom: auto; margin: -2.5px 0 0; }
  .qf-hdr-nav .qf-hdr-only-menu { display: flex; color: var(--h-pink-ink); }
  .qf-hdr-menu { display: grid; }
  .qf-hdr-cta { display: none; }
  /* touch sizes: a 44 px target for every control in the bar and the menu rows */
  .qf-hdr-icon, .qf-hdr-menu { width: 44px; height: 44px; }
  .qf-hdr-act { gap: 4px; }
  .qf-hdr-nav a { min-height: 48px; display: flex; align-items: center; padding-block: 0; }
}
@media (max-width: 380px) { .qf-hdr-brand { font-size: 16px; gap: 8px; } .qf-hdr-in { gap: 8px; } }
/* The page's own header (any of the old kinds) is hidden in place, children and all, so layouts don't move. */
html body > header.site-header, html #root nav.site-nav, html.qb body > header > nav.nav,
html body > header.bar, html body > nav.bar,
html body > header.site-header *, html #root nav.site-nav *, html.qb body > header > nav.nav *,
html body > header.bar *, html body > nav.bar * { visibility: hidden !important; pointer-events: none !important; }
html #root nav.site-nav::before, html #root nav.site-nav::after, html.qb body > header > nav.nav::before,
html.qb body > header > nav.nav::after, html body > header.bar::before, html body > header.bar::after,
html body > nav.bar::before, html body > nav.bar::after { display: none !important; }
html .qf-menu-btn, html .qf-menu-sheet { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .qf-hdr, .qf-hdr *, .qf-hdr *::before, .qf-hdr *::after { transition: none !important; }
}
/* the company logo in plain black and white */
.qf-hdr-brand { color: #0b0b0d; }
[data-theme="dark"] .qf-hdr-brand { color: #ffffff; }
.qf-hdr-brand .qf-hdr-mark { color: inherit; }

/* page scale on large screens: --qf-z steps up with the window so type and layout grow together instead of leaving a small
   column in a wide gutter (skin.css zooms the page by it; the homepage applies it to its own blocks) */
:root { --qf-z: 1; }
@media (min-width: 1900px) { :root { --qf-z: 1.15; } }
@media (min-width: 2300px) { :root { --qf-z: 1.3; } }
@media (min-width: 2900px) { :root { --qf-z: 1.55; } }
@media (min-width: 3700px) { :root { --qf-z: 1.9; } }

/* one pink full stop on every page's main heading, the same colour everywhere */
h1[data-qf-dot]::after { content: "."; }
h1 .hero-period, h1[data-qf-dot]::after, h1.qf-dot::after { color: #ff5aa8 !important; }
:root[data-theme="dark"] h1 .hero-period, :root[data-theme="dark"] h1[data-qf-dot]::after, :root[data-theme="dark"] h1.qf-dot::after { color: #ff4fa3 !important; }

/* the full stop arrives the same way on every page: hidden until the heading is complete, then one short pink flare.
   It stays a plain inline glyph (no inline-block, no transform): a line may not break before a full stop, so the dot is
   always on the last word's line, never alone on a new one */
h1 .hero-period, h1[data-qf-dot]::after, h1.qf-dot::after { display: inline; opacity: 0; }
h1.qf-dot-on .hero-period, h1.qf-dot-on[data-qf-dot]::after, h1.qf-dot.qf-dot-on::after { opacity: 1; animation: qf-dot-in .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes qf-dot-in { 0% { opacity: 0; text-shadow: 0 0 0 transparent; } 40% { opacity: 1; text-shadow: 0 0 .28em currentColor, 0 0 .6em currentColor; } 100% { opacity: 1; text-shadow: 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { h1.qf-dot-on .hero-period, h1.qf-dot-on[data-qf-dot]::after, h1.qf-dot.qf-dot-on::after { animation: none; } }

/* the phone menu as a HUD readout: it unfolds from the bar (150ms) with one scan line, teal corner ticks, hairline rows,
   and a pink tick on the row under the pointer or keyboard and on the current page (a bar, not a diamond) */
@media (max-width: 920px) {
  .qf-hdr-nav { transform: scaleY(.6); transform-origin: top; transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s linear .15s;
    --t: var(--h-teal);
    background: linear-gradient(var(--t), var(--t)) 6px 6px / 10px 1px, linear-gradient(var(--t), var(--t)) 6px 6px / 1px 10px,
      linear-gradient(var(--t), var(--t)) calc(100% - 6px) calc(100% - 6px) / 10px 1px, linear-gradient(var(--t), var(--t)) calc(100% - 6px) calc(100% - 6px) / 1px 10px, var(--h-panel);
    background-repeat: no-repeat; }
  .qf-hdr.is-open .qf-hdr-nav { transform: none; transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s; }
  .qf-hdr-nav::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: linear-gradient(90deg, transparent, var(--h-pink) 20%, var(--h-pink) 80%, transparent) 0 0 / 100% 1px no-repeat; }
  .qf-hdr.is-open .qf-hdr-nav::after { animation: qf-hdr-scan .3s ease-out; }
  .qf-hdr-nav a::after { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 14px; margin-top: -7px; background: var(--h-pink); transform: scaleY(0); transition: transform .12s ease-out; }
  .qf-hdr-nav a:is(:hover, :focus-visible)::after, .qf-hdr-nav a[aria-current]::after { transform: none; }
  .qf-hdr-nav a[aria-current]::before { display: none; }
}
@keyframes qf-hdr-scan { 0% { opacity: .9; background-position: 0 0; } 100% { opacity: 0; background-position: 0 100%; } }
@media (prefers-reduced-motion: reduce) { .qf-hdr-nav { transform: none !important; } .qf-hdr.is-open .qf-hdr-nav::after { animation: none; } }

/* ── the site footer: the same band at the end of every page, a shade deeper than the page so it reads as the bottom ── */
#root .site-footer, html.qb footer:has(.qf-foot), body.home2 .legal-band { display: none !important; }
.qf-ftr { --ftr-bg: #e0d8f5; --ftr-ink: #1d1640; --ftr-ink-2: #4c4285; --ftr-line: rgba(45, 30, 110, .18);
  position: relative; margin-top: clamp(40px, 6vw, 72px); background: var(--ftr-bg); color: var(--ftr-ink); font-family: var(--qf-sans, "Zen Maru Gothic", system-ui, sans-serif); }
:root[data-theme="dark"] .qf-ftr { --ftr-bg: #120e30; --ftr-ink: #ece8ff; --ftr-ink-2: #b3aadb; --ftr-line: rgba(200, 190, 255, .16); }
.qf-ftr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #ff5aa8 30%, #3ff0dc 70%, transparent); opacity: .7; }
.qf-ftr::after { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 6px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--ftr-line) 0 1px, transparent 1px 16px); }
.qf-ftr-in { max-width: 1280px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 56px) 28px; }
.qf-ftr-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 26px; border-bottom: 1px solid var(--ftr-line); }
.qf-ftr .qf-hdr-brand { color: var(--ftr-ink) !important; font-size: 22px; }
.qf-ftr-tag { margin: 0; font: 500 11px/1.4 var(--qf-mono, "M PLUS 1 Code", monospace); letter-spacing: .16em; text-transform: uppercase; color: var(--ftr-ink-2); }
.qf-ftr-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 26px 0; }
.qf-ftr-cols nav { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.qf-ftr-h { margin: 0 0 6px; font: 500 10.5px/1.4 var(--qf-mono, "M PLUS 1 Code", monospace); letter-spacing: .16em; text-transform: uppercase; color: var(--ftr-ink-2); }
.qf-ftr-h::before { content: "◢ "; color: #ff5aa8; }
.qf-ftr-cols a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; color: var(--ftr-ink); font-size: 14px; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .15s ease-out, background-size .15s ease-out; }
.qf-ftr-cols a i { font-style: normal; font-size: 11px; color: var(--ftr-ink-2); }
.qf-ftr-cols a:hover, .qf-ftr-cols a:focus-visible { color: #ff5aa8; background-size: 100% 1px; }
:root[data-theme="dark"] .qf-ftr-cols a:hover, :root[data-theme="dark"] .qf-ftr-cols a:focus-visible { color: #ff4fa3; }
.qf-ftr-cols a:focus-visible { outline: 2px solid #3ff0dc; outline-offset: 2px; }
.qf-ftr-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; border-top: 1px solid var(--ftr-line);
  font: 500 10.5px/1.6 var(--qf-mono, "M PLUS 1 Code", monospace); letter-spacing: .06em; color: var(--ftr-ink-2); }
.qf-ftr-base p { margin: 0; }
.qf-ftr-copy { letter-spacing: .16em; text-transform: uppercase; }
@media (max-width: 760px) { .qf-ftr-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qf-ftr-cols a { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .qf-ftr-cols a { transition: none; } }

/* desktop nav: the current page is underlined across its whole label (a centred marker read as off under two-word labels
   like EFFICIENCY INDEX). The trailing letter-spacing is taken out of the right padding, so each label sits truly centred
   and the line spans exactly its letters; a fainter line on hover says the others are links too */
@media (min-width: 921px) {
  .qf-hdr-nav a { padding-right: calc(12px - .12em); }
  .qf-hdr-nav a::before { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; width: auto; height: 1.5px; margin: 0;
    background: var(--h-pink); transform: scaleX(0); transform-origin: 50% 50%; opacity: .55; transition: transform .16s ease-out, opacity .16s ease-out; }
  .qf-hdr-nav a:is(:hover, :focus-visible)::before { transform: none; }
  .qf-hdr-nav a[aria-current]::before { left: 12px; right: 12px; bottom: 6px; width: auto; height: 2px; margin: 0; transform: none; opacity: 1; }
}
@media (min-width: 921px) and (prefers-reduced-motion: reduce) { .qf-hdr-nav a::before { transition: none; } }

/* every link in the bar reacts to the pointer, the current page's and the logo's included: nav links turn pink, the
   wordmark takes a pink underline (the logo itself stays black and white) */
.qf-hdr-nav a:hover, .qf-hdr-nav a[aria-current]:hover { color: var(--h-pink-ink); }
.qf-hdr-brand:hover, .qf-hdr-brand:focus-visible { text-decoration: underline 1px var(--h-pink); text-underline-offset: 6px; }

/* the footer's logo link reacts like the header's: a pink underline under the wordmark */
.qf-ftr .qf-hdr-brand:is(:hover, :focus-visible) { text-decoration: underline 1px #ff5aa8; text-underline-offset: 6px; }

/* phone type floor (12 Nov): the footer's labels are 11px and its address line 12px */
@media (max-width: 600px) { .qf-ftr-base { font-size: 12px; } .qf-ftr-h, .qf-ftr-copy { font-size: 11px; } }
