/* Role color — what is left of it, and why almost nothing is.
   Load AFTER hc.css. Bind with data-role on <body>.

   THIS FILE USED TO FLIP THE ACCENT: emerald on a homeowner screen, Congress
   Blue on a builder one. It cannot any more. The registered brand
   `user:housechalk` makes Congress Blue both the identity anchor and the next
   product action, and BRAND.md states the other half as a non-negotiable —
   "Green never substitutes for a primary action; it communicates success,
   settled, live, or on-site state." The skill package's own README says the
   approved logo-led palette "supersedes its earlier green-primary mapping",
   and that sentence is the authority for deleting the owner arm rather than
   arguing with it. The four accent tokens are now the same on every screen and
   they live in hc.css, which is where one color for one meaning belongs.

   SO WHAT TELLS YOU WHOSE SCREEN THIS IS. The shell and the mark, and nothing
   else. A builder screen carries the builder mark and a solid Congress Blue
   dock with the measured 32px grid on it; a homeowner screen carries the
   homeowner mark and a Mirage dock with no grid. The distinction moved from
   the accent — which now has a job — to the chrome, which does not.

   The grid is the one place BRAND.md permits it and it stops at the dock:
   "Limit it to shell, navigation, launch, onboarding, or empty-state brand
   surfaces; keep cards, forms, decisions, documents, evidence, and media
   solid." On solid Congress Blue chrome the line is Romance at 10%.

   THE OLD CONTRAST TABLE IS GONE WITH THE VALUES IT MEASURED. The emerald
   anchors #58A586 / #79B59B and the derived blue companions #4990D3 / #779ABD
   are no longer used by anything here; app/assets/design_system/ROLE_COLORS.md
   describes a mapping this file no longer implements. Do not read a ratio out
   of it — hc.css carries the measurements that are live. */

/* ==========================================================================
   THE HOMEOWNER, AND THE PERSON ON THE FAR END OF A LINK
   A link recipient reads as the homeowner's. The v6 set gave them a third
   color and it resolved to the same hex as the owner's, so it distinguished
   nothing; that stays true now that there is one accent for everybody.
   ========================================================================== */
[data-role="owner"] .xnav,
[data-role="owner"] .hc-desk-rail,
[data-role="link"]  .xnav,
[data-role="link"]  .hc-desk-rail {
  /* Mirage, the registered dark canvas, used here as chrome under a light
     page. The dock's stated purpose is to carry its own surface so it reads as
     chrome rather than content, and on warm paper that means dark. */
  --nav-shell: var(--rail-surface);
}

/* ==========================================================================
   THE BUILDER
   Solid Congress Blue, which is the one piece of app chrome BRAND.md draws in
   the identity color, and the only surface in this deck that carries the grid.
   ========================================================================== */
[data-role="builder"] .xnav,
[data-role="builder"] .hc-desk-rail {
  --nav-shell: var(--shell);
  /* THE QUIET TONES GET LOUDER ON A PAINTED SHELL, and Pigment is why. The
     dock's ink defaults to the PAGE's --surface at 72% and 66%, which is a
     translucent near-white — and a translucent ink loses contrast as the
     surface under it gets lighter. Congress Blue was dark enough to carry it
     (the 9px eyebrow measured 4.67:1); Pigment is lighter and more saturated,
     and the same declaration falls to 4.02:1, under the 4.5 AA floor.

     So the builder's chrome takes its own ink — --on-shell is pure white, not
     the page's off-white — at the SAME 85/80 the dark block already uses, and
     for the same reason it gives there. Measured on #283EC4: the eyebrow goes
     4.02 -> 5.72. This is the exact failure the "no raw color literals" rule
     exists to surface, and it stayed hidden while --nav-shell was a literal:
     the shell did not move with the palette, so nothing re-measured. */
  --nav-strong: var(--on-shell);
  --nav-mid: color-mix(in srgb, var(--on-shell) 85%, transparent);
  --nav-dim: color-mix(in srgb, var(--on-shell) 80%, transparent);
}
/* THE BUILDER DOCK CARRIED THE GRID AND NO LONGER DOES. Two rules drew it —
   one for each theme — on `.xnav-shell` and `.hc-desk-rail` rather than on
   `.xnav`, because `.xnav` has no ground of its own and an image on the
   wrapper is drawn and then covered by its opaque child. That subtlety is
   moot now: the shell is a solid color and the role is carried by that color
   and by `--nav-strong`/`--nav-mid`/`--nav-dim`, which is enough. */

:root[data-theme="dark"] [data-role="builder"] .xnav,
:root[data-theme="dark"] [data-role="builder"] .hc-desk-rail {
  --nav-shell: var(--rail-surface);
}
:root[data-theme="dark"] [data-role="builder"] .xnav .xnav-shell,
:root[data-theme="dark"] [data-role="builder"] .hc-desk-rail {
  /* In dark the dock cannot stay Pigment: the page is near-black and a solid
     blue bar stops being chrome and starts being a card. It takes the rail
     surface instead. The grid that used to switch with it is gone. */
}
