/* components/site-header.css — layout for partials/header.hbs,
   navigation.hbs and navigation-menu.hbs.
   .nav      — home's short bar (links + date), --bp-md and up; hidden while
               the menu is open, and the panel closes up into its place.
   .nav-menu — the menu panel, opened by the hamburger at every width.
   State lives on attributes set by JS ([data-menu-open] on <body> from
   menu.js, plus --nav-menu-top); every visual consequence is here. Search
   styles are in search.css. */

/* Positioning context for the absolute .nav-menu. */
.site-header {
  position: relative;
}

/* Positioning context for the centred brand. */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  position: relative;
}

/* More room around the masthead from --bp-lg: even on non-home (one compact
   row), extra on top for home (a two-row header). */
@media (width >= 64rem) {
  .site-header__inner {
    padding-block: var(--space-5);
  }

  .home-template .site-header__inner {
    padding-block-start: var(--space-10);
  }
}

/* Hamburger and search grouped as one flex item on the left. */
.site-header__start {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Non-home: brand centred on the row regardless of the flanks' widths (out
   of flow). Home's brand is handled by HOME MOBILE MASTHEAD. */
.site-header__inner > .site-header__brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* The brand face. --font-brand, not --font-heading (which turns serif in
   editorial-voice scopes). */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-family: var(--font-brand);
  font-size: 26px;
  letter-spacing: -1px;
  font-weight: 500;
}

/* Home only (an <h1>). --brand-title-size is a design-layer hook. */
.site-header__brand-wrap {
  font-size: var(--brand-title-size, var(--text-6xl));
}

@media (width >= 48rem) {
  .site-header__brand-wrap {
    font-size: var(--brand-title-size, var(--text-4xl));
  }
}

/* Let the <a> inherit the h1's size and tracking, or the compact size above
   would win on home too. The menu panel's copy (.nav-menu__brand) matches. */
:is(.site-header__brand-wrap, .nav-menu__brand) .site-header__brand {
  font-size: inherit;
  letter-spacing: inherit;
}

/* ACTIONS — Sign In / Subscribe, in the UI face. A signed-in member gets
   Account instead, drawn as Subscribe in every colour context below.
   Below --bp-md, on every page, the row is one bare profile icon: Sign In
   or Account with its label clipped (.sr-only in the markup), Subscribe
   hidden. The default --icon-size there sizes it to the search icon. */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

:is(.site-header__signin, .site-header__account) {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.site-header__subscribe {
  display: none;
}

/* Subscribe's --subscribe-ink (border, hover fill) and --subscribe-paper
   (hover label) are re-pointed per colour context, so the hover inverts
   everywhere. Not currentColor: the hover changes `color`. */
:is(.site-header__subscribe, .site-header__account) {
  --subscribe-ink: var(--color-border);
  --subscribe-paper: var(--color-bg);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

/* From --bp-md: labels shown, Sign In as text (no icon), Subscribe and
   Account as bordered buttons, Account's icon at text size. */
@media (width >= 48rem) {
  .site-header__actions {
    font-size: inherit;
    --icon-size: 1em;
  }

  /* Undo .sr-only. */
  .site-header__action-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip-path: none;
  }

  .site-header__signin .icon {
    display: none;
  }

  .site-header__subscribe {
    display: inline;
  }

  :is(.site-header__subscribe, .site-header__account) {
    padding: var(--space-1) var(--space-3);
    border: var(--border-width) solid var(--subscribe-ink);
  }
}

/* HOVER (pointer devices, --bp-md up — below, there is only the icon):
   Subscribe and Account invert in place; Sign In rests a step back and
   comes up on hover/focus. */
@media (hover: hover) and (width >= 48rem) {
  :is(.site-header__subscribe, .site-header__account):hover {
    background-color: var(--subscribe-ink);
    color: var(--subscribe-paper);
  }

  .site-header__signin {
    color: var(--color-fg-subtle);
    transition: color var(--transition);
  }

  .site-header__signin:is(:hover, :focus-visible) {
    color: inherit;
  }
}

/* NAV TOGGLE — icon-only at every width; the label is clipped, not removed. */
.nav-toggle {
  display: flex;
  align-items: center;
}

/* Fixed 25×13 box (partials/icons/menu.hbs), not --icon-size. */
.nav-toggle .icon {
  width: 25px;
  height: 13px;
  /* The X is taller than the box; let it overhang instead of clipping. */
  overflow: visible;
}

/* HAMBURGER → X — the outer lines slide to the middle (5.75 = 6.5 − 0.75 in
   the glyph's units) and rotate ±45°; the middle fades. transform-box:
   fill-box rotates each line about its own centre. Tied to --transition, so
   reduced motion gets it instantly. If the lines in menu.hbs move, update
   the numbers. */
.nav-toggle .icon line {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--transition), opacity var(--transition);
}

[data-menu-open] .nav-toggle .icon line:first-child {
  transform: translateY(5.75px) rotate(45deg);
}

[data-menu-open] .nav-toggle .icon line:nth-child(2) {
  opacity: 0;
}

[data-menu-open] .nav-toggle .icon line:last-child {
  transform: translateY(-5.75px) rotate(-45deg);
}

/* Label clipped with text-indent and zero width: still in the a11y tree and
   page search, never painted. */
.nav-toggle__label {
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 100%;
}

/* SHORT BAR — .nav: search button left, links centred out of flow, date
   right. --bp-md and up only; hidden while the menu is open. */
.nav {
  display: none;
  margin-block: var(--space-3);
}

@media (width >= 48rem) {
  .nav {
    display: block;
  }
}

/* Padding here (not on .nav) so it sits inside the two rules below. */
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-3);
  position: relative;
}

/* Top and bottom rules as pseudo-elements inset by --gutter, so they end
   at the content edge (a border would overhang the gutter).
   --color-border-faint follows the menu's inversion. */
.nav__inner::before,
.nav__inner::after {
  content: "";
  position: absolute;
  inset-inline: var(--gutter);
  block-size: var(--border-width);
  background-color: var(--color-border-faint);
}

.nav__inner::before {
  inset-block-start: 0;
}

.nav__inner::after {
  inset-block-end: 0;
}

/* SEARCH BUTTONS — both open the panel with search focused. One on screen
   at a time: on home from --bp-md the short bar's; otherwise the
   masthead's. Neither while the panel is open (the field is showing). */
.site-header__search-toggle,
.nav__search-toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.site-header__search-toggle {
  transition: opacity var(--transition), visibility var(--transition);
}

/* visibility (not display) so it can fade, keeps its box, and leaves the
   tab order. */
[data-menu-open] .site-header__search-toggle {
  opacity: 0;
  visibility: hidden;
}

@media (width >= 48rem) {
  .home-template .site-header__search-toggle {
    display: none;
  }
}

/* Centred like the brand. */
.nav__list {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.nav__link {
  text-decoration: none;
  font-family: var(--font-ui);
  transition: color var(--transition);
}

/* HOVER — THE REST STEP BACK: hovering the list dims every other link
   (keyed off the list, so gaps between links don't flash). Keyboard focus
   is exempt. Pointer devices only. */
@media (hover: hover) {
  .nav__list:hover .nav__link:not(:hover, :focus-visible) {
    color: var(--color-fg-dim);
  }
}

/* UI face, like the rest of the row. */
.nav__date {
  margin-inline-start: auto;
  white-space: nowrap;
  font-family: var(--font-ui);
}

/* HOME MOBILE MASTHEAD — below --bp-md home wraps to two rows: icons and
   actions, then the large brand on its own row. Same markup, reflowed.
   Back to one centred row at --bp-md. */
.home-template .site-header__inner {
  flex-wrap: wrap;
}

/* min-inline-size: 0 — a flex item's auto minimum is the logo's full
   width, which would stop brand-logo.css's cap from shrinking it. */
.home-template .site-header__brand-wrap {
  order: 3;
  flex-basis: 100%;
  min-inline-size: 0;
  position: static;
  transform: none;
}

/* The brand <a> is flex, so centre with justify-content, not text-align. */
.home-template .site-header__brand-wrap .site-header__brand {
  justify-content: center;
}

@media (width >= 48rem) {
  .home-template .site-header__inner {
    flex-wrap: nowrap;
  }

  .home-template .site-header__brand-wrap {
    order: 0;
    flex-basis: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* The short bar hides while the menu is open and the panel covers its row
   (search row where the links were). visibility, not display, so the header
   keeps its height and the page below doesn't jump. The panel finds the row
   through the grid: an absolute grid child with top: 0 is placed against its
   grid area. Rows are explicit so row 2 still exists (empty) below --bp-md,
   where the bar is display: none. minmax(0, …): an implicit auto column
   can't shrink below the masthead logo's full width, so it overflowed
   narrow phones. */
.home-template .site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
}

.home-template :is(.nav, .nav-menu) {
  grid-row: 2;
}

.home-template .nav-menu {
  top: 0;
}

[data-menu-open] .nav {
  visibility: hidden;
}

/* INVERTED STATE — while the menu is open. Both the header and the panel
   get the background, since the panel can extend past the header's box. */
[data-menu-open] .site-header,
[data-menu-open] .nav-menu {
  background-color: var(--color-bg-invert);
  color: var(--color-fg-invert);
  /* Re-point muted text for everything inside. (--color-border-faint needs
     no re-point; it derives from currentColor.) */
  --color-fg-muted: var(--color-fg-muted-invert);
}

/* Subscribe's pair, inverted. */
[data-menu-open] :is(.site-header__subscribe, .site-header__account) {
  --subscribe-ink: var(--color-fg-invert);
  --subscribe-paper: var(--color-bg-invert);
}

/* One title while the menu is open. Non-home below --bp-md: the masthead
   brand hides (it's absolute, so nothing moves) and the panel's copy shows,
   sized and placed as home's. Not by reflowing the masthead brand as home
   does: the sticky header would grow and shift the page beneath. Home does
   the reverse (next rule) — hiding its in-flow brand row would jump the
   page. The > keeps the panel's copy from matching. */
[data-menu-open] .site-header__inner > .site-header__brand {
  display: none;
}

@media (width >= 48rem) {
  [data-menu-open] .site-header__inner > .site-header__brand {
    display: flex;
  }
}

/* Home: keep the masthead brand, hide the panel's copy. */
.home-template .nav-menu__brand {
  display: none;
}

/* MENU PANEL — .nav-menu. Closed via the `hidden` attribute (unreachable to
   assistive tech). Absolute, so it layers over the page. */
.nav-menu {
  position: absolute;
  inset-inline: 0;
  z-index: var(--z-menu);
  /* Clearance above Safari's toolbar (see THE RESULTS AREA in search.css). */
  --nav-menu-clearance: var(--space-2);
}

/* THE PANEL SCROLLS ITSELF — the page is locked and the header may be
   sticky, so the panel is sized to the screen below its top edge
   (--nav-menu-top, measured by menu.js fit()) and scrolls within that.
   100dvh less the Safari clearance. Below --bp-md a height, so it covers
   the page however short the lists are (the body's inverted ground,
   03-layout.css, fills the clearance strip); from --bp-md a cap, and the
   page shows beneath. Not while search results show (they scroll
   themselves). */
.nav-menu:not([data-search-active]) {
  block-size: calc(100vh - var(--nav-menu-top, 0px) - var(--nav-menu-clearance));
  block-size: calc(100dvh - var(--nav-menu-top, 0px) - var(--nav-menu-clearance));
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (width >= 48rem) {
  .nav-menu:not([data-search-active]) {
    block-size: auto;
    max-block-size: calc(100vh - var(--nav-menu-top, 0px) - var(--nav-menu-clearance));
    max-block-size: calc(100dvh - var(--nav-menu-top, 0px) - var(--nav-menu-clearance));
  }
}

/* Bottom padding only; content sits flush at the top. */
.nav-menu__inner {
  padding-block-end: var(--space-4);
}

/* MOBILE LAYOUT — .nav-menu__brand and .nav-menu__mobile, below --bp-md. */
/* Home's mobile brand row: the h1's size and tracking, centred. The bottom
   margin stands in for the masthead's bottom padding, so the brand lands
   where home's does. min-content mirrors the flex item's automatic minimum,
   so a wide logo isn't squeezed. */
.nav-menu__brand {
  min-inline-size: min-content;
  margin-block: 0 var(--space-4);
  font-family: var(--font-brand);
  font-size: var(--brand-title-size, var(--text-6xl));
  letter-spacing: var(--tracking-tight);
}

.nav-menu__brand .site-header__brand {
  justify-content: center;
}

.nav-menu__mobile {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.nav-menu__mobile-primary {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Two balanced CSS columns, however many items the admin list has. */
.nav-menu__mobile-more {
  column-count: 2;
  column-gap: var(--space-8);
}

.nav-menu__mobile-more > .nav-menu__item {
  margin-block-end: var(--space-3);
  break-inside: avoid;
}

@media (width >= 48rem) {
  .nav-menu__brand,
  .nav-menu__mobile {
    display: none;
  }
}

/* DESKTOP LAYOUT — .nav-menu__columns, --bp-md and up: Primary (columns of
   five), Trending. Wraps rather than a fixed column count. */
.nav-menu__columns {
  display: none;
}

/* Padding (not margin) so it goes with the row when search hides it. The
   bottom rule pairs with the search row's top rule. Column gap matches the
   gap inside each list. flex-start so a tall Trending doesn't stretch the
   link grids. */
@media (width >= 48rem) {
  .nav-menu__columns {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-8) var(--space-12);
    padding-block: var(--space-3);
    border-block-end: var(--border-width) solid var(--color-border-faint);
    margin-bottom: 10px;
  }
}

/* Five items per column, as many columns as needed (grid, rows fixed at 5,
   auto-flow column). max-content columns. Item spacing is a margin, since a
   row-gap would also apply between empty tracks. */
.nav-menu__primary-list {
  display: grid;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: var(--space-12);
}

.nav-menu__primary-list > .nav-menu__item {
  margin-block-end: var(--space-1);
}

/* TRENDING — its own full-width row below --bp-lg. From --bp-lg beside the
   links, pushed right and growing into free space (28rem basis, 48rem max).
   A breakpoint rather than the wrap itself (CSS can't see a wrap, and where
   it falls moves with the admin lists). Rules: left edge (beside only),
   under the heading (on the list, so it's full-strength currentColor), and
   between the cards. */
.nav-menu__trending {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: var(--space-3);
}

@media (width >= 64rem) {
  .nav-menu__trending {
    flex: 1 1 28rem;
    margin-inline-start: auto;
    max-width: 48rem;
    padding-inline-start: var(--space-5);
    border-inline-start: var(--border-width) solid var(--color-border-faint);
  }
}

/* Keep in step with .search__heading in search.css. */
.nav-menu__trending-heading {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

/* The two cards side by side; wraps when narrow. */
.nav-menu__trending-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  padding-block-start: var(--space-5);
  border-block-start: var(--border-width) solid var(--color-border-faint);
}

.nav-menu__trending-list .post-card[data-variant="trending"] {
  flex: 1 1 12rem;
}

/* Rule between the cards, exactly the card's height. */
.nav-menu__trending-list .post-card[data-variant="trending"] + .post-card[data-variant="trending"] {
  padding-inline-start: var(--space-5);
  border-inline-start: var(--border-width) solid var(--color-border-faint);
}

.nav-menu__link {
  text-decoration: none;
  font-family: var(--font-ui);
  transition: color var(--transition);
}

/* The panel's REST STEP BACK: hovering any link list dims every other link
   in the panel. Trending cards aren't in a list, so they dim nothing. */
@media (hover: hover) {
  .nav-menu:has(:hover > .nav-menu__item) .nav-menu__link:not(:hover, :focus-visible) {
    color: var(--color-fg-dim);
  }
}

/* SCROLL REVEAL — header-scroll.js sets [data-header-hidden] and, on posts,
   [data-header-condensed] on <body>.
   Tag/author/page (below --bp-md): hide on scroll down, reveal on scroll up.
   Posts (every width): hidden until the share row is passed, then the bar
   pops down and stays.
   Sticky is unconditional on non-home pages: switching to sticky after the
   page has scrolled leaves the header painted over the content (tested). */
body:not(.home-template) .site-header {
  position: sticky;
  top: 0;
  background-color: var(--color-bg);
  transition: transform var(--transition);
}

/* Full-bleed hairline under every non-home header — on the header, not
   .site-header__inner, so it runs past the gutters to the viewport edges.
   The -alpha token, not --color-border-soft: that one is computed once on
   :root and wouldn't follow pages that recolour the header (BANNER TOP,
   membership.css, the open menu); a share of currentColor does. */
body:not(.home-template) .site-header {
  border-block-end: var(--border-width) solid var(--color-border-soft-alpha);
}

/* Opaque ground for the sticky header (home stays transparent for the hero
   overlap). The `body` rule above outranks INVERTED STATE, so restate the
   menu-open background. */
body[data-menu-open]:not(.home-template) .site-header {
  background-color: var(--color-bg-invert);
}

.site-header[data-header-hidden] {
  transform: translateY(-100%);
}

/* From --bp-md, tag/author/page headers are ordinary in-flow headers. */
@media (width >= 48rem) {
  body:not(.home-template):not(.post-template) .site-header {
    position: relative;
  }

  body:not(.post-template) .site-header[data-header-hidden] {
    transform: none;
  }
}

/* POST CONDENSED ACTIONS — share/comment count replacing Sign In/Subscribe
   in the condensed post bar, at every width. Not while the menu is open:
   the masthead's actions return, as at the top of the page. */
.site-header__post-actions {
  display: none;
  align-items: center;
  gap: var(--space-4);

  /* Edge-to-edge icons: 1em. */
  --icon-size: 1em;

  font-family: var(--font-ui);
}

body.post-template[data-header-condensed]:not([data-menu-open]) .site-header__actions {
  display: none;
}

body.post-template[data-header-condensed]:not([data-menu-open]) .site-header__post-actions {
  display: flex;
}

.site-header__post-actions-comments,
.site-header__post-actions-share {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
}

/* The post title: hidden unless the condensed bar is at --bp-md+. */
.site-header__post-title {
  display: none;
}

/* POST CONDENSED BAR — --bp-md and up: wordmark left, article title centred,
   share/comments right. The hamburger and search step out (delete the
   .site-header__start rule to keep them). */
@media (width >= 48rem) {
  body.post-template[data-header-condensed] .site-header__start {
    display: none;
  }

  /* The wordmark back in flow, so space-between pins it left. */
  body.post-template[data-header-condensed] .site-header__inner > .site-header__brand {
    position: static;
    transform: none;
  }

  /* Centred on the row, capped at min(--measure, 100% − 32rem) to clear the
     flanks. pointer-events: none so the empty box can't swallow clicks.
     Heading face and weight together (the editorial voice); not the display
     tracking, which is too tight at this size. */
  body.post-template[data-header-condensed] .site-header__post-title {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(var(--measure), calc(100% - 32rem));
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    pointer-events: none;
  }

  /* Undo .sr-only so "Share" shows as text. */
  .site-header__post-actions-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip-path: none;
  }

  /* Share first, per the mockup. */
  .site-header__post-actions-share {
    order: -1;
  }
}

/* HERO OVERLAP — [data-hero-overlap] on <body> (home, editorial hero first;
   posts on Hero Image): the header comes out of flow over the full-bleed
   image and takes the hero text colour. */
[data-hero-overlap] .site-header {
  position: absolute;
  inset-inline: 0;
  top: 0;
  color: var(--color-hero-text);
}

/* Subscribe's border in the hero colour (not while the menu is open). */
[data-hero-overlap]:not([data-menu-open]) :is(.site-header__subscribe, .site-header__account) {
  --subscribe-ink: var(--color-hero-text);
}

/* Hover label: the hero colour inverted (no palette token is its opposite).
   Guarded, since an unsupported value would only fail at use. */
@supports (color: rgb(from red r g b)) {
  [data-hero-overlap]:not([data-menu-open]) :is(.site-header__subscribe, .site-header__account) {
    --subscribe-paper: rgb(from var(--color-hero-text) calc(255 - r) calc(255 - g) calc(255 - b));
  }
}

/* Menu open over the hero: normal inverted colours. */
[data-hero-overlap][data-menu-open] .site-header {
  color: var(--color-fg-invert);
}

/* On a post, the sticky header's ground and hairline clear over the image.
   Once condensed it goes fixed, not sticky: both are out of flow, so the
   switch shifts nothing (absolute → sticky would push the page down by the
   header's height). transition: none while over the image, as BANNER TOP.
   SCROLL REVEAL's sticky outranks the absolute above, hence the restatement. */
body.post-template[data-hero-overlap]:not([data-header-condensed]) .site-header {
  position: absolute;
}

body.post-template[data-hero-overlap]:not([data-header-condensed], [data-menu-open]) .site-header {
  background-color: transparent;
  border-block-end-color: transparent;
  transition: none;
}

body.post-template[data-hero-overlap][data-header-condensed] .site-header {
  position: fixed;
}

body.post-template[data-hero-overlap][data-header-condensed]:not([data-menu-open]) .site-header {
  color: var(--color-fg);
}

/* BANNER TOP — [data-banner-top] on <body> (posts that open with a colour
   band): the masthead takes the band pair (01-tokens.css) to join it. On
   <body> because CSS can't reach from .post to the header.
   Black phase only (:not([data-header-condensed])): in-flow, not sticky,
   scrolls away with the band. After that the normal white condensed bar
   takes over and still slides down. Switching to sticky here is safe
   (unlike SCROLL REVEAL's warning) because it happens far below the
   header's slot — verified at 1440×900 and 390×844.
   transition: none keeps the black phase still while [data-header-hidden]
   still primes the slide; it also prevents a black flash on scroll-up. */
body[data-banner-top]:not([data-header-condensed]) .site-header {
  position: relative;
  transition: none;
}

/* The band's colours yield to INVERTED STATE while the menu is open, so the
   header matches the panel (a #custom- colour band would otherwise win
   on specificity). */
body[data-banner-top]:not([data-header-condensed], [data-menu-open]) .site-header {
  background-color: var(--color-band-bg);
  color: var(--color-band-fg);
  /* Re-point muted text, as INVERTED STATE does (same ratio as
     --color-fg-muted-invert, so the dark band is unchanged). */
  --color-fg-muted: color-mix(in srgb, var(--color-band-fg) 60%, var(--color-band-bg) 40%);
}

/* Subscribe's pair, in the band's colours, black phase only. */
body[data-banner-top]:not([data-header-condensed], [data-menu-open]) :is(.site-header__subscribe, .site-header__account) {
  --subscribe-ink: var(--color-band-fg);
  --subscribe-paper: var(--color-band-bg);
}
