/* A4-utskrift: hvit bakgrunn, mørk tekst, ingen navigasjon eller butikkmoduler. */
@page { size: A4; margin: 16mm 15mm 18mm; }

@media print {
  :root { --c-paper: #fff; --c-surface: #fff; --c-ink: #000; --c-ink-muted: #333; --c-primary: #000; --c-accent: #000; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; line-height: 1.45; }
  .site-header, .site-nav, .site-footer, .preview-banner, .actions, .jump, .scaler, .shop, .no-print,
  .crumbs, .related, .toast, .bake-mode, dialog, .skip-link, .card__actions { display: none !important; }
  .print-only { display: block !important; }
  main::before { display: none !important; }
  main { padding-top: 0 !important; }
  .note:empty { display: none !important; }
  .panel, .card__body, .section--tint { background: none !important; }
  .steps > li::before { box-shadow: none !important; }
  a { color: #000 !important; text-decoration: none; }
  .container { max-width: none; padding: 0; }
  h1 { font-size: 22pt; margin: 0 0 4pt; }
  h2, .step-section { font-size: 14pt; margin: 12pt 0 6pt; }
  h3 { font-size: 11.5pt; }
  .print-header { display: flex !important; justify-content: space-between; font-size: 9pt; border-bottom: 1px solid #000; padding-bottom: 4pt; margin-bottom: 8pt; }
  .recipe-head { display: block; padding: 0; }
  .recipe-head__art { display: none; }
  /* Med bilde: bildet står til høyre for tittel og faktaboks, uten ramme og skygge */
  body.print-with-image .recipe-head { display: grid; grid-template-columns: 1fr 58mm; gap: 0 8mm; align-items: start; }
  body.print-with-image .recipe-head__art { display: block; grid-column: 2; grid-row: 1; width: 58mm; aspect-ratio: 4 / 3; border: 0; box-shadow: none; border-radius: 4pt; overflow: hidden; margin: 0; break-inside: avoid; }
  body.print-with-image .recipe-head__art img { width: 100%; height: 100%; object-fit: cover; }
  body.print-with-image .recipe-head .facts { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 4pt; margin: 6pt 0; }
  .facts div { border: 1px solid #999; padding: 3pt 5pt; background: #fff; }
  .facts dt { font-size: 8pt; }
  .recipe-body { display: block; padding: 0; }
  .panel { box-shadow: none; padding: 0; border: 0; }
  .ingredients-panel { position: static; max-height: none; overflow: visible; }
  .ingredients-panel h3 { margin-top: 10pt; }
  .ing-group, .steps > li, .note, .timeline li { break-inside: avoid; page-break-inside: avoid; }
  .steps > li { position: static; padding-left: 0; }
  .steps > li::before { position: static; display: inline-grid; margin-right: 6pt; vertical-align: 1pt; }
  .steps > li > p:first-child { display: inline; }
  .steps > li > p:first-child::after { content: ""; display: block; margin-bottom: 3pt; }
  h2, h3, .step-section { break-after: avoid; page-break-after: avoid; }
  .ing-list li { grid-template-columns: 30mm 1fr; padding: 2pt 0; border-bottom: 1px dotted #999; }
  .steps > li { padding: 0 0 6pt 22pt; }
  .steps > li::before { background: none; color: #000; border: 1px solid #000; width: 15pt; height: 15pt; font-size: 9pt; }
  .step__timer, .step__uses { display: none; }
  .note { background: #fff !important; border: 1px solid #000; border-left-width: 3pt; }
  .trouble details { padding: 0; }
  .trouble details > summary { list-style: none; min-height: 0; padding: 0; }
  .trouble details:not([open]) > *:not(summary) { display: block; }
  .content-section { border-top: 1px solid #999; padding: 6pt 0; }
  .print-hide-section { display: none !important; }
  .print-footer { display: block !important; margin-top: 10pt; border-top: 1px solid #000; padding-top: 4pt; font-size: 9pt; }
  .print-footer svg { width: 22mm; height: 22mm; float: right; }
  .badge { border: 1px solid #000; background: #fff; }
  .shopping-list .check input { width: 12pt; height: 12pt; }
  .planner__step { box-shadow: none; padding: 0; margin-bottom: 10pt; }
  .pick:not(.is-selected), .presets, [data-planner] .form-row, [data-planner] details, [data-planner] > .note, .planner__step > p.small:first-of-type { display: none !important; }
  .pick { border: 0; padding: 0; background: #fff !important; }
  .planner { display: block; }
}

@media print {
  body.print-label main > *:not(.container), body.print-label .crumbs, body.print-label .article > *:not([data-labeltool]),
  body.print-label [data-labeltool] > *:not(.label-preview), body.print-label .section { display: none !important; }
  body.print-label .gift-label { border: 1px dashed #000; max-width: 90mm; }
}
