/* Portfolio cards receive this class from Uncode's block-data filter. */
@media (max-width: 959px) {
  .mrbk-reference-card .t-cat-over {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    inset: 0 0 auto;
    width: auto;
    max-width: 100%;
    padding: var(--mrbk-category-spacing, 12px);
    text-align: left;
  }

  .mrbk-reference-card .t-cat-over :is(.t-cat-over-inner, .t-entry-cat-single) {
    display: inline-flex;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Extra tmb class outranks Uncode’s important category-color rule. */
  .tmb.mrbk-reference-card .t-cat-over .tmb-term-evidence {
    margin: 0;
    padding: 5px 9px;
    border: 1px solid var(--mrbk-category-border, rgba(255, 255, 255, .22));
    border-radius: var(--mrbk-category-radius, 999px);
    background: var(--mrbk-category-background, rgba(13, 10, 46, .88));
    /* Uncode's palette and type-size utilities also use !important. */
    color: var(--mrbk-category-color, #fff) !important;
    font-size: var(--mrbk-category-size, 12px) !important;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Existing extra class on the Uncode reference grid, independent of page URL. */
  .referenzen {
    --mrbk-category-spacing: 10px;
    --mrbk-category-border: #d9d8e2;
    --mrbk-category-radius: 6px;
    --mrbk-category-background: #fff;
    --mrbk-category-color: #1b183a;
    --mrbk-category-size: 11px;
  }

  .referenzen .mrbk-reference-card .t-cat-over {
    pointer-events: none;
  }

  .referenzen .mrbk-reference-card :is(.t-cat-over-inner, .t-entry-cat-single) {
    flex: 0 1 auto;
  }

  .referenzen .mrbk-reference-card .tmb-term-evidence {
    display: inline-block;
    box-shadow: 0 1px 3px rgb(27 24 58 / 8%);
  }
}
