/* ============================================================================
   THE v1 (Lighter) GROUND, SITE-WIDE
   ----------------------------------------------------------------------------
   Adam chose Lighter as v1 on 2026-09-07. The homepage, Opportunities, the deal
   pages and the partner pages moved onto it; everything else was still the
   pre-decision light system, so the site ran two design languages and which one
   you saw depended on which link you clicked.

   This is the same mechanism that migrated the partner pages: site.css paints
   nearly every surface from a small set of tokens, so redefining those tokens
   inside body.hd-body flips every page at once and leaves all layout, grid and
   spacing decisions untouched.

   READ THIS BEFORE ADDING A RULE HERE.

   1. An alias declared on :root as `--x: var(--y)` is FROZEN. It resolves on
      :root and inherits down as a literal, so overriding --y below never
      re-evaluates it. site.css:24 (--accent-ink) is one; re-declare any new
      one here or its component keeps the light-ground colour.
   2. If you find yourself overriding a third component, stop and find the
      token those components read. Enumerating selectors moved the partner
      migration 45 failures to 42; the token block took it to 19 in one edit.
   ========================================================================== */

body.hd-body {
  /* ---- grounds, ordered by depth so a card still reads as raised --------- */
  --paper:      var(--hd-navy-deep);
  --paper-alt:  var(--hd-navy-2);
  --white:      var(--hd-navy-2);
  --surface:    var(--hd-navy-2);

  /* ---- ink -------------------------------------------------------------- */
  --ink-900:    var(--hd-on-d);      /* 21:1 on navy   */
  --ink-700:    var(--hd-on-d-2);    /* 12.2:1         */
  --ink-500:    var(--hd-on-d-3);    /* 7.2:1, floor   */
  --ink-300:    var(--hd-on-d-3);    /* was 3.2:1      */

  /* ---- accent. site.css's golds are the LIGHT-ground set: --gold-700 is
     #754600, 5.7:1 on paper and 2.4:1 on navy. ---------------------------- */
  --gold-700:   var(--hd-gold);
  --gold-600:   var(--hd-gold);
  --gold-500:   var(--hd-gold);
  --gold-400:   var(--hd-gold);
  --gold-300:   var(--hd-gold-soft);
  --gold-200:   var(--hd-gold-soft);

  /* ---- the frozen aliases, re-declared. See note 1 above. --------------- */
  --accent-ink:  var(--hd-gold);
  --heading-ink: var(--hd-on-d);
  --body-ink:    var(--hd-on-d-2);

  /* ---- rules ------------------------------------------------------------ */
  --rule:       var(--hd-line-d2);
  --rule-soft:  var(--hd-line-d);

  background:var(--hd-navy);
  color:var(--hd-on-d);
}

/* -- Chrome: the masthead and footer ground is set once, at --ck-panel in
   chrome.css. An override here split the site into two header colours. */

/* -- Buttons ---------------------------------------------------------------
   .btn--ghost and .btn--outline take color:var(--white), which now resolves to
   navy-2 and would put navy text on a navy ground. A ghost button was always
   meant to carry the ground's own foreground. */
.btn--ghost         { color:var(--hd-on-d); border-color:var(--hd-line-d2); background:rgba(7,23,37,.16); }
.btn--ghost:hover   { border-color:var(--hd-gold); }
.btn--outline       { color:var(--hd-on-d); border-color:var(--hd-gold); background:transparent; }
.btn--outline:hover { color:var(--hd-ink); background:var(--hd-gold); }
.btn--primary       { color:#071725; background:var(--hd-gold-fill); border-color:var(--hd-gold); }
.btn--primary:hover { background:var(--hd-gold-soft); border-color:var(--hd-gold-soft); }

/* -- Display type ---------------------------------------------------------- */
body.hd-body h1, body.hd-body h2 { font-family:var(--hd-serif); font-weight:400; letter-spacing:-.01em; }

/* ============================================================================
   THE OTHER TOKEN FAMILIES
   ----------------------------------------------------------------------------
   site.css is not the only one. cockpit.css, pathway.css and portal-cockpit.css
   each declare their own light-ground palette, which is why the first pass
   flipped the page ground to navy and left white text sitting on #eceeed
   islands: the ink followed site.css, the ground did not, because it came from
   --canvas instead.

   Not listed here, and deliberately: record.css, discovery.css, deal-brief.css
   and learn.css already declare v1-native palettes (navy grounds, or the
   #F4F5F3 paper). Remapping those would break pages that are already correct.
   ========================================================================== */

body.hd-body {
  /* ---- cockpit.css ------------------------------------------------------ */
  --canvas:  var(--hd-navy-deep);   /* was #eceeed */
  --card:    var(--hd-navy-2);      /* was #fbfcfb */
  --card-2:  var(--hd-navy-2);      /* was #f7f8f7 */
  --line:    var(--hd-line-d2);     /* was #d6d9d7 */
  --muted:   var(--hd-on-d-3);      /* was #626b73 */
  --ink:     var(--hd-on-d);        /* was #090d12 */
  --gold-deep: var(--hd-gold);      /* #8f5d07 is a light-ground gold */

  /* ---- pathway.css ------------------------------------------------------ */
  --pw-line:      var(--hd-line-d2);
  --pw-ink:       var(--hd-on-d);
  --pw-body:      var(--hd-on-d-2);
  --pw-mut:       var(--hd-on-d-3);
  --pw-gold-deep: var(--hd-gold);   /* #8f5900 is "safe on white", not on navy */

  /* ---- portal-cockpit.css ----------------------------------------------- */
  --portal-wash:       var(--hd-navy-2);
  --portal-green-soft: rgba(40,109,80,.22);
  --portal-rule:       var(--hd-line-d2);

  /* ---- intake.css ------------------------------------------------------- */
  --ik-gold-text:  var(--hd-gold);  /* #7f5000: 2.4:1 on navy */
  --ik-danger:     #F4A9A3;         /* #b3261e is 2.6:1 on navy */
  --ik-danger-soft: rgba(179,38,30,.18);
}

/* The skip link is parked at left:-9999px and only enters the viewport on
   focus. It inherits body colour there, which on navy is white on the gold
   ground, so the one moment it is visible it is the one moment it fails. */
.skip-link, .skip-link:focus { color:var(--hd-ink); background:var(--hd-gold); }

/* ---- FALLBACK LITERALS -------------------------------------------------
   `var(--pw-canvas,#eceeed)` in pathway.css:159 points at a token that is
   never declared anywhere, so the fallback always wins and no amount of
   remapping --canvas touches it. This was 155 of the failures on its own:
   the ink flipped to white and the ground stayed #eceeed underneath it.
   Declaring the token is what disarms the fallback. */
body.hd-body { --pw-canvas:var(--hd-navy-deep); --cream:var(--hd-navy-deep); }

/* ============================================================================
   LIGHT ISLANDS
   ----------------------------------------------------------------------------
   Sixty-five rules across six stylesheets paint a near-white ground from a
   literal rather than a token, so the flip above cannot reach them. Most were
   internally consistent before — dark literal ink on a white card — and broke
   only because their DESCENDANTS inherit the body's white ink.

   These are deliberately left light. A white card on a navy ground is correct
   v1; what was wrong was the ink inside it. Each selector below re-declares
   the paper alias set, which is home-d.css's own mechanism for a section that
   changes ground, so components inside them resolve dark ink, dark rules and
   the paper gold without any component rule being duplicated.

   This list is DERIVED, not hand-written: every rule whose background is a
   literal above 0.75 luminance. Golds (~0.42) are excluded, so accent fills
   keep their own treatment. Regenerate it rather than editing by hand.

   :where(), NOT :is(). :is() takes the specificity of the MOST specific
   selector in its list for every match, so with 87 entries this rule carried
   the weight of its heaviest one wherever it matched. .story-hero entered the
   list from its old cream literal, so .story-hero--dark matched too, and this
   rule silently beat DARK ISLANDS below: paper gold on a navy hero at 3.12:1.
   :where() is zero, leaving the rule at body.hd-body (0,1,1), which is enough
   to set tokens on its own elements and loses to a dark band where both apply.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   THE FORCED-LIGHT BLOCK, REMOVED  (2026-09-16)
   ---------------------------------------------------------------------------
   The mirror of the forced-dark block below. 87 component selectors were pinned
   to the LIGHT alias set here, because under hd-night the page was navy and
   these were its light islands.

   With Adam's alternation restored the assumption inverts: .story-hero is in
   this list, and on how-it-works.html it carries .story-hero--dark and paints
   #06131e. Forcing the light set gave it --hd-accent:#8b621e, so the hero
   eyebrow rendered deep gold on navy at 3.45:1 and the ghost button rendered
   ink on navy at 1.18:1. Traced with CDP getMatchedStylesForNode: this rule is
   body.hd-body :where(...) at (0,2,0) and was outranking the band's own
   :where() at (0,0,0).

   Nothing replaces it. A band declares its ground once; components inherit.
   --------------------------------------------------------------------------- */


/* ============================================================================
   THE PAPER VARIANT
   ----------------------------------------------------------------------------
   v1 is not "navy". It is a token system with TWO legitimate grounds, and the
   twelve deal pages Adam has already seen run on the paper one (#F4F5F3).

   The pathway, cockpit-page, intake, invest and portal families are bespoke
   LIGHT designs: sixty-five hand-painted near-white surfaces, white cards,
   dark literal ink. Flipping them to navy is a per-section design decision, not
   a token swap — attempting it mechanically took the site from 92 contrast
   failures to 440, because the ink follows the tokens and the ground does not.

   So they take the paper ground instead. Same v1 tokens, same Playfair display
   face, same gold discipline (the deep gold, which is the one that reads on
   paper), and their existing light surfaces stay coherent underneath.
   ========================================================================== */

body.hd-body.hd-paper-body {
  background:var(--hd-paper);
  color:var(--hd-ink);

  --hd-fg:var(--hd-ink); --hd-fg-2:var(--hd-ink-2); --hd-fg-3:var(--hd-ink-3);
  --hd-line:var(--hd-line-l); --hd-line-2:var(--hd-line-l2);
  --hd-accent:var(--hd-gold-deep); --hd-accent-h:#553B0E;

  /* site.css */
  /* ONE PAPER. Dante, 2026-09-10: five light grounds (#ECEEED cool grey,
     #FBFCFB, #FAF7F0, #FBF9F4, #EDF1F5) read as five sites. Navy plus a
     single warm paper is one system; the homepage already proves it. */
  --paper:var(--hd-paper); --paper-alt:var(--hd-paper); --white:#FFFFFF; --surface:#FFFFFF;
  --ink-900:var(--hd-ink); --ink-700:var(--hd-ink-2); --ink-500:var(--hd-ink-3);
  --ink-300:var(--hd-ink-3);
  --gold-700:var(--hd-gold-deep); --gold-600:var(--hd-gold-deep);
  --gold-500:var(--hd-gold-deep); --gold-400:var(--hd-gold-deep);
  --gold-300:#B8862B; --gold-200:#B8862B;
  --accent-ink:var(--hd-gold-deep);
  --heading-ink:var(--hd-ink); --body-ink:var(--hd-ink-2);
  --rule:var(--hd-line-l); --rule-soft:#EFEAE0;

  /* cockpit.css */
  --canvas:var(--hd-paper); --card:#FFFFFF; --card-2:#FFFFFF;
  --line:var(--hd-line-l); --muted:var(--hd-ink-3); --ink:var(--hd-ink);
  --gold-deep:var(--hd-gold-deep);

  /* pathway.css */
  --pw-canvas:var(--hd-paper); --pw-line:var(--hd-line-l); --pw-ink:var(--hd-ink);
  --pw-body:var(--hd-ink-2); --pw-mut:var(--hd-ink-3); --pw-gold-deep:var(--hd-gold-deep);

  /* portal-cockpit.css */
  --portal-wash:var(--hd-paper); --portal-rule:var(--hd-line-l); --portal-green-soft:#E6F1EB;

  /* intake.css */
  --ik-gold-text:var(--hd-gold-deep); --ik-danger:#B3261E; --ik-danger-soft:#FDF3F2;

  --cream:#F4F5F3;
}

/* Buttons follow the ground rather than asserting a colour. */
body.hd-paper-body .btn--ghost   { color:var(--hd-ink); border-color:var(--hd-line-l2); background:transparent; }
/* ...except inside the dark bands that paper pages still open on. The rule
   above painted navy ink on a navy gradient hero: 1.06:1 on 404, how-it-works
   and private-credit, i.e. an invisible button. The old checker missed it
   because it skipped text over gradients; the pixel-grounded one in
   _build/verify/contrast.mjs does not (Dante re-audit, 2026-09-10). */
body.hd-paper-body :is(.access-shell,.story-hero--dark,.credit-cockpit,.x-hero,.portal-entry,.page-hero,.iw-hero,.ik-hero) .btn--ghost{
  color:var(--hd-on-d); border-color:var(--hd-line-d2); background:rgba(7,23,37,.16);
}
body.hd-paper-body .btn--outline { color:var(--hd-ink); border-color:var(--hd-gold-deep); }
body.hd-paper-body .btn--outline:hover { color:#fff; background:var(--hd-gold-deep); }

/* The one dark surface inside a paper page: the primary CTA on the portal
   entry card is a navy pill sitting on a #F8F6F1 card, so it needs the dark
   ground's ink while everything around it keeps the paper set. Its <strong>
   was inheriting --hd-ink from the light-island rule above. */
body.hd-paper-body .portal-entry__actions > a:first-child,
body.hd-paper-body .portal-entry__actions > a:first-child * { color:var(--hd-on-d); }
body.hd-paper-body .portal-entry__actions > a:first-child small { color:var(--hd-on-d-2); }

/* ============================================================================
   ONE COLUMN, ONE HERO SHAPE  (Dante review, 2026-09-10)
   ----------------------------------------------------------------------------
   Seven content left edges at 1280px (24, 48, 50, 78, 80, 88, 94) came from
   five containers: .container 1320/24, .wrapc 1240/28, .hd 1180/gut,
   .lw 1180/28, .rc 1120/48. All five now resolve to home-d's column, the one
   the masthead also uses, so the logo and every headline share one edge. */
body.hd-body .container{width:auto;max-width:var(--hd-wrap);margin-inline:auto;padding-inline:var(--hd-gut)}
body.hd-body .wrapc,
body.hd-body .lw{max-width:var(--hd-wrap);padding-inline:var(--hd-gut)}
body.hd-body .rc{width:auto;max-width:var(--hd-wrap);padding-inline:var(--hd-gut)}

/* The inset-card heroes on investing-with-us, request-access, contact and
   investor-profile: navy header, a strip of paper, a rounded navy card, paper.
   "A fifth hero pattern and the one most from another website."

   Full-bleed by PAINT, not by layout. The box keeps its place in the column,
   so its text stays aligned with everything else, and the shadow and clip
   carry the navy to both edges. No 100vw margins, so no horizontal overflow
   from a scrollbar. */
body.hd-body .iw-hero,
body.hd-body .ik-hero{
  border-radius:0;margin-top:0;
  background:var(--hd-navy-deep);
  box-shadow:0 0 0 100vmax var(--hd-navy-deep);
  clip-path:inset(0 -100vmax);
}
/* and nothing between the masthead and that band */
body.hd-body main:has(> .wrapc:first-child > .iw-hero:first-child),
body.hd-body main:has(> .wrapc:first-child .ik-hero:first-child),
body.hd-body .wrapc:has(> .iw-hero:first-child){padding-top:0}

/* The three remaining left edges, traced (2026-09-10):
   - .pw (pathway pages): 1180 wide, no gutter -> content at x=50.
   - .page-hero__grid (about, disclosures, privacy): full width, 24px pad.
   - the inset heroes kept their 40px inner padding after going full-bleed. */
body.hd-body .pw{max-width:var(--hd-wrap);margin-inline:auto;padding-inline:var(--hd-gut);box-sizing:border-box}
body.hd-body .page-hero__grid{max-width:var(--hd-wrap);margin-inline:auto;padding-inline:var(--hd-gut);box-sizing:border-box}
body.hd-body .page-hero__copy{padding-inline:0}
body.hd-body .iw-hero,
body.hd-body .ik-hero{padding-inline:0}
/* At 390 the old containers also set a width of calc(100% - 2x), which adds a
   margin on top of the gutter (.pw landed at 38, .wrapc at 32). The gutter is
   the only inset now. */
body.hd-body .pw,
body.hd-body .wrapc{width:auto;margin-inline:auto}

/* ============================================================================
   THREE NAVIES  (Dante review, 2026-09-10)
   ----------------------------------------------------------------------------
   Six were in use: #071725, #050F1C, #071321, #0C1F2F, #0D2233, #0B1C34, each
   declared in a different stylesheet for its own template. Three levels now:
   deep for chrome and heroes, page, and raised for cards.

   `html body.hd-body` (0,1,2) on purpose: record.css declares its tokens on
   body.record and pathway.css on body.cockpit, both (0,1,1). At equal
   specificity the winner would depend on load order per page, which is how
   the header ended up two colours in the first place. */
html body.hd-body{
  --navy-950: var(--hd-navy-deep);
  --navy-900: var(--hd-navy-deep);
  --navy:     var(--hd-navy-deep);
  --panel:    var(--hd-navy-deep);
  --panel-2:  var(--hd-navy-2);
  --pw-panel: var(--hd-navy-deep);
  --rc-navy:  var(--hd-navy);
  --rc-navy-2:var(--hd-navy-2);
}

/* ---- Dante re-audit, 2026-09-10, part 1 ---------------------------------- */
/* Labels over the dark photo on how-it-works took the paper gold (#B8862B,
   2.96:1 on the image). Over a photograph the light gold is the one that reads. */
/* by pattern, not by page: partner-selection carries the same over-photo
   ledger without .story-hero--dark, and was missed on the first pass */
body.hd-paper-body .story-hero__visual .mini-ledger dt{color:#E9CB93}
/* the portal entry opens on navy; the paper eyebrow gold was 3.0:1 there */
body.hd-paper-body .portal-entry .eyebrow{color:#D7AB56}

/* .section--white resolved to pure #FFF as a PAGE ground once --white became
   the card colour: 56% of privacy and 52% of disclosures read as white pages.
   A section is paper; only cards are white. */
body.hd-paper-body .section--white{background:var(--hd-paper)}

/* ============================================================================
   DARK ISLANDS  (Dante re-audit, 2026-09-10)
   ----------------------------------------------------------------------------
   The mirror of LIGHT ISLANDS above. Paper pages set the paper alias set on
   the body, so a navy band inside one inherited paper ink, paper gold and the
   paper ghost button. That is the whole family of defects the re-audit found:
   ghost buttons at 1.06:1, the portal eyebrow at 3.0:1, the ledger labels over
   the hero photos. The earlier fixes patched each by selector. This re-declares
   the dark alias set on every dark band, so the next one cannot regress. */
body.hd-paper-body :is(.page-hero,.story-hero--dark,.credit-cockpit,.access-shell,.x-hero,
  .ac-band,.pw-chainband,.pw-statusband,.portal-entry,.iw-hero,.ik-hero,.iw-close){
  --hd-fg:var(--hd-on-d); --hd-fg-2:var(--hd-on-d-2); --hd-fg-3:var(--hd-on-d-3);
  --hd-line:var(--hd-line-d); --hd-line-2:var(--hd-line-d2);
  --hd-accent:var(--hd-gold); --hd-accent-h:var(--hd-gold-soft);
  --accent-ink:var(--hd-gold);
  --gold-700:var(--hd-gold); --gold-600:var(--hd-gold); --gold-500:var(--hd-gold); --gold-300:var(--hd-gold);
  --ink-900:var(--hd-on-d); --ink-700:var(--hd-on-d-2); --ink-500:var(--hd-on-d-3);
  --pw-ink:var(--hd-on-d); --pw-body:var(--hd-on-d-2); --pw-mut:var(--hd-on-d-3);
  color:var(--hd-on-d);
}
body.hd-paper-body :is(.page-hero,.story-hero--dark,.credit-cockpit,.access-shell,.x-hero,
  .ac-band,.pw-chainband,.pw-statusband,.portal-entry,.iw-hero,.ik-hero,.iw-close) .btn--ghost{
  color:#fff; border-color:rgba(255,255,255,.32); background:rgba(7,23,37,.16);
}

/* ONE PRIMARY BUTTON (Dante item 7/re-audit 3). Four specs were live: 46px r6
   gradient, 48px r3 flat 13.4px, 54px r2 gradient, 48px r2 flat. Now 48px
   (54 for the homepage hero, .hd-btn, unchanged), 2px corners, 15px/600, the
   gold fill, ink #071725. */
body.hd-body .btn{min-height:48px;font-size:15px;font-weight:600;border-radius:2px}
/* the phone and email links on the intake pages were 8px pills */
body.hd-body :is(.ik-direct a,.ik-contact a,.ik-reach a){border-radius:2px}

/* ONE HERO SURFACE (Dante item 8). Five heroes painted their own glow
   gradients; every other hero on the site is flat navy. Flat, everywhere. */
/* REMOVED (2026-09-16): this painted .page-hero, .story-hero--dark,
   .credit-cockpit, .portal-entry, .x-hero and .access-shell with
   --hd-navy-deep !important, so every one of those surfaces was navy whatever
   the band said. Three pages (1031-exchange, private-credit, 404) are a single
   one of these blocks between a navy masthead and a navy footer, which made
   them 0% light: the wall the alternation work exists to remove. The !important
   was beating theme-adam.css outright.

   The ones that are genuinely heroes (.page-hero, .story-hero--dark,
   .portal-entry) are in theme-adam.css's measured band list and still paint
   navy. The three decision tools are now his light .path-section. */

/* The learn pages sit on paper (learn.css) but take the navy token scope, so a
   ground-chosen eyebrow resolved to the navy gold on paper at 2.0:1. */
html body.hd-body.learn{--accent-ink:var(--hd-gold-deep)}

/* The gold button inside page content ran at the header's 46px/14.5px; the
   primary spec is 48/15. And on the 404 card the .actions column stretched its
   button to 108px tall. */
main .ck-btn--gold{height:auto;min-height:48px;font-size:15px}
.access-card .actions{align-items:flex-start}
.portal-app .btn--primary{font-size:15px !important}
.ik-form .ck-btn--gold,.ik-form__act .ck-btn,.iw-close .ck-btn--gold{height:auto;min-height:48px;font-size:15px}
.access-card .actions .btn{height:auto;flex:0 0 auto;align-self:flex-start}
/* An unsized SVG inside a button renders at its intrinsic 54px: the 404's
   "Return Home" was 108px tall for it. Button icons are text-sized. */
.btn > svg,.ck-btn > svg{width:18px;height:18px;flex:none}
/* site.css:1028 .access-card .ico sizes the 404 card's header icon at 54px with
   a 28px margin, and also caught the icon inside the Return Home button. */
.access-card .btn .ico{width:18px;height:18px;margin:0}


/* ============================================================================
   ONE NIGHT: EVERY REVIEWED PAGE ON NAVY  (founder, 2026-09-10)
   ----------------------------------------------------------------------------
   "It's like dark mode going to light mode and back... they all need to match."
   The standard pages carried body.hd-paper-body, which painted them paper. They
   now carry body.hd-night instead: the same layout, on the navy system every
   other page already uses. The paper rules above stay keyed on hd-paper-body,
   untouched, so a light mode is one class away if it is ever wanted.

   The light islands (components that paint white from a literal) take the
   on-dark token set here, the mirror of the paper set they take above, and
   the ones that show a white ground become raised navy surfaces.
   ========================================================================== */
/* ---------------------------------------------------------------------------
   THE FORCED-DARK BLOCK, REMOVED  (2026-09-16)
   ---------------------------------------------------------------------------
   25 component selectors used to be pinned to the dark alias set here, because
   hd-night meant the entire page was navy and a component could safely assume
   its ground. That assumption is now false: theme-adam.css restores Adam's
   light/dark alternation, so .iw-card, .ik-form, .o-card and the rest sit on a
   paper band about half the time.

   Forcing the dark set produced white-on-paper text — the card titles on
   investing-with-us.html were rgb(255,255,255) on rgb(244,245,243), which is
   1.06:1 and simply invisible. Traced with CDP getMatchedStylesForNode rather
   than guessed; .iw-card{color:var(--ink)} was reading an --ink this block had
   set to white.

   Nothing replaces it. Grounding now happens once per BAND (theme-adam.css §B
   and its measured dark-band list), and every component inherits from the band
   it is actually in, which is correct on navy and on paper without either side
   being enumerated. If a component genuinely paints its own dark background,
   add it to the measured list in theme-adam.css — do not reinstate a blanket
   force here.
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   GROUND-AWARE, NOT NAVY-LITERAL  (2026-09-16)
   ---------------------------------------------------------------------------
   Everything below was written when hd-night meant the whole page was navy, so
   it named the dark values directly and pinned them with !important. The page
   ground now ALTERNATES (theme-adam.css), and a rule that forces a navy card
   paints a navy card onto a paper band.

   The tokens are swapped for their ground-aware aliases. On a .ground-navy band
   they resolve to exactly the values they had before, so the dark treatment is
   unchanged; on a light band they follow the band. The !important stays because
   these still have to beat eleven template stylesheets.
   --------------------------------------------------------------------------- */
/* Raised surfaces: one step up from the page, one hairline. */
body.hd-night :is(.ik-form,.ik-card:not(.ik-card--dark),.iw-card,.pw-deal,.x-answer,.gl-item,
  .asset-card,.video-slot,.ik-carry,.ik-done,.ik-done__sum,.ik-fwd){
  background:var(--hd-surface) !important;border-color:var(--hd-line) !important;box-shadow:none !important;
}
/* Choices and routes are outlined, not filled; the chosen one takes the gold. */
body.hd-night :is(.ik-choice,.ik-routes a,.gl-chip){
  background:transparent !important;border-color:var(--hd-line-2) !important;
}
body.hd-night .ik-choice:has(input:checked),body.hd-night .gl-chip[aria-pressed="true"]{
  background:rgba(215,171,86,.12) !important;border-color:var(--hd-accent) !important;
}
body.hd-night :is(.ik-routes a,.ik-choice):hover{border-color:var(--hd-fg-3) !important}
/* Fields sit below the surface, not on it. */
body.hd-night main :is(input:not([type=radio]):not([type=checkbox]),select,textarea){
  background:var(--hd-field) !important;color:var(--hd-fg) !important;
  border-color:var(--hd-line-2) !important;
}
body.hd-night main :is(input,textarea)::placeholder{color:var(--hd-fg-3);opacity:1}
body.hd-night main select option{background:var(--hd-field);color:var(--hd-fg)}
/* REMOVED (2026-09-16): this forced the non-dark hero transparent so the navy
   body could show through it. With the ground alternating, the body is paper
   and the hero has to paint its own navy — the !important here was beating
   theme-adam.css and leaving partner-selection's hero white-on-paper at
   1.09:1. .story-page keeps the transparency; it is a wrapper, not a band. */
body.hd-night .story-page{background:transparent !important}

/* Resources and Insights run their own paper ramp (learn.css). Same move. */
html body.cockpit.learn{
  --p-card:var(--hd-surface); --p-card-2:var(--hd-surface);
  --p-ink:var(--hd-fg); --p-body:var(--hd-fg-2); --p-mut:var(--hd-fg-3);
  --p-meta:var(--hd-fg-3); --p-rule:var(--hd-line); --p-rule-soft:var(--hd-line);
  --p-gold:var(--hd-accent); --p-gold-ink:var(--hd-accent);
}
/* The glossary bar is a sticky filter strip on a page that is now paper; a
   navy fill there left its count at 1.15:1. It takes the band's surface and a
   hairline, the way his .market-board sits on .market-section. */
html body.cockpit.learn .gl-bar{background:var(--hd-surface) !important;
  border-bottom:1px solid var(--hd-line-l)}
html body.cockpit.learn .asset-card__img{background:var(--hd-field)}
/* Headlines that read var(--white): on navy that token is a surface colour. */
body.hd-night main h1{color:var(--hd-fg)}
/* The 1031 answer card set its own dark literals for a white card. */
body.hd-night .x-answer :is(h2,h3,b,strong){color:var(--hd-fg) !important}
body.hd-night .x-answer :is(.lede,p,li,.steps > div,.x-when){color:var(--hd-fg-2) !important}
body.hd-night .x-answer .x-when b{color:var(--hd-fg) !important}
html body.cockpit.learn kbd{color:var(--hd-fg-2);background:transparent;border-color:var(--hd-line-2)}

/* ---------------------------------------------------------------------------
   WHAT THE NIGHT FLIP BROKE  (Dante, 2026-09-11)
   ---------------------------------------------------------------------------
   1. The controls read as already chosen. intake.css fills a radio with #fff
      and marks :checked with a gold INSET ring. On paper a white circle read
      as empty; on navy a solid white dot reads as checked, so both mutually
      exclusive accreditation answers looked selected at once. The unchecked
      control now sits below the card and the checked one is a gold disc. */
/* GROUND-AWARE (2026-09-16). These pinned the control to --hd-navy-deep, which
   was right while every page was navy. On contact.html the choice cards now sit
   on a WHITE card, so a navy-filled radio rendered as a solid black dot and all
   six mutually exclusive options read as already chosen — the exact defect the
   note above was written to fix, reintroduced from the other side.
   --hd-surface is navy-2 on a dark band and white on a light one, so unchecked
   is the surface and checked is a gold disc with the surface punched out of it. */
body.hd-night .ik-choice input{
  background:var(--hd-surface) !important;border-color:var(--hd-line-2) !important;
  box-shadow:none !important;
}
body.hd-night .ik-choice input:checked{
  background:var(--hd-gold) !important;border-color:var(--hd-gold) !important;
  box-shadow:inset 0 0 0 3px var(--hd-surface) !important;
}
body.hd-night .ik-choice input[type="checkbox"]:checked{
  box-shadow:inset 0 0 0 3px var(--hd-surface) !important;
}
body.hd-night .ik-choice:has(input:checked){
  background:rgba(215,171,86,.10) !important;border-color:var(--hd-gold) !important;
  box-shadow:inset 0 0 0 1px var(--hd-gold) !important;
}
body.hd-night .ik-choice:hover{background:rgba(255,255,255,.04) !important}

/* 2. The skip link inherits body.cockpit a{color:inherit} (0,1,2), which is
      white on the gold bar once the page is navy. Doubling the class beats it
      on every page without naming them. */
.skip-link.skip-link{color:var(--ck-ink)}

/* 3. DEPTH. Page, raised and deep sat inside a 6% luminance step, so 99 of 640
      card-like boxes had no edge at all. The raised surface lifts to a 1.3
      ratio against the page (still 12:1 for white text), and a band that
      touches another band takes a hairline. */
/* A raised surface is its own token. --hd-navy-2 is also a BAND ground (the
   homepage alternates it), so lifting that token would lighten whole sections
   rather than the cards sitting on them. */
/* --hd-raised was #183349, a navy card for an all-navy page. It now follows
   the band: --hd-surface is navy-2 on .ground-navy and white on a light band. */
body.hd-body,body.dl-body{--hd-raised:var(--hd-surface,#183349)}
body.hd-body{--white:var(--hd-raised);--surface:var(--hd-raised);--card:var(--hd-raised);--card-2:var(--hd-raised)}
body.dl-body{--dl-paper-2:var(--hd-raised)}
body.hd-night .ik-card--dark{border-color:var(--hd-line-d2)}
/* The partner cards painted the same navy as the section behind them. */
body.hd-body :is(.pt-cap,.pt-open__card,.pt-open__body,.pt-key,.pt-boundary,.pt-ledger,.pt-tier,.pt-shut__row){
  background:var(--hd-raised);
}
body.hd-night :is(.pw-body,.ac-band,.page-hero,.section--white,.pt-sec--navy,.pt-sec--white,.pt-sec--paper) + :is(.pw-body,.ac-band,.page-hero,.section--white,.pt-sec--navy,.pt-sec--white,.pt-sec--paper){
  border-top:1px solid var(--hd-line-d);
}

/* 5. One image corner: the deal images are 2px, so everything else is. */
body.hd-night :is(.pt-media img,.pt-open__media,.pt-open__media img),
.pt-media,.pt-media img,.hd-tile img,.op-card__img,.op-card__img img{border-radius:2px}

/* 7. THE PORTAL ENTRY. It sits one click from every page behind the Investor
      Portal button, and it was the last light-to-dark jump on the reviewed
      path. portal-cockpit.css paints its card, its actions and its sample
      label from literals, so they are mapped here. The two signed-in mockups
      behind it are untouched, pending the portal decision. */
/* GROUND-AWARE (2026-09-16). These named the dark values directly, which was
   right while .portal-entry was a navy band. It is now his .path-section: a
   headline beside a white card of choices, the same object as the 1031 stage
   tool. The aliases resolve to exactly the old values inside a dark band and
   to the light set here, so one block is correct either way.

   .portal-entry__actions a already said background:#fff in portal-cockpit.css.
   This block was overriding that light intent, not supplying it. */
body.portal-body .portal-entry__card{
  color:var(--hd-fg-2);background:var(--hd-surface);border-color:var(--hd-line-2);
}
body.portal-body .portal-entry__card h2{color:var(--hd-fg)}
body.portal-body .portal-entry__card > p,
body.portal-body .portal-entry__actions small{color:var(--hd-fg-3)}
body.portal-body .portal-entry__actions a{
  color:var(--hd-fg);background:var(--hd-surface);border-color:var(--hd-line-2);
}
/* The primary choice is the gold button: navy label on flat gold, on both
   grounds, which is his .btn-gold. */
body.portal-body .portal-entry__actions > a:first-child{
  color:#071725;background:var(--hd-gold);border-color:var(--hd-gold);
}
body.portal-body .portal-entry__actions > a:first-child small,
body.portal-body .portal-entry__actions > a:first-child *{color:#071725}
/* .status-tag{background:#fff8e8;color:#624812} — a solid pair, not a wash of
   the accent over an unknown ground. The wash measured 1.97:1 on paper. */
body.portal-body .portal-sample-label{
  color:var(--hd-status-soon-ink);background:var(--hd-status-soon-bg);
}
