/* =====================================================================
   The family bar and footer on defxn.com
   ---------------------------------------------------------------------
   Since 2026-10-19 (owner: defxn.com is the DEFXN family HOME, docs/ux-audit/plan.md) the
   header is the kit bar every DEFXN product wears (assets/kit/defxn-components.css, .dx-bar*,
   mounted by js/resolvers/header.js with DefxnKit.mountShell mode 'home'), and the footer is
   the kit footer (.dx-foot, DefxnKit.renderFooter, js/hero-motion.js). This file only DRESSES
   them for the scene: the bar lives inside the poster (#scene, absolutely placed, pages scroll
   under it in their own scrollers), and this site keeps its own controls in the bar -- the
   Resolutions menu, Account, Run DEFXN, the network pill and the all-pages MENU.

   Rules that read like overrides restate the kit against older site sheets that still style
   .ark-header with !important (css/settings.css, site-direction.css, components.css,
   focus.css, color-system.css, home-drafting.css, icons.css, resolutions.css); they go when
   those rules are deleted.

   Palette: tokens only, so the bar follows whichever of the five theme families is active
   (html[data-theme]); nothing here names a colour.
   ===================================================================== */

/* ---- The bar --------------------------------------------------------------
   Placement only: the bar's look and its home-mode behaviour (no part shrinks, one row on a
   phone, the nav in the MENU from 1040px down, the switcher panel hanging from the bar) are the
   kit's own rules ([data-dx-mode="home"] in assets/kit/defxn-components.css). Here it is placed
   in the scene, under the device's safe area. */
#scene .ark-header {
 position:absolute; top:0; left:0; right:0; z-index:20;
 height:calc(var(--dx-bar-h) + env(safe-area-inset-top,0px));
 padding-top:env(safe-area-inset-top,0px);
 padding-left:max(var(--dx-gutter),env(safe-area-inset-left,0px));
 padding-right:max(var(--dx-gutter),env(safe-area-inset-right,0px));
 box-sizing:border-box; pointer-events:auto;
}
.ark-header::after { content:none; }
/* The brand is the bare mark: css/focus.css leaves it (.header-mark, js/resolvers/header.js) and the nav's links
   (the kit's raised segment) out of the fill it gives current and focused header links. */
/* a control the row fit moved out (a nav link, or Get FXN Browser) */
#scene .ark-header .header-collapsed { display:none; }
#scene .ark-header .native-icon { width:16px; height:16px; flex-basis:16px; }
#scene .ark-header .header-core-links .native-icon { opacity:.75; }

/* ---- The "you" control: Account + network + MENU in one (owner, 2026-10-25) --------------------
   One button: the avatar, your name over the network you are on, a chevron. It opens one panel in
   layers (js/resolvers/header.js onMount): you and your one next step, your network (its own
   layer), then the critical pages. The panel wears the Products switcher's dress -- the 2px
   primary top, the 12px radius, mono hairline labels -- so the bar's two panels are one family. */
#scene .ark-header .nav-toggle.header-you {
 display:inline-flex; align-items:center; gap:10px; height:36px; min-width:0; padding:0 10px 0 4px;
 border:1px solid var(--dx-edge,hsl(var(--border-control))); border-radius:var(--dx-radius,8px);
 background:hsl(var(--surface)); color:hsl(var(--text-strong)); cursor:pointer; text-align:left;
 transition:background-color .15s ease,border-color .15s ease;
}
#scene .ark-header .header-you:hover,
#scene .ark-header.nav-open .header-you { background:hsl(var(--raised)); border-color:hsl(var(--border-strong)); }
.header-you-avatar {
 display:inline-grid; place-items:center; flex:0 0 auto; width:28px; height:28px; border-radius:6px;
 background:hsl(var(--nested)); color:hsl(var(--text-muted)); box-shadow:inset 0 0 0 1px hsl(var(--border-subtle));
}
.header-you-avatar svg, .header-you-avatar .native-icon { width:15px; height:15px; }
[data-you="in"] .header-you-avatar { color:hsl(var(--trust,var(--success))); box-shadow:inset 0 0 0 1px hsl(var(--trust,var(--success)) / .55); }
.header-you-words { display:flex; flex-direction:column; gap:3px; min-width:0; }
.header-you-name { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 var(--fs-tertiary, 11px)/1.1 var(--dx-font-sans,var(--font-sans,sans-serif)); }
.header-you-net { display:flex; align-items:center; gap:5px; font:500 var(--fs-tertiary, 11px)/1.1 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.04em; color:hsl(var(--text-muted)); white-space:nowrap; }
.header-chain-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:hsl(var(--trust,var(--success))); flex:0 0 auto; }
.header-you-chev { width:12px; height:12px; flex:0 0 auto; color:hsl(var(--text-muted)); transition:transform .15s ease; }
#scene .ark-header.nav-open .header-you-chev { transform:rotate(180deg); }

/* an open panel lifts the bar over the page's layers (was .products-open) */
#scene .ark-header:has(.ark-popover[data-state="open"]) { z-index:60; }

/* The panel. Once pressed it is Ark's popover block, which places it under the button; top/right are
   where the plain panel opens before that, or if the chunk fails. */
#scene .ark-header #primary-navigation {
 position:fixed; top:calc(var(--dx-bar-h) + env(safe-area-inset-top,0px) + 6px); right:max(var(--dx-gutter),env(safe-area-inset-right,0px)); left:auto; z-index:44;
 width:min(360px,calc(100vw - 16px)); max-width:none; min-width:0; max-height:calc(100dvh - var(--dx-bar-h) - 24px);
 overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:hsl(var(--border-strong)) transparent;
 display:block; padding:0; color:hsl(var(--text)); font:inherit;
 border:1px solid hsl(var(--border-default)); border-top:2px solid hsl(var(--primary-400)); border-radius:12px;
 background:linear-gradient(hsl(var(--text-strong) / .04),hsl(var(--text-strong) / .04)),hsl(var(--overlay));
 box-shadow:0 24px 60px hsl(0 0% 0% / .45);
}
#scene .ark-header #primary-navigation[hidden] { display:none; }
#primary-navigation .nav-layer { display:grid; gap:4px; padding:10px; }
#primary-navigation .nav-layer[hidden] { display:none; }
#primary-navigation .nav-layer-in { animation:you-layer-in .18s cubic-bezier(.22,.7,.18,1) both; }
@keyframes you-layer-in { from { transform:translateX(10px); clip-path:inset(0 0 0 10px); } to { transform:none; clip-path:inset(0); } }
@media(prefers-reduced-motion:reduce) { #primary-navigation .nav-layer-in { animation:none; } }

/* layer 1, head: who you are, one sentence for your state, its one action */
.header-you-head {
 display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px 12px; padding:12px;
 border-radius:8px; background:hsl(var(--text-strong) / .04); box-shadow:inset 0 0 0 1px hsl(var(--border-subtle));
}
.header-you-head .header-you-avatar { width:40px; height:40px; border-radius:8px; }
.header-you-head .header-you-avatar svg, .header-you-head .header-you-avatar .native-icon { width:20px; height:20px; }
.header-you-who { display:grid; gap:3px; min-width:0; }
.header-you-who .header-account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 15px/1.2 var(--dx-font-sans,var(--font-sans,sans-serif)); color:hsl(var(--text-strong)); letter-spacing:-.01em; }
.header-you-who .header-account-status { display:flex; align-items:center; gap:6px; font:500 10px/1.2 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.1em; text-transform:uppercase; color:hsl(var(--text-muted)); }
.header-you-who .header-account-status::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
[data-you="in"] .header-account-status { color:hsl(var(--trust,var(--success))); }
.header-you-line { grid-column:1 / -1; margin:0; font:400 12px/1.45 var(--dx-font-sans,var(--font-sans,sans-serif)); color:hsl(var(--text-muted)); }
#scene .ark-header .header-you-go {
 grid-column:1 / -1; display:flex; align-items:center; justify-content:center; height:36px; border-radius:8px;
 background:hsl(var(--primary)); color:hsl(var(--text-inverse)); font:600 13px/1 var(--dx-font-sans,var(--font-sans,sans-serif)); text-decoration:none;
}
#scene .ark-header .header-you-go:is(:hover,:focus-visible) { background:hsl(var(--primary-600,var(--primary))); color:hsl(var(--text-inverse)) !important; }
#scene .ark-header .header-you-head[data-you="in"] .header-you-go { background:hsl(var(--text-strong) / .08); color:hsl(var(--text-strong)); }

/* layer 1, the network row: what you are on, and the way into its layer */
.header-you-netrow {
 display:flex; align-items:center; gap:10px; width:100%; height:40px; padding:0 12px; margin-top:2px;
 border:0; border-radius:8px; background:transparent; color:hsl(var(--text)); cursor:pointer; text-align:left;
 font:500 12px/1 var(--dx-font-sans,var(--font-sans,sans-serif)); transition:background-color .15s ease;
}
.header-you-netrow:hover { background:hsl(var(--text-strong) / .06); }
.header-you-netrow-label { font:600 9px/1 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.12em; text-transform:uppercase; color:hsl(var(--text-muted)); }
.header-you-netrow-value { display:flex; align-items:center; gap:6px; margin-left:auto; color:hsl(var(--text-strong)); font-family:var(--dx-font-mono,var(--font-mono,monospace)); font-size:11px; }
.header-you-netrow-go { color:hsl(var(--text-muted)); font-size:16px; line-height:1; }

/* layer 1, the pages: icon, name, the journey it starts */
#primary-navigation .nav-layer-heading { margin:8px 12px 2px; font:600 9px/1.4 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.12em; text-transform:uppercase; color:hsl(var(--text-muted)); }
.header-you-pages { display:grid; gap:1px; margin:0; padding:0; list-style:none; }
#scene .ark-header .header-you-page {
 display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:40px; padding:4px 12px 4px 6px;
 border-radius:8px; background:none; color:hsl(var(--text)); text-decoration:none; transition:background-color .15s ease,color .15s ease;
}
#scene .ark-header .header-you-page:hover { background:hsl(var(--text-strong) / .06); color:hsl(var(--text-strong)); }
#scene .ark-header .header-you-page[aria-current="page"] { background:hsl(var(--text-strong) / .08); color:hsl(var(--text-strong)); box-shadow:inset 2px 0 0 hsl(var(--primary)); }
.header-you-page-mark { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:6px; background:hsl(var(--text-strong) / .05); color:hsl(var(--text-muted)); }
.header-you-page-mark svg, .header-you-page-mark .native-icon { width:14px; height:14px; }
.header-you-page-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:500 13px/1.2 var(--dx-font-sans,var(--font-sans,sans-serif)); }
.header-you-page-meta { font:500 9px/1 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.1em; text-transform:uppercase; color:hsl(var(--text-faint)); }

/* layer 2, the network */
#primary-navigation .nav-layer-top { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 2px 4px; }
#primary-navigation .nav-layer-back {
 height:32px; padding:0 10px; border:0; border-radius:6px; background:transparent; color:hsl(var(--text-muted)); cursor:pointer;
 font:600 12px/1 var(--dx-font-sans,var(--font-sans,sans-serif));
}
#primary-navigation .nav-layer-back:hover { background:hsl(var(--text-strong) / .06); color:hsl(var(--text-strong)); }
#primary-navigation .nav-layer-depth { font:600 9px/1 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.12em; text-transform:uppercase; color:hsl(var(--text-faint)); padding-right:8px; }
#primary-navigation .nav-layer-title { margin:4px 10px 0; font:600 18px/1.2 var(--dx-font-sans,var(--font-sans,sans-serif)); letter-spacing:-.01em; color:hsl(var(--text-strong)); }
#primary-navigation .nav-layer-note { margin:0 10px 8px; font:400 12px/1.45 var(--dx-font-sans,var(--font-sans,sans-serif)); color:hsl(var(--text-muted)); }
#primary-navigation .network-options { padding:0 2px 2px; }
#primary-navigation .network-option { height:40px; padding:0 12px; border-radius:8px; font-size:13px; }

/* The real network listbox (js/ark/dense-wire-wallet.mjs::mountNetworkSelect) -- never a native
   <select>: its open state is unstyleable OS chrome. Shared by every mount of this control (the
   "you" panel, the account page's Wallet tab), so there is one styled option list, not a patched select. */
.network-options { display:flex; flex-direction:column; gap:4px; }
.network-option {
 display:flex; align-items:center; gap:8px; width:100%; height:36px; padding:0 10px;
 border:0; border-radius:6px; background:transparent; color:hsl(var(--text-muted));
 font:500 12px/1.2 var(--font-sans,"Albert Sans",sans-serif); text-align:left; cursor:pointer;
 transition:background-color 150ms ease,color 150ms ease;
}
.network-option::before { content:""; width:6px; height:6px; border-radius:50%; background:transparent; flex:0 0 auto; border:1px solid hsl(var(--text-faint)); }
.network-option:hover { background:hsl(var(--raised)); color:hsl(var(--text-strong)); }
.network-option.is-selected { color:hsl(var(--text-strong)); background:hsl(var(--reference-100)); }
.network-option.is-selected::before { background:hsl(var(--trust,var(--success))); border-color:hsl(var(--trust,var(--success))); }
.network-option:focus-visible { outline:2px solid hsl(var(--reference)); outline-offset:-2px; }

/* ---- One row: the mark alone on the left, every control on the right (owner, 2026-10-25) ----
   The bar's own dress in home mode is the kit's (assets/kit/defxn-components.css, from
   flux/defxn-product-kit; moved there from this file 2026-10-28): the mark only, set in the bar's
   LEFT PADDING; the controls 36px tall in one cluster on the right; from 1040.02px the Products
   trigger and the nav as one segmented control, then a hairline; the Products panel dressed like
   the "you" panel, 1200x700 at most, its role tokens inherited so a worn NFT skin reaches it.
   What stays here is this site's own share of that row. The padding gains the mark's room, so the
   row fit in js/resolvers/header.js, which subtracts the padding from the room, still counts the
   mark's space exactly; margins are not counted, so the cluster is pushed right with a margin. */
#scene .ark-header[data-dx-mode] {
 --hdr-mark-room:40px;   /* the 24px mark + 16px before the cluster could ever reach it */
 padding-left:calc(max(var(--dx-gutter),env(safe-area-inset-left,0px)) + var(--hdr-mark-room));
}
/* a phone keeps the 30px the in-row mark took (24px + the 6px gap): 360px had no spare 10px */
@media(max-width:640px) { #scene .ark-header[data-dx-mode] { --hdr-mark-room:30px; } }
/* Get FXN Browser leads the cluster (a bar child just before the family, js/resolvers/header.js):
   it carries the push to the right, so the part after it does not; when the row fit folds it
   away, the kit's push (on the family) returns. */
#scene .ark-header[data-dx-mode] .header-run-link { margin-left:auto; flex:0 0 auto; }
#scene .ark-header[data-dx-mode] .header-run-link:not(.header-collapsed) + * { margin-left:0; }

/* One control shape across the cluster: 36px tall, the kit radius, the kit edge. Get FXN Browser
   was a 999px pill beside 8px squares; it keeps its soft tint: it is the bar's one action. */
#scene .ark-header .header-run-link { border-radius:var(--dx-radius,8px); }
#scene .ark-header .header-core-links .native-icon { width:14px; height:14px; flex-basis:14px; }
#scene .ark-header .header-run-link { min-height:36px; padding:0 12px; gap:6px; font:600 var(--fs-tertiary)/1 var(--dx-font-sans); }   /* the bar's words are the scale's 11 (owner, 2026-10-25: 12px was off the scale) */

/* ---- The footer: one quiet glass bar in the scene's bottom band (redesigned 2026-10-25, owner: "a disaster") ----
   It was four type styles in one row (16px mono links, a 12px mono copyright, a mono-serif name, an all-caps Back) with
   the settings gear floating outside it. Now it is one bar, dressed like the header: canvas glass, a hairline edge, the
   kit radius. Left: the settings gear (css/settings.css places it; here it is drawn inside the bar) and the family name.
   Middle: the site's section links (one per journey, js/hero-motion.js) in the sans at 13px, the current one marked by
   the primary underline. Right: the rights line, small and faint, and Back as a small outlined control. The bar's own
   dress (the glass, the edge, the 54px room for the gear, the family name from 860.02px) is the kit's home footer
   ([data-dx-mode="home"], moved there from this file 2026-10-28); this file places the strip and dresses this site's
   links, lines and controls in it. */
#scene .site-footer-strip {
 position:absolute; z-index:14; left:max(14px,env(safe-area-inset-left,0px)); right:max(14px,env(safe-area-inset-right,0px)); bottom:max(12px,env(safe-area-inset-bottom,0px));
 height:44px; pointer-events:none;
}
#scene .site-footer-strip > :not([data-ark-skin-deco]) { pointer-events:auto; }   /* a card skin's pieces stay unclickable: its corners had caught footer clicks */
#scene .site-footer-strip nav { gap:2px; }
#scene .site-footer-strip nav a {
 position:relative; display:inline-flex; align-items:center; height:32px; min-height:32px; padding:0 10px; border-radius:8px;
 font:500 13px/1 var(--dx-font-sans,var(--font-sans,sans-serif)); letter-spacing:0; text-transform:none;
 color:hsl(var(--text-muted)); background:none; text-decoration:none; transition:color .15s ease, background-color .15s ease;
}
#scene .site-footer-strip nav a:hover { color:hsl(var(--text-strong)); background:hsl(var(--text-strong) / .06); }
#scene .site-footer-strip nav a[aria-current="page"] { color:hsl(var(--text-strong)); }
#scene .site-footer-strip nav a[aria-current="page"]::after { content:""; position:absolute; left:10px; right:10px; bottom:3px; height:2px; border-radius:2px; background:hsl(var(--primary)); }
/* the credit and rights line join the row (css/settings.css still places them on their own) */
#scene .site-footer-strip :is(.site-credit,.site-copyright,.site-price) { position:static; font:500 11px/1 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.04em; color:hsl(var(--text-faint)); }
/* Back (js/hero-motion.js) closes the row: a small outlined control, the header's shape at its smaller size */
#scene .site-footer-strip .hero-motion-toggle {
 position:static; display:inline-flex; align-items:center; height:30px; min-height:30px; padding:0 12px; border:1px solid hsl(var(--border-default)); border-radius:8px;
 background:hsl(var(--surface) / .6); color:hsl(var(--text)); font:600 10.5px/1 var(--dx-font-mono,var(--font-mono,monospace)); letter-spacing:.08em;
 text-transform:uppercase; white-space:nowrap; cursor:pointer; transition:color .15s ease, border-color .15s ease, background-color .15s ease;
}
#scene .site-footer-strip .hero-motion-toggle:hover { color:hsl(var(--text-strong)); border-color:hsl(var(--border-strong)); background:hsl(var(--raised)); letter-spacing:.08em; }
/* the settings gear stands inside the bar's left end (css/settings.css owns the control; this only places and sizes it) */
#scene .site-settings { left:calc(max(14px,env(safe-area-inset-left,0px)) + 6px); bottom:calc(max(12px,env(safe-area-inset-bottom,0px)) + 5px); }
#scene .site-settings, #scene .site-settings .settings-root { width:34px; }
#scene .site-settings .settings-trigger { width:34px; height:34px; border-radius:8px; font-size:16px; }
/* Narrower screens: the credit steps back, then the rights line, then the name; the section links and Back always stay
   (the links scroll sideways when they still do not fit). The credit shows from 1600px. */
@media(max-width:1599.98px) { #scene .site-footer-strip .site-credit { display:none; } }
@media(max-width:1023.98px) { #scene .site-footer-strip .site-copyright { display:none; } }
/* the price says absent in the faint text; a live price reads in the strong text */
#scene .site-footer-strip .site-price { white-space:nowrap; }
/* a phone's strip is all links: the price there covered "Interface palette" (390px) */
@media(max-width:639.98px) { #scene .site-footer-strip .site-price { display:none; } }
#scene .site-footer-strip .site-price[data-price-state="live"] { color:hsl(var(--text-strong)); }
@media(max-width:760px) {
 #scene .site-footer-strip { left:8px; right:8px; bottom:8px; }
 #scene .site-settings { left:14px; bottom:13px; }
 #scene .site-footer-strip nav { overflow-x:auto; scrollbar-width:none; -webkit-mask-image:linear-gradient(90deg, #000 85%, transparent); mask-image:linear-gradient(90deg, #000 85%, transparent); }
 #scene .site-footer-strip nav a { padding:0 8px; font-size:12px; }
 .hero-alive[data-page="zero"] .ark-hero-body { bottom:165px; }
}
@media(max-width:480px) { .ark-studio-label { max-width:85px; line-height:1.5; } }

/* ---- Widths: this site's own controls ----------------------------------------
   The bar's own widths (its nav from 1040px down, one row on a phone, the sub-brand below
   1440px) are the kit's home mode. What stays here is this site's controls at phone sizes. */
/* A phone: the "you" control is its avatar, with the network dot on its corner and the chevron;
   its name and title still say who, the state and the network (js/resolvers/header.js). */
@media(max-width:440px) {
 #scene .ark-header .nav-toggle.header-you { gap:6px; padding:0 8px 0 3px; }
 #scene .ark-header .header-you-words { display:none; }
 #scene .ark-header .header-you > .header-you-avatar { position:relative; }
 #scene .ark-header .header-you > .header-you-avatar::after { content:""; position:absolute; right:-2px; bottom:-2px; width:7px; height:7px; border-radius:50%; background:hsl(var(--trust,var(--success))); box-shadow:0 0 0 2px hsl(var(--surface)); }
}
/* The current header link, but not the brand, and not a nav link: a current nav segment is the kit's raised
   segment (assets/kit/defxn-components.css), not a second fill. :where() keeps the rule's weight where it was.
   Moved here from css/focus.css on 2026-10-28: the header's own sheet holds the header's classes. This sheet
   loads just before focus.css, so the cascade order is unchanged. */
#scene .ark-header a[aria-current="page"]:not(.header-mark):not(:where(.header-core-links a)) { color:hsl(var(--text-strong)) !important; background-color:hsl(var(--nested)); }
