/* ═══════════════════════════════════════════════════════════════════════════
   SageX - chrome
   Site header · site footer
   ═══════════════════════════════════════════════════════════════════════════

   Requires tokens.css AND primitives.css. Load third:
     <link rel="stylesheet" href="/assets/css/tokens.css">
     <link rel="stylesheet" href="/assets/css/primitives.css">
     <link rel="stylesheet" href="/assets/css/chrome.css">

   Pairs with _partials/header.html and _partials/footer.html.

   ───────────────────────────────────────────────────────────────────────────
   PROVENANCE - same two-tag scheme primitives.css uses
   ───────────────────────────────────────────────────────────────────────────
   [PORTED]    Trait carried over from SageXTopNav.tsx / SageXFooter.tsx with
               only the colour NAMES translated onto tokens.css. Geometry,
               easing, durations and gradient angles are unchanged.
   [COMPOSED]  No TSX rule to port. Built from tokens.css. Mostly the responsive
               layer, because the TSX branched its render tree in JS and there
               was no CSS to carry over.

   The showcase (sagex-component-showcase.html) has NO nav or footer entry -
   all 27 SGX-* codes were grepped and none is SGX-NAV / SGX-FOOT. That matches
   primitives.css GAP 3: nav and footer are assembly, not styling. So the CTAs
   here reuse .sgx-btn--enh (SGX-BTN-ENH) from primitives.css rather than
   restating it, which is also what keeps the corrected gradient ramp in one
   place. Nothing in this file redefines a button.

   ───────────────────────────────────────────────────────────────────────────
   TOKEN TRANSLATION - TSX constant -> tokens.css name
   ───────────────────────────────────────────────────────────────────────────
     navBg  rgba(23,24,31,.72) -> --panel-bg      (see MATERIAL note below)
     pageBg    #0C0C0F         -> --surface-page
     panelBg   #17181F         -> --surface-section
     panel2    #303046         -> --surface-raised
     iconBg    #414162         -> --surface-highlight
     text      #FFFFFF         -> --ink-heading
     textHigh  #E4E4E7         -> --ink-high
     textBody  #9AA0A6         -> --ink-body
     textSubtle#6B6F76         -> --ink-subtle
     border    #1F1F26         -> --hairline
     sep    rgba(255,255,255,.12) -> --hairline
     link      #8AA6FF         -> --brand-text
     hairline  #06B6D4         -> --accent
     ctaA      #4C4CFF         -> --cta-gradient-from   (via .sgx-btn--enh)
     ctaB      #06B6D4         -> DROPPED - see below
     itemHover #303046         -> --surface-raised
     logo      #FFFFFF         -> --ink-heading

   Two of those need saying out loud:

   1. The TSX names #1F1F26 "border" and #06B6D4 "hairline". The second is not a
      hairline - it is the cyan trace colour on the underline and the row rails.
      So border -> --hairline and hairline -> --accent. The names cross over.
      The TSX's own comment concedes the first one: "the dark border token reads
      invisible on near-black".

   2. ctaB #06B6D4 is not ported at all. Both TSX files build the CTA as
      linear-gradient(135deg, ctaA, ctaB) - the exact indigo -> cyan ramp retired
      for a measured accessibility failure (white-on-cyan 2.43:1, 2.88:1 at the
      worst point under the label). tokens.css L83-88 and primitives.css L36-43
      both carry the finding. The CTAs here use .sgx-btn--enh, which already
      resolves --cta-gradient-from -> --cta-gradient-to.

   TOKEN COUNT UNCHANGED AT 58. Nothing was added. Verify:
     grep -oP '\-\-[a-z0-9-]+(?=\s*:)' tokens.css | sort -u | wc -l
   (The command printed in the brief returns 44 - it counts leading whitespace
   as part of the match and misses mid-line definitions. The 58 baseline is
   correct; only that one check line is imprecise.)

   ───────────────────────────────────────────────────────────────────────────
   MATERIAL AXIS - the bar is free
   ───────────────────────────────────────────────────────────────────────────
   The nav bar runs on --panel-bg / --panel-blur / --panel-edge, the same three
   the card uses. Glass gives a translucent blurred bar; solid gives an opaque
   one. No second class, no JS. --panel-edge is a 0/1 multiplier, not a colour,
   so it goes inside calc() for border opacity - identical to .sgx-card L269.
   --panel-blur is `none` in solid, so applying it unconditionally is safe.

   ───────────────────────────────────────────────────────────────────────────
   RESPONSIVE - media queries, never data-bp
   ───────────────────────────────────────────────────────────────────────────
   Three tiers at the TSX's own thresholds. The TSX measured its own width with
   a ResizeObserver and swapped render trees; this does it in CSS with no JS.
     >= 1200   full bar
     900-1199  condensed - tighter gaps, smaller triggers, compact CTA
     < 900     hamburger + full-height menu
   The footer keeps its own 820px break, as the TSX did.

   ALIGNED 2026-08-07: the full-bar line was 1100, which cut across the content
   ladder's 640-1199 tablet band - a full-width nav bar sat over tablet-density
   content between 1100 and 1199. It now coincides with the 1200 desktop line.
   The 900 burger line and the footer's 820 both sit INSIDE the tablet band and
   were deliberately left alone: they are nav and footer density decisions, and
   a component is allowed to sub-divide a tier as long as it does not cross a
   content line. Six links plus a dropdown and a CTA do not fit an 820px iPad
   without the condensed tier, so forcing the burger to 640 would be worse.

   ───────────────────────────────────────────────────────────────────────────
   SIZES
   ───────────────────────────────────────────────────────────────────────────
   Nav density is its own scale. --text-* is a page-copy ramp; a 14.5px nav
   trigger has no token and should not borrow one. Where a token fits
   (--radius-pill, --space-*, --max-width, --font-*) it is used. Colour is the
   locked axis, and every colour here is a var(). Same posture as primitives.css,
   which also carries a literal 52px icon and a 14px radius.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   PAGE BASE  [COMPOSED]
   Six declarations, and they belong here for one reason: this is the
   only stylesheet every assembled page is guaranteed to load.

   Nothing else sets them. tokens.css declares values but binds none
   to <body>; primitives.css styles components only. So without this
   block a real page renders body copy in the browser's default serif
   on a white gutter, with the 8px default body margin showing as a
   light frame around the dark sections. Caught on the first assembled
   page - it would otherwise have hit all 23 identically.

   The alternative was a fourth stylesheet for six declarations, or
   every page restating them - which is the duplication this whole
   build step exists to end.
   ═══════════════════════════════════════════════════════════════ */
body{
  margin:0;
  background:var(--surface-page);
  color:var(--ink-body);
  font-family:var(--font-body);
  font-size:var(--text-body);
  -webkit-font-smoothing:antialiased;
}


/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

/* Scoped reset  [PORTED] - SageXTopNav.tsx INJECTED_CSS L295 opened with
   `.sgx-topnav *{box-sizing:border-box}`, and the footer scoped the same rule.
   It is load-bearing, not boilerplate: neither tokens.css nor primitives.css
   sets box-sizing, so under the default content-box every min-height in here
   inflates by its own padding and border. The 44px CTA measured 68px without
   this line. Each partial scopes its own reset, exactly as the TSX files did,
   so neither depends on a page-level reset existing. */
.sgx-hdr, .sgx-hdr *{ box-sizing:border-box; }

/* The header's own outer height, published so a section can sit UNDER it.
   MEASURED in the harness, not derived - same discipline as --sgx-hdr-panel-drop
   below. It is padding-top + the bar's content height + the bar's border, and
   the bar's height is content-driven (the 44px CTA touch target is the tallest
   thing in it), so it cannot be computed from the declarations alone.

   Consumed by .sgx-section--under-nav in primitives.css, which pulls the first
   section up by exactly this much so the section's background and bloom paint
   BEHIND the bar instead of being clipped at its bottom edge. verify-page.js
   asserts this value against the real measured height at all three viewports -
   if the bar's padding or CTA size changes, that assertion fails and tells you
   the number to put here. Do not hand-tune it. */
:root{ --sgx-hdr-h:78px; }   /* Went 78 -> 58 when the nav was stripped, then back to 78 when Ram asked for the Book-a-demo button again. Both moves were caught by verify-page.js's HDR-OFFSET assertion, neither by eye. Do not hand-tune - run the build. */

.sgx-hdr{
  position:sticky; top:0; z-index:1000;
  padding:10px 16px 0;
  font-family:var(--font-body);
  isolation:isolate;
}

/* Skip link - [COMPOSED]. The TSX had none. */
.sgx-hdr__skip{
  position:absolute; left:-9999px; top:0;
  padding:10px 16px; border-radius:0 0 10px 0;
  background:var(--surface-raised); color:var(--ink-heading);
  font-family:var(--font-display); font-size:var(--text-small); font-weight:600;
  text-decoration:none; z-index:2;
}
.sgx-hdr__skip:focus{ left:0; }

/* The bar  [PORTED] - geometry, radius, shadow and blur verbatim from the TSX
   desktop <nav>; only the colours moved onto tokens. */
.sgx-hdr__bar{
  display:flex; align-items:center; gap:8px;
  max-width:1280px; margin:0 auto;
  padding:11px 18px;
  background:var(--panel-bg);
  backdrop-filter:var(--panel-blur);
  -webkit-backdrop-filter:var(--panel-blur);
  border:1px solid color-mix(in srgb, var(--hairline) calc(var(--panel-edge) * 100%), transparent);
  border-radius:16px;
  /* TSX geometry kept; its literal rgba(0,0,0,...) is not. tokens.css states the
     shadow is "cool-tinted, never grey-black", so the tint comes from
     --surface-deep and flips with the palette. --shadow itself is not reusable
     here - it is a 40/90px card shadow, far too heavy for a nav bar. */
  box-shadow:0 8px 20px -12px color-mix(in srgb, var(--surface-deep) 85%, transparent),
             0 1px 2px color-mix(in srgb, var(--surface-deep) 62%, transparent);
  font-family:var(--font-display);
}
/* Solid mode has --panel-edge:0, so the rule above renders no border at all.
   The bar still needs an edge to sit against the page. [COMPOSED] */
:root[data-material="solid"] .sgx-hdr__bar{ border-color:var(--hairline); }

.sgx-hdr__logo{
  display:flex; align-items:center; flex-shrink:0;
  margin-right:8px; text-decoration:none;
  color:var(--ink-heading);
}
.sgx-hdr__logo svg{ display:block; height:24px; width:auto; }

/* Hamburger  [PORTED] - the morph is stroke-dasharray, exactly as the TSX did it.
   Hidden at >= 900. */
.sgx-hdr__burger{
  display:none;
  appearance:none; background:transparent; border:0;
  width:44px; height:44px;              /* touch target - do not shrink */
  padding:0; border-radius:var(--radius-pill);
  cursor:pointer; align-items:center; justify-content:center;
  color:var(--ink-heading);
}
.sgx-hdr__burger svg{
  transition:transform 400ms cubic-bezier(0.4,0,0.2,1);
}
.sgx-hdr__burger-morph{
  stroke-dasharray:12 63; stroke-dashoffset:0;
  transition:stroke-dasharray 400ms cubic-bezier(0.4,0,0.2,1),
             stroke-dashoffset 400ms cubic-bezier(0.4,0,0.2,1);
}
.sgx-hdr.is-open .sgx-hdr__burger svg{ transform:rotate(-45deg); }
.sgx-hdr.is-open .sgx-hdr__burger-morph{
  stroke-dasharray:20 300; stroke-dashoffset:-32.42;
}

/* align-self:stretch runs the whole way down - bar > menu > links > li > details.
   Every link stays vertically centred (align-items:center at each level), but the
   trigger's BOX now reaches the bar's content edges, which is what makes
   --sgx-hdr-panel-drop a derived number instead of a tuned one. */
.sgx-hdr__menu{
  display:flex; align-items:center; gap:8px; flex:1; align-self:stretch;
}
.sgx-hdr__links{
  display:flex; align-items:center; gap:12px; align-self:stretch;
  list-style:none; margin:0; padding:0;
}

/* Trigger  [PORTED] - the underline sweep + dot are the TSX .sx-trigger
   pseudo-elements, unchanged apart from the colour token. */
.sgx-hdr__link{
  position:relative;
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--font-display); font-weight:600;
  font-size:16px; letter-spacing:-0.01em;
  color:var(--ink-high); text-decoration:none; white-space:nowrap;
  padding:9px 10px; border-radius:8px;
  min-height:40px;
  background:transparent; border:0; cursor:pointer;
}
.sgx-hdr__link:hover{ background:var(--surface-raised); }
.sgx-hdr__link::after{
  content:""; position:absolute; left:10px; right:10px; bottom:5px;
  height:1.5px; border-radius:2px; background:var(--accent);
  transform:scaleX(0); transform-origin:left;
  transition:transform 120ms cubic-bezier(0.2,0.8,0.2,1);
}
.sgx-hdr__link::before{
  content:""; position:absolute; left:8px; bottom:3.5px;
  width:4px; height:4px; border-radius:50%; background:var(--accent);
  transform:scale(0);
  transition:transform 120ms cubic-bezier(0.2,0.8,0.2,1);
}
.sgx-hdr__link[aria-current="page"]::after,
.sgx-hdr__drop[open] > .sgx-hdr__summary::after{ transform:scaleX(1); }
.sgx-hdr__link[aria-current="page"]::before,
.sgx-hdr__drop[open] > .sgx-hdr__summary::before{ transform:scale(1); }

.sgx-hdr__bar a:focus-visible,
.sgx-hdr__bar button:focus-visible,
.sgx-hdr__bar summary:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px; border-radius:8px;
}

/* Dropdown  [COMPOSED] - <details> replaces the TSX's portal + rAF-anchored
   panel. Links stay in the markup whether open or shut, which the portal
   version could not do (it unmounted when closed). */
/* The trigger stretches to the bar's full content height, so the distance from
   its bottom to the bar's bottom is exactly padding-bottom + border - no flex
   centring slack in the middle. That makes --sgx-hdr-panel-drop a derived
   number rather than a tuned one. */
.sgx-hdr__has-menu{ position:relative; align-self:stretch; display:flex; align-items:center; }
.sgx-hdr__drop{ position:relative; align-self:stretch; display:flex; align-items:center; }
.sgx-hdr__summary{ list-style:none; }
.sgx-hdr__summary::-webkit-details-marker{ display:none; }
.sgx-hdr__chev{
  opacity:.6; display:inline-flex;
  transition:transform 120ms cubic-bezier(0.2,0.8,0.2,1);
}
.sgx-hdr__drop[open] .sgx-hdr__chev{ transform:rotate(180deg); }

/* Panel  [PORTED] - radius, padding, shadow and row geometry from the TSX
   mega-panel; 320px is its own single-column width. */
/* Panel drop distance. The TSX anchored the panel at barRect.bottom + 8 by
   measuring the bar every scroll and resize. In CSS the panel hangs off the
   trigger instead, so the offset has to clear whatever sits between the
   trigger's bottom and the bar's. MEASURED in the harness, not derived: 26px
   puts the panel exactly 8px below the bar's bottom edge, reproducing the TSX's
   barRect.bottom + 8. Tablet is 1px less because the bar's padding is 1px less.
   Without this the panel starts above the bar's bottom edge and paints over it.
   NOT a token - it is this bar's own geometry. If the bar's vertical padding
   changes, re-measure: p.top - bar.bottom should read 8. */
.sgx-hdr{ --sgx-hdr-panel-drop:26px; }

.sgx-hdr__panel{
  position:absolute; top:calc(100% + var(--sgx-hdr-panel-drop)); left:0;
  width:320px; max-width:calc(100vw - 32px);
  padding:10px; border-radius:14px;
  background:var(--surface-section);
  border:1px solid var(--hairline);
  /* Same treatment as the bar - TSX geometry, palette-tinted rather than black. */
  box-shadow:0 16px 40px -20px color-mix(in srgb, var(--surface-deep) 92%, transparent),
             0 2px 8px -2px color-mix(in srgb, var(--surface-deep) 78%, transparent);
  z-index:20;
  animation:sgx-hdr-panel-in 120ms cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes sgx-hdr-panel-in{
  from{ opacity:0; transform:translateY(-6px); }
  to  { opacity:1; transform:none; }
}
.sgx-hdr__panel-label{
  font-family:var(--font-mono); font-size:14.22px;
  letter-spacing:0.14em; text-transform:uppercase;
  color:var(--ink-subtle); margin:0; padding:6px 12px 8px;
}
.sgx-hdr__row{
  position:relative;
  display:flex; align-items:flex-start; gap:11px;
  padding:9px 12px; border-radius:8px; text-decoration:none;
}
.sgx-hdr__row:hover{ background:var(--surface-raised); }
/* Left rail on hover  [PORTED] from .sx-row::before */
.sgx-hdr__row::before{
  content:""; position:absolute; left:0; top:10px; bottom:10px;
  width:2px; border-radius:2px; background:var(--accent);
  transform:scaleY(0);
  transition:transform 120ms cubic-bezier(0.2,0.8,0.2,1);
}
.sgx-hdr__row:hover::before{ transform:scaleY(1); }
.sgx-hdr__row-icon{
  flex:none; width:34px; height:34px; border-radius:9px;
  display:grid; place-items:center;
  background:var(--surface-raised);
  border:1px solid var(--hairline);
  color:var(--accent);
}
.sgx-hdr__row-icon svg{ width:18px; height:18px; display:block; }
.sgx-hdr__row-text{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.sgx-hdr__row-name{
  font-family:var(--font-display); font-weight:600;
  font-size:14.22px; letter-spacing:-0.01em; color:var(--ink-heading);
}
.sgx-hdr__row-desc{
  font-family:var(--font-body); font-size:14.22px; line-height:1.35;
  color:var(--ink-body);
}

.sgx-hdr__cta{
  display:flex; align-items:center; gap:8px;
  flex-shrink:0; margin-left:auto;
}
/* Nav-density sizing on the shared SGX-BTN-ENH. Traits untouched - only the
   box shrinks, which the contract allows. */
.sgx-hdr__cta .sgx-btn{ padding:11px 20px; font-size:14.22px; }


/* ── TABLET 900-1099  [COMPOSED] ───────────────────────────────
   The TSX called this tier "isCompact" and drove it from a measured width. */
@media (max-width:1199px){
  :root{ --sgx-hdr-h:70px; }        /* measured - see the note at .sgx-hdr */
  .sgx-hdr{ padding:8px 12px 0; --sgx-hdr-panel-drop:25px; }
  .sgx-hdr__bar{ padding:10px 14px; }
  .sgx-hdr__logo svg{ height:20px; }
  .sgx-hdr__links{ gap:4px; }
  .sgx-hdr__link{ font-size:14.22px; padding:8px 7px; }
  .sgx-hdr__chev{ width:12px; height:12px; }
  .sgx-hdr__cta .sgx-btn{ padding:9px 14px; font-size:14.22px; min-height:40px; }
}


/* ── MOBILE < 900  [COMPOSED] ──────────────────────────────────
   The TSX portaled a two-pane drill-in overlay to document.body. Six flat links
   and one dropdown do not need two panes, so this is a single stacked list. The
   hrefs are the same ones already in the bar - nothing is moved or re-created. */
@media (max-width:899px){
  /* Bar height, stated once and consumed by the menu's top offset. The TSX
     measured the bar's real bottom edge every resize BECAUSE it refused to
     assume 66px - and it was right to: this bar is 67. Deriving it here keeps
     the two from drifting without needing the measurement.
       44px  burger - the touch target, the tallest thing in the bar
     + 22px  vertical padding (11 top + 11 bottom)
     +  1px  bottom border                                         = 67px */
  :root{ --sgx-hdr-h:67px; }        /* = --sgx-hdr-bar-h; padding is 0 at this tier */
  .sgx-hdr{ padding:0; --sgx-hdr-bar-h:67px; }
  .sgx-hdr__bar{
    border-radius:0; border-left:0; border-right:0; border-top:0;
    max-width:none; padding:11px 14px;
    /* Was 44px 1fr 44px - burger | centred logo | spacer. The burger is gone
       (2026-08-09), so the bar is two cells: logo left, CTA right. */
    display:grid; grid-template-columns:auto 1fr; align-items:center;
  }
  .sgx-hdr__logo{ justify-content:flex-start; margin:0; }
  .sgx-hdr__logo svg{ height:22px; }

  /* NO OFF-CANVAS SHEET (2026-08-09). The fixed full-bleed overlay, its radial
     glow and the two .sgx-js collapse rules were removed with the hamburger that
     opened them - see _partials/header.html. With the link <ul> empty the sheet
     held only the CTA, so the whole mechanism cost a scroll-lock and bought
     nothing.

     The menu is now an ordinary inline flex box in the bar carrying the one thing
     left in it: "Book a demo". It MUST stay visible by default - no opacity,
     visibility or transform gates - because nothing exists any more to toggle
     them back. Restoring the sheet means restoring the button AND its script. */
  .sgx-hdr__menu{
    position:static; display:flex; align-items:center; justify-content:flex-end;
    padding:0; background:none; overflow:visible;
  }

  .sgx-hdr__links{
    flex-direction:column; align-items:stretch; gap:0;
    width:100%; position:relative;
  }
  .sgx-hdr__links > li + li{ border-top:1px solid var(--hairline); }
  .sgx-hdr__link{
    width:100%; justify-content:space-between;
    font-size:16px; padding:15px 6px; min-height:48px; border-radius:0;
    color:var(--ink-heading);
  }
  .sgx-hdr__link::after,
  .sgx-hdr__link::before{ display:none; }
  .sgx-hdr__link:hover{ background:transparent; }

  /* Dropdown becomes an inline expander, not a flyout. */
  .sgx-hdr__has-menu{ position:static; }
  .sgx-hdr__panel{
    position:static; width:auto; max-width:none;
    box-shadow:none; border:0; border-radius:0;
    padding:0 0 10px; background:transparent;
    animation:none;
  }
  .sgx-hdr__panel-label{ display:none; }
  .sgx-hdr__row{ padding:12px 8px; }
  .sgx-hdr__row-icon{ width:38px; height:38px; border-radius:10px; }
  .sgx-hdr__row-icon svg{ width:19px; height:19px; }
  .sgx-hdr__row-name{ font-size:16px; }
  .sgx-hdr__row-desc{ font-size:14.22px; }

  /* Was a full-width block sitting under a hairline at the foot of the sheet.
     In the bar it is a normal inline button again. */
  .sgx-hdr__cta{ margin:0; padding-top:0; border-top:0; position:relative; }
  .sgx-hdr__cta .sgx-btn{ width:auto; font-size:14.22px; padding:10px 16px; min-height:44px; }
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.sgx-ft{
  display:block; width:100%;
  background:var(--surface-page);
  color:var(--ink-body);
  font-family:var(--font-body);
  border-top:1px solid var(--hairline);
}
.sgx-ft *{ box-sizing:border-box; }
/* :not(.sgx-btn) is load-bearing, added 2026-08-07. This rule is (0,1,1) and
   .sgx-btn--enh's own `color:var(--cta-text)` is (0,1,0), so a bare `a` here
   out-specified the primitive and the footer CTA inherited --ink-body instead
   of the button's ink. On INDIGO that is light grey on dark blue and passes by
   luck; on EMBER it is light warm grey on bright amber - measured 1.72:1,
   unreadable. Found the first time a real ember page carried the chrome.
   Buttons bring their own ink; everything else in the footer inherits. */
.sgx-ft a:not(.sgx-btn){ color:inherit; text-decoration:none; }
.sgx-ft a.sgx-btn{ text-decoration:none; }

.sgx-ft__inner{
  max-width:var(--max-width);
  margin:0 auto;
  padding:56px var(--pad-x) 28px;
}
.sgx-ft__top{
  display:flex; flex-wrap:wrap; gap:40px;
  justify-content:space-between;
}
.sgx-ft__brand{
  flex:1 1 260px; min-width:240px; max-width:340px;
  display:flex; flex-direction:column; gap:16px;
}
.sgx-ft__logo{ display:inline-flex; height:30px; color:var(--ink-heading); }
.sgx-ft__logo svg{ height:100%; width:auto; display:block; }
.sgx-ft__thesis{
  font-family:var(--font-display); font-weight:600;
  font-size:16px; line-height:1.4; letter-spacing:-0.01em;
  color:var(--ink-heading); margin:0;
}
.sgx-ft__cta{ align-self:flex-start; }

.sgx-ft__cols{
  display:grid; grid-template-columns:1fr; gap:0;
  flex:2 1 520px;
}
.ft-col{ border-top:1px solid var(--hairline); }
.ft-head{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px;
  background:transparent; border:0; padding:14px 2px;
  cursor:pointer; text-align:left;
  font-family:var(--font-display); font-weight:600;
  font-size:14.22px; letter-spacing:0.02em;
  color:var(--ink-heading); min-height:44px;
}
.ft-head a{ color:inherit; }
.ft-head .chev{
  color:var(--ink-subtle); flex:none;
  transition:transform 220ms cubic-bezier(0.2,0.8,0.2,1);
}
.ft-col.is-open .ft-head .chev{ transform:rotate(180deg); }
.ft-head:focus-visible{
  outline:none; border-radius:6px;
  box-shadow:0 0 0 2px color-mix(in srgb, var(--brand-text) 70%, transparent);
}
.ft-panel{ overflow:hidden; max-height:0; transition:max-height 280ms cubic-bezier(0.2,0.8,0.2,1); }
.ft-col.is-open .ft-panel{ max-height:420px; }
.ft-list{ list-style:none; margin:0; padding:0 0 12px; }

.ft-leaf{
  display:block; position:relative; width:fit-content;
  font-family:var(--font-body); font-size:14.22px; line-height:1.5;
  padding:6px 2px; color:var(--ink-body);
}
/* Underline sweep  [PORTED]. The TSX ramped brand-text -> cyan; the second stop
   is now --accent, which is the same hue under its correct name. */
a.ft-leaf::after{
  content:""; position:absolute; left:2px; right:2px; bottom:3px;
  height:1.5px; background:linear-gradient(90deg, var(--brand-text), var(--accent));
  transform:scaleX(0); transform-origin:left;
  transition:transform 200ms cubic-bezier(0.2,0.8,0.2,1);
}
a.ft-leaf:hover{ color:var(--ink-heading); }
a.ft-leaf:hover::after{ transform:scaleX(1); }
a.ft-leaf:focus-visible{
  outline:none; color:var(--ink-heading); border-radius:4px;
  box-shadow:0 0 0 2px color-mix(in srgb, var(--brand-text) 70%, transparent);
}
.ft-leaf.is-planned{ color:var(--ink-subtle); cursor:default; }
.ft-leaf .tag{
  margin-left:8px;
  font-family:var(--font-mono); font-size:14.22px;
  letter-spacing:0.06em; text-transform:uppercase;
  color:var(--ink-subtle);
  border:1px solid var(--hairline); border-radius:4px;
  padding:1px 5px; white-space:nowrap;
}

/* Divider  [PORTED] - same fade-in-fade-out rail as .sgx-card__divider. */
.sgx-ft__div{
  height:1px; margin:32px 0 20px;
  background:linear-gradient(90deg, transparent,
             color-mix(in srgb, var(--brand-text) 45%, transparent), transparent);
}
.sgx-ft__legal{
  display:flex; flex-wrap:wrap; align-items:center;
  gap:14px 20px; justify-content:space-between;
}
.sgx-ft__legal-l{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; }
.ft-copy{
  font-family:var(--font-mono); font-size:14.22px;
  letter-spacing:0.04em; color:var(--ink-subtle);
}
.ft-legal-link{ font-family:var(--font-body); font-size:14.22px; color:var(--ink-body); }
.ft-legal-link:hover{ color:var(--ink-heading); }
.ft-legal-link:focus-visible{
  outline:none; color:var(--ink-heading); border-radius:4px;
  box-shadow:0 0 0 2px color-mix(in srgb, var(--brand-text) 70%, transparent);
}

/* ── FOOTER DESKTOP >= 820  [PORTED] ───────────────────────────
   The TSX used @container (min-width:820px) on a container-type root. Media
   query here - the footer always spans the page, so viewport width and
   container width are the same number. */
@media (min-width:820px){
  .sgx-ft__cols{ grid-template-columns:repeat(4, minmax(0,1fr)); gap:0 28px; }
  .ft-col{ border-top:0; }
  .ft-head{
    cursor:default; padding:0 0 14px; min-height:0;
    font-size:14.22px; letter-spacing:0.12em; text-transform:uppercase;
    color:var(--ink-subtle);
  }
  .ft-head .chev{ display:none; }
  .ft-panel{ max-height:none; overflow:visible; }
  .ft-leaf{ padding:5px 2px; }
}


/* ═══════════════════════════════════════════════════════════════
   MOTION SAFETY  [PORTED] - both TSX files carried the same block.
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion:reduce){
  .sgx-hdr__link::after,
  .sgx-hdr__link::before,
  .sgx-hdr__row::before,
  .sgx-hdr__chev,
  .sgx-hdr__burger svg,
  .sgx-hdr__burger-morph,
  .sgx-hdr__menu,
  .ft-panel,
  .ft-head .chev,
  a.ft-leaf::after{
    transition:none !important;
  }
  .sgx-hdr__panel{ animation:none; }
}
