.g-root .yfm:not(.yfm_only-light) {
  --yfm-file-icon-color: var(--g-color-text-primary);
}

.g-root {
  --yfm-color-text-gray: var(--g-color-text-secondary);
  --yfm-color-text-yellow: var(--g-color-private-yellow-600-solid);
  --yfm-color-text-orange: var(--g-color-private-orange-500-solid);
  --yfm-color-text-red: var(--g-color-text-danger);
  --yfm-color-text-green: var(--g-color-text-positive);
  --yfm-color-text-blue: var(--g-color-text-info);
  --yfm-color-text-violet: var(--g-color-text-utility);
}

.g-root {
  --yfm-colorify-black: var(--g-color-text-primary);
  --yfm-colorify-gray: var(--yfm-color-text-gray);
  --yfm-colorify-yellow: var(--yfm-color-text-yellow);
  --yfm-colorify-orange: var(--yfm-color-text-orange);
  --yfm-colorify-red: var(--yfm-color-text-red);
  --yfm-colorify-green: var(--yfm-color-text-green);
  --yfm-colorify-blue: var(--yfm-color-text-blue);
  --yfm-colorify-violet: var(--yfm-color-text-violet);
}

/*
 TDOD: delete it after https://github.com/diplodoc-platform/transform/pull/708
 fix spacing for last paragraph and empty paragraphs with cursor (override YFM style)
 */
@supports selector(:has(br)) {
  .yfm li > p:only-of-type:has(br),
  .yfm li > blockquote:only-of-type:has(br) {
    margin-block: 0;
  }
}
.yfm li > p:last-child {
  margin-block: var(--yfm-list-text-only-margin-block, 0);
}