/* Signed-in chrome, driven by the server.

   The platform's `auth.state` event answers every page load with OOB-swap
   fragments, one of which is a script that adds `logged-in` to <body> when the
   session is real. Nothing here decides anything: these three rules just show
   and hide chrome that is already on the page, according to a class only the
   server sets. Same contract as eligtas_com (site/css/eligtas.css), so the two
   sites cannot drift on what "signed in" looks like to the DOM.

   Default is SIGNED OUT: `data-show-when-logged-in` starts hidden, so a page
   that never gets an answer — service down, offline — shows the anonymous
   chrome rather than flashing an account link at a visitor who has no account.

   SITE-OWNED, not vendored. tokens.css and components.css are copied from the
   component library at a pinned commit (ADR 004) and must not be hand-edited;
   this file is this site's own, and is loaded alongside them. It is behaviour
   the chrome needs on every page, not per-page styling. */

/* These rules only ever HIDE. An earlier version un-hid with
   `display: revert !important`, which reverts to the USER-AGENT default and so
   discards the author styles too — `.btn` is `display:inline-flex`, and a
   reverted `<a class="btn">` came back as plain `inline`. The signed-in "Your
   account" button then sat off the line its siblings held, because it was no
   longer the same kind of box. Scoping the hide to the signed-out state means
   the signed-in element is simply not targeted, and keeps whatever display its
   own component gave it.

   This is where the two sites' CSS diverges: eligtas_com still carries the
   revert form. The DOM contract is unchanged — same attributes, same
   server-set `logged-in` class — so nothing about "what signed in looks like"
   has drifted; only the mechanics of getting there. */

body:not(.logged-in) [data-show-when-logged-in] { display: none !important; }
body.logged-in [data-hide-when-logged-in] { display: none !important; }
