/* SevenGrid — print stylesheet for legal pages.
 * Users occasionally print Datenschutzerklärung/Impressum for records or audit.
 * Inverts brand-dark to white background + black text (saves ink, better readability).
 * Hides interactive chrome (lang-switcher, back-button, footer-nav).
 */

@media print {
  :root {
    --bg-primary: #ffffff;
    --bg-surface: #ffffff;
    --bg-elevated: #f5f5f5;
    --border: #cccccc;
    --text-primary: #000000;
    --text-muted: #333333;
    --text-faint: #666666;
    --action: #000000;
    --accent-deep: #444444;
    --celebration: #444444;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.45;
  }

  /* Hide interactive/nav chrome that doesn't print well */
  .skip-link,
  .scroll-nav,
  .head-row .back,
  .lang-switch,
  .toc,
  footer .links {
    display: none !important;
  }

  /* Cards: keep visual separation but with light bg */
  .id-card,
  .tldr {
    background: #f8f8f8 !important;
    border: 1px solid #cccccc !important;
    color: #000 !important;
    page-break-inside: avoid;
  }

  /* Expose target URLs after links so print stays useful when offline */
  a {
    color: #000 !important;
    text-decoration: underline;
    border: none !important;
  }
  a[href^="http"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }
  /* Don't append URLs for fragment-only anchors (TOC, back-to-top) */
  a[href^="#"]::after { content: ""; }

  /* Avoid awkward page breaks */
  h1, h2, h3 { page-break-after: avoid; }
  section, .id-card, .tldr, blockquote { page-break-inside: avoid; }

  /* Ensure code/mono is still readable */
  code {
    background: #f0f0f0 !important;
    color: #000 !important;
    padding: 1px 4px;
    border: 1px solid #ddd;
  }

  /* Page margins + footer with URL for context */
  @page {
    margin: 2cm 1.8cm;
  }

  /* Remove transitions/animations entirely for print */
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    box-shadow: none !important;
  }
}
