/* The growth header (HeaderGrowth.astro, HeaderSubnav.astro; landings spec v2 section B, header-v2/HEADER_FINAL.md). Tokens only;
   logical properties only, so RTL mirrors by construction; no gradient, glow or shadow; targets of at least 44 px. Served as its
   own hashed sheet only on the pages that print it (Base.astro), so the reference header's sheet and markup are untouched. */
:root { --nxg-row: 64px; --nxg-sub: 46px; --nxg-pad: max(16px, 3vw); --nxg-stuck: var(--nxg-row); scroll-padding-block-start: calc(var(--nxg-stuck) + 8px); }
:root:has(.nxg[data-nxg="l2"]) { --nxg-stuck: calc(var(--nxg-row) + var(--nxg-sub)); }
.nxg { position: sticky; inset-block-start: 0; z-index: 50; background: var(--nx-bg-canvas); color: var(--nx-text-primary); font-family: var(--nx-font-sans); border-block-end: 1px solid var(--nx-border-hairline); }
.nxg a { color: inherit; text-decoration: none; }
.nxg ul, .nxg ol { list-style: none; margin: 0; padding: 0; }
.nxg :focus-visible { outline: 2px solid var(--nx-focus, var(--nx-accent)); outline-offset: 2px; }
.nxg-i { inline-size: 18px; block-size: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nxg-chev { inline-size: 12px; block-size: 12px; transition: rotate var(--nx-motion-fast, 150ms); }
[open] > summary > .nxg-chev { rotate: 180deg; }
.nxg-flip:dir(rtl), [dir="rtl"] .nxg-flip { scale: -1 1; }
.nxg-rot { rotate: 180deg; }

.nxg-row { display: flex; align-items: center; gap: 16px; block-size: var(--nxg-row); padding-inline: var(--nxg-pad); max-inline-size: 1440px; margin-inline: auto; box-sizing: border-box; }
.nxg-brand { display: inline-flex; align-items: center; gap: 10px; min-block-size: 44px; flex: none; }
.nxg-mark { display: block; block-size: 32px; inline-size: auto; }
.nxg-tile { display: inline-grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: var(--nx-radius, 5px); background: var(--nx-accent); color: var(--nx-accent-ink); font: 600 11px/1 var(--nx-font-mono); }
.nxg-name { font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }

/* the Consortium chip: always visible, beside the mark */
.nxg-pop { position: relative; }
.nxg-pop > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; padding-inline: 8px; cursor: pointer; font-size: 14px; color: var(--nx-text-secondary); }
.nxg-pop > summary::-webkit-details-marker { display: none; }
.nxg-pop > summary:hover, .nxg-pop[open] > summary, .nxg-pop > summary[aria-current] { color: var(--nx-text-primary); }
.nxg-chip > summary { border: 1px solid var(--nx-border-default); border-radius: var(--nx-radius, 5px); padding-inline: 10px; gap: 8px; font: 500 11px/1 var(--nx-font-mono); letter-spacing: .16em; text-transform: uppercase; flex: none; }
.nxg-chip__code { color: var(--nx-text-primary); }
.nxg-chip__label { color: var(--nx-text-secondary); }
.nxg-dash { inline-size: 14px; block-size: 2px; background: var(--nx-accent); }
:is(:lang(ar), :lang(fa), :lang(ckb), :lang(ur), :lang(ps)) .nxg-chip > summary { letter-spacing: 0; text-transform: none; font-family: inherit; }
.nxg-menu { position: absolute; inset-inline-start: 0; inset-block-start: calc(100% + 4px); z-index: 70; min-inline-size: 220px; max-block-size: 70vh; overflow: auto; padding: 8px; background: var(--nx-bg-elevated); border: 1px solid var(--nx-border-default); border-radius: var(--nx-radius, 5px); }
.nxg-lang .nxg-menu { inset-inline-start: auto; inset-inline-end: 0; }
.nxg-menu a { display: flex; align-items: center; gap: 8px; min-block-size: 44px; padding-inline: 10px; border-radius: var(--nx-radius-sm, 2px); font-size: 14px; }
.nxg-menu a:hover { background: var(--nx-bg-hover); }
.nxg-menu a[aria-current] { font-weight: 600; box-shadow: inset 3px 0 0 var(--nx-accent); }
.nxg-menu a[aria-current]:dir(rtl) { box-shadow: inset -3px 0 0 var(--nx-accent); }
.nxg-menu small { margin-inline-start: auto; font: 400 12px/1 var(--nx-font-mono); color: var(--nx-text-muted); }
.nxg-menu__foundry { color: var(--nx-text-secondary); }

/* on wide screens the drawer takes no box: its links and tools are the row's own */
.nxg-drawer { display: contents; }
.nxg-drawer__head, .nxg .nxg-cta--drawer, .nxg-cons-drawer { display: none; }
.nxg-links { flex: 1; min-inline-size: 0; }
.nxg-links > ul { flex-wrap: nowrap; }
.nxg-links > ul { display: flex; align-items: center; gap: 2px clamp(6px, 1.4vw, 22px); }
.nxg-links > ul > li > a, .nxg-explore > .nxg-pop > summary, .nxg-mm > .nxg-pop > summary { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 6px; font-size: 14.5px; white-space: nowrap; color: var(--nx-text-secondary); cursor: pointer; }
.nxg-links > ul > li > a:hover, .nxg-links > ul > li > a[aria-current], .nxg-explore > .nxg-pop > summary:hover, .nxg-explore > .nxg-pop[open] > summary, .nxg-explore > .nxg-pop > summary[aria-current], .nxg-mm > .nxg-pop > summary:hover, .nxg-mm > .nxg-pop[open] > summary, .nxg-mm > .nxg-pop > summary[aria-current] { color: var(--nx-text-primary); box-shadow: inset 0 -2px 0 var(--nx-accent); }
.nxg-explore > .nxg-pop, .nxg-mm > .nxg-pop { position: static; }
.nxg-mega { position: absolute; inset-inline: 0; inset-block-start: 100%; z-index: 60; background: var(--nx-bg-elevated); border-block-end: 1px solid var(--nx-border-hairline-strong, var(--nx-border-default)); padding: 24px var(--nxg-pad) 28px; max-block-size: calc(100vh - var(--nxg-stuck)); overflow: auto; }
.nxg-mega__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 32px; max-inline-size: 1280px; margin-inline: auto; }
.nxg-mega h3 { margin: 0 0 4px; font: 500 11px/1.3 var(--nx-font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--nx-text-secondary); }
.nxg-mega h3 a { display: inline-flex; align-items: center; min-block-size: 44px; color: var(--nx-text-primary); }
.nxg-mega li a { display: flex; align-items: center; min-block-size: 44px; padding-inline: 8px; margin-inline: -8px; border-radius: var(--nx-radius-sm, 2px); font-size: 14px; color: var(--nx-text-secondary); }
.nxg-mega li a:hover, .nxg-mega li a[aria-current] { background: var(--nx-bg-hover); color: var(--nx-text-primary); }
:is(:lang(ar), :lang(fa), :lang(ckb), :lang(ur), :lang(ps)) .nxg-mega h3 { letter-spacing: 0; text-transform: none; font-family: inherit; }
.nxg-lang > summary { font: 600 12.5px/1 var(--nx-font-sans); }
.nxg-tools { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.nxg-theme { display: inline-flex; gap: 2px; }
.nxg-theme button { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border: 0; border-radius: var(--nx-radius-sm, 2px); background: none; color: var(--nx-text-secondary); cursor: pointer; }
.nxg-theme button:hover { background: var(--nx-bg-hover); color: var(--nx-text-primary); }
.nxg-theme button[aria-pressed="true"] { color: var(--nx-text-primary); box-shadow: inset 0 -2px 0 var(--nx-accent); }
.nxg-theme__auto { display: none !important; }
.nxg-signin { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 10px; font-size: 14px; color: var(--nx-text-secondary); }
.nxg-signin:hover { color: var(--nx-text-primary); }
.nxg-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 44px; padding-inline: 18px; border: 1px solid var(--nx-accent); border-radius: var(--nx-radius, 5px); background: var(--nx-accent); color: var(--nx-accent-ink) !important; font-size: 14px; font-weight: 500; white-space: nowrap; flex: none; }
.nxg-cta:hover { background: var(--nx-accent-strong); border-color: var(--nx-accent-strong); }
.nxg-cta--outline { background: transparent; color: var(--nx-text-primary) !important; border-color: var(--nx-border-strong, var(--nx-border-default)); }
.nxg-cta--outline:hover { background: var(--nx-bg-hover); border-color: var(--nx-accent); }
.nxg-cta__short { display: none; }
.nxg-ctl { display: inline-grid; place-items: center; min-inline-size: 44px; min-block-size: 44px; border-radius: var(--nx-radius-sm, 2px); }
.nxg-ctl:hover { background: var(--nx-bg-hover); }
.nxg-burger { display: none; }
@media (max-width: 1279px) { .nxg-chip__label, .nxg-signin { display: none; } .nxg-drawer .nxg-signin { display: inline-flex; } }
@media (max-width: 1439px) and (min-width: 1100px) { .nxg-cta__long { max-inline-size: 22ch; overflow: hidden; text-overflow: ellipsis; } .nxg-cta__long { display: none; } .nxg-cta__short { display: inline; } }

/* ---- level 2: the 46 px section bar */
.nxg-sub { border-block-start: 1px solid var(--nx-border-hairline); background: var(--nx-bg-canvas); }
.nxg-sub__in { display: flex; align-items: center; gap: 20px; block-size: var(--nxg-sub); padding-inline: var(--nxg-pad); max-inline-size: 1440px; margin-inline: auto; box-sizing: border-box; }
.nxg-sub__name { display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--nx-font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--nx-text-secondary); white-space: nowrap; }
.nxg-dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--nx-accent); }
:is(:lang(ar), :lang(fa), :lang(ckb), :lang(ur), :lang(ps)) .nxg-sub__name { letter-spacing: 0; text-transform: none; font-family: inherit; }
.nxg-sub__back { max-inline-size: 48%; overflow: hidden; text-overflow: ellipsis; display: none; align-items: center; gap: 6px; min-block-size: 44px; font-size: 13px; color: var(--nx-text-secondary); white-space: nowrap; }
.nxg-sub__tabs { flex: 1; min-inline-size: 0; overflow-x: auto; scrollbar-width: none; }
.nxg-sub__tabs ol { display: flex; gap: 2px 18px; }
.nxg-sub__tabs a { display: inline-flex; align-items: center; block-size: var(--nxg-sub); min-inline-size: 44px; justify-content: center; font-size: 13.5px; color: var(--nx-text-secondary); white-space: nowrap; }
.nxg-sub__tabs a:hover, .nxg-sub__tabs a[aria-current] { color: var(--nx-text-primary); box-shadow: inset 0 -2px 0 var(--nx-accent); }
.nxg-sub__go { display: inline-flex; align-items: center; min-block-size: 36px; padding-inline: 14px; border-radius: var(--nx-radius, 5px); background: var(--nx-accent); color: var(--nx-accent-ink) !important; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.nxg-sub__go:hover { background: var(--nx-accent-strong); }

/* ---- below 1100 px: mark, the short action and the menu button; the drawer holds the rest */
@media (max-width: 1099px) {
  .nxg-row { gap: 10px; }
  .nxg-name, .nxg-chip { display: none; }
  .nxg-brand { margin-inline-end: auto; }
  .nxg-burger { display: inline-grid; }
  .nxg-cta__long { display: none; } .nxg-cta__short { display: inline; }
  .nxg-cta--bar { padding-inline: 14px; }
  .nxg-drawer { display: none; position: fixed; inset: 0; z-index: 80; overflow: auto; overscroll-behavior: contain; background: var(--nx-bg-canvas); padding-block-end: 32px; }
  .nxg-drawer:target, .nxg[data-open] .nxg-drawer { display: block; }
  .nxg-drawer__head { display: flex; align-items: center; justify-content: space-between; min-block-size: var(--nxg-row); padding-inline: var(--nxg-pad); border-block-end: 1px solid var(--nx-border-hairline); font-weight: 600; }
  .nxg-links { padding: 8px var(--nxg-pad); border-block-end: 1px solid var(--nx-border-hairline); }
  .nxg-links > ul { flex-direction: column; align-items: stretch; }
  .nxg-links > ul > li > a, .nxg-explore > .nxg-pop > summary { min-block-size: 48px; font-size: 18px; inline-size: 100%; color: var(--nx-text-primary); justify-content: space-between; padding-inline: 0; }
  .nxg-mega { position: static; border: 0; padding: 0 0 12px; max-block-size: none; background: none; }
  .nxg-mega__grid { grid-template-columns: 1fr; }
  .nxg-tools { flex-wrap: wrap; padding: 12px var(--nxg-pad); gap: 8px 12px; }
  .nxg-theme__auto { display: inline-grid !important; }
  .nxg-tools > .nxg-pop, .nxg-tools > .nxg-lang { inline-size: 100%; }
  .nxg-tools .nxg-pop > summary { inline-size: 100%; justify-content: space-between; border-block-end: 1px solid var(--nx-border-hairline); font-size: 16px; padding-inline: 0; }
  .nxg-menu { position: static; border: 0; padding: 0 0 8px; }
  .nxg .nxg-cta--drawer { display: inline-flex; inline-size: 100%; }
  .nxg-cons-drawer { display: block; }
  .nxg-sub__name { display: none; }
  .nxg-sub__back { display: inline-flex; }
  .nxg-sub__go { display: none; }
}
@media (max-width: 479px) { .nxg-cta--bar .nxg-i { display: none; } }
@media (prefers-reduced-motion: reduce) { .nxg-chev { transition: none; } }
@media (forced-colors: active) { .nxg-cta, .nxg-sub__go { border: 1px solid ButtonText; } }

/* ---- mega menus with icons (owner 2026-11-23): lead panel, icon tiles, name and muted description, hover row, 4 px chips */
.nxg { --nx-icon-plane: var(--nx-accent); --nx-icon-plane-opacity: .4; }
.nxg .nx-ld-ico { flex: none; inline-size: 20px; block-size: 20px; overflow: visible; color: inherit; }
.nxg .nx-ld-ico[data-size="sm"] { inline-size: 18px; block-size: 18px; }
.nxg .nx-ld-ico-plane { fill: var(--nx-icon-plane); fill-opacity: var(--nx-icon-plane-opacity); }
.nxg .nx-ld-ico-line { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nxg .nx-ld-ico-ko { fill: var(--nx-bg-elevated); }
.nxg .nx-ld-ico[data-size="sm"] .nx-ld-ico-ap { stroke-dasharray: none; }
.nxg-ico { display: inline-grid; place-items: center; inline-size: 36px; block-size: 36px; flex: none; border: 1px solid var(--nx-border-hairline); border-radius: 4px; background: var(--nx-bg-canvas); color: var(--nx-text-primary); }
.nxg-ico--sm { inline-size: 28px; block-size: 28px; }
.nxg-ico--lg { inline-size: 44px; block-size: 44px; }
.nxg-ico--lg .nx-ld-ico { inline-size: 26px; block-size: 26px; }
.nxg-ico--code { font: 500 10px/1 var(--nx-font-mono); letter-spacing: .04em; }
.nxg-mega { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 8px 40px; }
.nxg-mega > * { max-inline-size: none; }
.nxg-mega__lead { display: grid; align-content: start; gap: 10px; padding-block: 4px; }
.nxg-mega__lead h3 { margin: 0; font: 500 20px/1.2 var(--nx-font-sans); letter-spacing: -.01em; text-transform: none; color: var(--nx-text-primary); }
.nxg-mega__lead p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--nx-text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nxg-all { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; font-size: 14px; font-weight: 500; color: var(--nx-accent-text); }
.nxg-all:hover { text-decoration: underline !important; }
.nxg-mega__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; align-content: start; }
.nxg .nxg-item, .nxg-mega li a.nxg-item, .nxg-menu a.nxg-item { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i t" "i d"; column-gap: 12px; align-items: center; min-block-size: 44px; padding: 8px 10px; margin-inline: -10px; border-radius: 4px; color: var(--nx-text-primary); }
.nxg-item .nxg-ico { grid-area: i; align-self: start; }
.nxg-item__t { grid-area: t; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.nxg-item__d { grid-area: d; font-size: 12.5px; line-height: 1.4; color: var(--nx-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nxg-item:hover, .nxg-item[aria-current] { background: var(--nx-bg-hover); }
.nxg-item:hover .nxg-ico, .nxg-item[aria-current] .nxg-ico { border-color: var(--nx-accent); }
.nxg-item--row { grid-template-areas: "i t"; align-items: center; padding-block: 4px; }
.nxg-item--row .nxg-item__t { font-weight: 400; color: var(--nx-text-secondary); }
.nxg-item--row:hover .nxg-item__t { color: var(--nx-text-primary); }
.nxg-explore .nxg-mega { display: block; }
.nxg-mega h3 a { gap: 10px; }
/* the Consortium chip's panel: the networks, each with its code mark and its one-line role */
.nxg-chip { position: static; }
.nxg-mega--cons { display: block; }
.nxg-cons { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 24px; max-inline-size: 1280px; margin-inline: auto; }
.nxg-cons-drawer .nxg-cons { display: block; padding-block-end: 8px; }
.nxg-sub__n { font: 500 10px/1 var(--nx-font-mono); color: var(--nx-text-muted); font-style: normal; }
.nxg-sub__tabs a { gap: 6px; }
.nxg-sub__tabs .nx-ld-ico { inline-size: 16px; block-size: 16px; }
@media (max-width: 1099px) {
  .nxg-mega { display: block; position: static; padding: 0 0 12px; }
  .nxg-mega__lead { padding-block-end: 8px; }
  .nxg-mega__items, .nxg-cons { grid-template-columns: 1fr; }
  .nxg-mm > .nxg-pop > summary { min-block-size: 48px; font-size: 18px; inline-size: 100%; color: var(--nx-text-primary); justify-content: space-between; padding-inline: 0; }
  .nxg-links .nxg-mm { inline-size: 100%; }
  .nxg-sub__n { display: none; }
}

.nxg-ico img { display: block; inline-size: 24px; block-size: 24px; object-fit: contain; }

/* ---- the subsite header (HeaderSubsite.astro): a 36 px parent row and a 60 px identity bar */
:root:has(.nxg--sub) { --nxg-stuck: 96px; }
.nxg--sub { --nxg-row: 60px; }
.nxg-par { border-block-end: 1px solid var(--nx-border-hairline); background: var(--nx-bg-elevated); }
.nxg-par__in { display: flex; align-items: center; gap: 12px; block-size: 36px; padding-inline: var(--nxg-pad); max-inline-size: 1440px; margin-inline: auto; box-sizing: border-box; }
.nxg-par__gap { flex: 1; }
.nxg-brand--sm { min-block-size: 36px; gap: 8px; }
.nxg-brand--sm .nxg-mark { block-size: 20px; }
.nxg-brand--sm .nxg-name { font-size: 13px; color: var(--nx-text-secondary); }
.nxg-par .nxg-pop > summary, .nxg-par .nxg-signin { min-block-size: 36px; font-size: 13px; }
.nxg-par .nxg-chip > summary { padding-block: 0; }
.nxg-par .nxg-theme button { inline-size: 36px; block-size: 36px; }
.nxg-par .nxg-pop { position: relative; }
.nxg-par .nxg-chip { position: static; }
.nxg-par__in, .nxg-idbar__in { position: relative; }
.nxg-idbar__in { display: flex; align-items: center; gap: 20px; block-size: 60px; padding-inline: var(--nxg-pad); max-inline-size: 1440px; margin-inline: auto; box-sizing: border-box; }
.nxg-idbar__home { display: inline-flex; align-items: center; gap: 12px; min-block-size: 44px; flex: none; }
.nxg-sq { display: inline-grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: var(--nx-radius, 5px); background: var(--nx-accent); color: var(--nx-accent-ink); font: 600 16px/1 var(--nx-font-sans); }
.nxg-idbar__t { font-size: 17px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.nxg--sub .nxg-mega--groups { display: block; }
.nxg--sub .nxg-mega__grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nxg--sub .nxg-mega h3 { margin: 0 0 4px; }
.nxg--sub .nxg-mega .nxg-all { margin-block-start: 8px; }
.nxg--sub .nxg-links { flex: 1; }
.nxg--sub .nxg-drawer .nxg-tools { display: none; }
@media (max-width: 1099px) {
  .nxg--sub .nxg-drawer .nxg-tools { display: flex; }
  .nxg-par .nxg-chip, .nxg-par .nxg-theme { display: none; }
  .nxg--sub .nxg-brand { margin-inline-end: 0; }
  .nxg-idbar__t { font-size: 16px; }
  .nxg-idbar__home { margin-inline-end: auto; }
  .nxg--sub .nxg-name { display: inline; }
}

/* the links never overflow their box: each is one line and none shrinks; script (header-menus-js.ts) hides the trailing ones that
   do not fit. Without script, fewer links below wide screens: the rest stay in Explore. */
.nxg-links > ul > li { flex: none; }
.nxg-links > ul { min-inline-size: 0; }
.nxg-links > ul > li[hidden] { display: none; }
@media (min-width: 1100px) and (max-width: 1499px) { .nxg:not(.nxg--sub) .nxg-links > ul > .nxg-mm:nth-child(n+4), .nxg:not(.nxg--sub) .nxg-links > ul > li:not(.nxg-explore):nth-child(n+4) { display: none; } }
@media (min-width: 1100px) and (max-width: 1279px) { .nxg:not(.nxg--sub) .nxg-links > ul > li:not(.nxg-explore):nth-child(n+3) { display: none; } }
