/* ===========================================================================
   POKER CARDS — the four-colour deck, filled
   Shared card + suit visual language for .lf-card, rendered by
   ApplicationHelper#render_poker_card. Its own stylesheet because it is used
   by the LeakFinder report AND by public pages on the "landing" layout, which
   does not load leakfinder.css.

   A card is filled with its suit's ink (tokens.css): spade black, heart red,
   diamond blue, club green, and the rank and pip are printed on it in the
   face colour. The whole card carries the suit, so a heart is told from a
   diamond at a glance, before the pip is read; every ink clears WCAG AAA
   against the face. A light hairline edge keeps the near-black spade card
   from sinking into the night. The replayer uses the same four fills.

   Suit inks only ever fill a card. That is what keeps a red heart from
   reading as a critical leak: a severity colour lights a mark on the night,
   never a card-shaped object.
   =========================================================================== */

/* ── Card: a small portrait card, rank above pip ── */
.lf-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 2.5rem;
  height: 3.5rem;
  /* Square corners everywhere; a card alone keeps a 3px one. */
  border-radius: 3px;
  border: var(--pl-rule-width) solid color-mix(in oklab, var(--pl-suit-face) 45%, transparent);
  background: var(--pl-suit-spade);
  color: var(--pl-suit-face);
  font-family: var(--pl-font-data);
  font-weight: 800;
  font-feature-settings: "calt" 0;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.lf-card__rank {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.lf-card__suit {
  font-size: 1.125rem;
}

/* ── Suit fills ── */
.lf-suit--spade { background: var(--pl-suit-spade); }
.lf-suit--heart { background: var(--pl-suit-heart); }
.lf-suit--diamond { background: var(--pl-suit-diamond); }
.lf-suit--club { background: var(--pl-suit-club); }

/* ── Focus state for keyboard navigation ── */
.lf-card:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ── Hand pair (two cards side by side) ── */
.lf-hand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
