/* Utility helpers. Deliberately minimal — add a class when a real need shows
   up, not speculatively (this is where design systems bloat). */

/* Type scale — opt-in text classes mirroring the Figma ramp (tokens.css).
   As utilities they win over component typography, which is the point:
   applying one to a component element is an explicit override. */
.govbb-text-display {
  font-size: var(--govbb-font-size-display);
  line-height: var(--govbb-line-height-display);
  font-weight: 700;
  letter-spacing: var(--govbb-letter-spacing-heading);
  text-wrap: balance;
}

.govbb-text-h1 {
  font-size: var(--govbb-font-size-h1);
  line-height: var(--govbb-line-height-h1);
  font-weight: 600;
  letter-spacing: var(--govbb-letter-spacing-heading);
  text-wrap: balance;
}

.govbb-text-h2 {
  font-size: var(--govbb-font-size-h2);
  line-height: var(--govbb-line-height-h2);
  font-weight: 600;
  letter-spacing: var(--govbb-letter-spacing-heading);
  text-wrap: balance;
}

.govbb-text-h3 {
  font-size: var(--govbb-font-size-h3);
  line-height: var(--govbb-line-height-h3);
  font-weight: 600;
  text-wrap: balance;
}

.govbb-text-h4 {
  font-size: var(--govbb-font-size-h4);
  line-height: var(--govbb-line-height-base);
  font-weight: 600;
  text-wrap: balance;
}

.govbb-text-body-lg {
  font-size: var(--govbb-font-size-body-lg);
  line-height: var(--govbb-line-height-base);
  font-weight: 400;
  text-wrap: pretty;
}

.govbb-text-body {
  font-size: var(--govbb-font-size-body);
  line-height: var(--govbb-line-height-base);
  font-weight: 400;
}

.govbb-text-body-sm {
  font-size: var(--govbb-font-size-body-sm);
  line-height: var(--govbb-line-height-base);
  font-weight: 400;
}

/* Bold at the current size. Visual bolding only — where the emphasis is
   semantic, use <strong> instead. */
.govbb-text-bold {
  font-weight: 700;
}

/* Let an unbreakable string a user typed (an email address, a reference) wrap
   rather than overflow the column. anywhere, not break-word: most components
   here shrink-wrap their text as flex items, where break-word never fires. */
.govbb-text-break-word {
  overflow-wrap: anywhere;
}

/* Hidden from sight, still read by screen readers and focusable. */
.govbb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
