@media print {
  :root, :host {
    --cirth-print-color: oklch(0% 0 0);
    --cirth-print-muted-color: oklch(48.3% .03 280);
    --cirth-print-border-color: oklch(61.3% .028 280);
  }

  html {
    color-scheme: light;
    background: none;
  }

  body {
    color: var(--cirth-print-color);
    color-scheme: light;
    --cirth-ink: var(--cirth-print-color);
    --cirth-color: var(--cirth-print-color);
    --cirth-h1-color: var(--cirth-print-color);
    --cirth-h2-color: var(--cirth-print-color);
    --cirth-h3-color: var(--cirth-print-color);
    --cirth-h4-color: var(--cirth-print-color);
    --cirth-h5-color: var(--cirth-print-color);
    --cirth-h6-color: var(--cirth-print-color);
    --cirth-code-color: var(--cirth-print-color);
    --cirth-code-kbd-color: var(--cirth-print-color);
    --cirth-form-element-color: var(--cirth-print-color);
    --cirth-muted-color: var(--cirth-print-muted-color);
    --cirth-form-element-placeholder-color: var(--cirth-print-muted-color);
    --cirth-primary: var(--cirth-print-color);
    --cirth-primary-text: var(--cirth-print-color);
    --cirth-primary-active: var(--cirth-print-color);
    --cirth-primary-underline: var(--cirth-print-color);
    --cirth-secondary-text: var(--cirth-print-color);
    --cirth-secondary-underline: var(--cirth-print-color);
    --cirth-contrast-text: var(--cirth-print-color);
    --cirth-contrast-underline: var(--cirth-print-color);
    --cirth-link-visited-color: var(--cirth-print-color);
    --cirth-muted-border-color: var(--cirth-print-border-color);
    --cirth-form-element-border-color: var(--cirth-print-border-color);
    --cirth-box-shadow: none;
    --cirth-card-box-shadow: none;
    --cirth-card-background-color: transparent;
    --cirth-card-sectioning-background-color: transparent;
    --cirth-code-background-color: transparent;
    --cirth-code-kbd-background-color: transparent;
    --cirth-form-element-background-color: transparent;
    --cirth-form-element-active-background-color: transparent;
    --cirth-table-row-stripped-background-color: transparent;
    --cirth-modal-overlay-background-color: transparent;
    --cirth-mark-background-color: oklch(91.7% .088 89.5);
    --cirth-mark-color: var(--cirth-print-color);
    --cirth-ins-color: oklch(35.3% .077 153);
    --cirth-del-color: oklch(35.3% .121 22);
    --cirth-meter-optimum-color: oklch(52.7% .115 153);
    --cirth-meter-suboptimum-color: oklch(48.3% .084 89.5);
    --cirth-meter-even-less-good-color: oklch(44% .151 22);
    background: none;
  }

  kbd {
    border: var(--cirth-border-width) solid var(--cirth-print-border-color);
  }

  :is(button, [type="submit"], [type="reset"], [type="button"], [role="button"]) {
    border-color: var(--cirth-print-border-color);
    box-shadow: none;
    color: var(--cirth-print-color);
    background: none;
  }

  [type="file"]::file-selector-button {
    border-color: var(--cirth-print-border-color);
    box-shadow: none;
    color: var(--cirth-print-color);
    background: none;
  }

  :is(mark, meter, progress, [type="checkbox"], [type="radio"]) {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a[href^="http"]:not([role="button"], nav a):after {
    content: " (" attr(href) ")";
    color: var(--cirth-print-muted-color);
    font-size: var(--cirth-font-size-sm);
    word-break: break-all;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  tr {
    break-inside: avoid;
  }

  pre {
    white-space: pre-wrap;
    overflow: visible;
  }

  dialog {
    backdrop-filter: none;
    min-width: 0;
    min-height: 0;
    position: static;
  }

  dialog > article {
    max-height: none;
    overflow: visible;
  }

  :is(h1, h2, h3, h4, h5, h6) {
    break-after: avoid;
  }

  :is(figure, img) {
    break-inside: avoid;
  }

  :is(blockquote, li, p) {
    orphans: 3;
    widows: 3;
  }
}
