/* ============================================================================
 * deck-gate.css — THE ONE CONDITION that decides whether a page may offer a
 * board deck, and THE ONE OWNER of whether the control is on screen.
 *
 * Shirish, 2026-08-20: "There is no board deck except in KYP right now and
 * nowhere else."
 * Shirish, 2026-08-21: "Bankers need to get a working button right away."
 *   Know Your Peers has the deck. A white-label copy of Know Your Peers IS Know
 *   Your Peers, so it has the deck too. The copy was being read as a different
 *   page and refused. That was an identity bug, not a policy.
 *
 * HOW A PAGE SAYS IT HAS A DECK
 *   <html data-deck="on">   — and nothing else. No path list, no name test.
 *   The declaration is a property OF THE PAGE, so a copy of the page carries it
 *   in the copied bytes. That is why a white-label clone works the day it is
 *   made, under a name this file has never seen. Absent the attribute the deck
 *   is off: DEFAULT DENY.
 *
 * WHY CSS AND NOT A SCRIPT FLAG. Row 106/113 lineage: a deck button was once
 * hidden in markup and un-hidden from script; when the script died at parse time
 * the flag read `true` while the button rendered 0x0 — the source said one thing
 * and the page said another. So the attribute is static bytes and the rule is a
 * stylesheet: no script has to survive for the page to look right, and if the
 * script does die the deck is off in BOTH halves at once, never one.
 *
 * TWO THINGS DECIDE WHETHER THE BUTTON IS SEEN, AND BOTH LIVE HERE:
 *   CAPABILITY  --statum-deck, from data-deck above. Does this page have a deck.
 *   STATE       .is-ready, set by the page when there is something to put in a
 *               deck. The page owns WHEN, this file owns WHETHER. The page must
 *               never write display on these controls: one control, one owner.
 *
 * deck-gate.js reads THIS SAME PROPERTY to decide whether the deck service may
 * be called, so the look and the money are governed by one declaration.
 * ========================================================================== */

:root {
  /* ------------------------------------------------- THE FLAG: default deny */
  --statum-deck: none;
}
:root[data-deck="on"] {
  --statum-deck: block;
}

/* Every deck trigger in the estate, by the id the house uses. Hidden until the
   page both HAS a deck and HAS something to put in it. */
#genDeckBtn,
#deckHint,
.deck-trigger {
  display: none !important;
}

:root[data-deck="on"] #genDeckBtn.is-ready,
:root[data-deck="on"] #deckHint.is-ready,
:root[data-deck="on"] .deck-trigger.is-ready {
  display: var(--statum-deck) !important;
}
