/* Printable profile: hide chrome and map, keep the profile panel readable. */
@media print {
  .app-header, .atlas-side, .atlas-map-wrap, .map-legend, .map-presets,
  .mode-nav, .footer-actions, dialog, .skip-link, .no-print {
    display: none !important;
  }
  body { background: #fff; color: #000; font-size: 11pt; }
  .print-only { display: block !important; }
  .atlas { display: block; height: auto; }
  .atlas-profile {
    border: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .badge { border-color: #666; color: #333 !important; }
  .ind-row { break-inside: avoid; }
  .glance { break-inside: avoid; }
  .glance-track i { animation: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .slope-line, .slope-line.is-flat, .slope-end { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .slope-line.is-flat { stroke-dasharray: 4 4; }
  .slope, .icon-counts { break-inside: avoid; }
  .icon-row svg, .slope-svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  details.more-measures > summary { display: none; }
  .domain-section { break-inside: avoid-page; }
  a { color: #000; text-decoration: none; }
}

/* Tract card: one page, chrome hidden, colors kept for the position dots. */
@media print {
  @page { size: letter; margin: 0.35in 0.4in; }
  #view-card .page-pane { padding: 0; max-width: none; }
  .tract-card { border: 0; padding: 0; max-width: none; font-size: 9pt; width: 7.7in; zoom: var(--card-fit, 1); }
  .card-head h2 { font-size: 15pt; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
  .card-row, .card-standout, .card-type, .card-head { break-inside: avoid; }
  .card-order > h3 { break-after: avoid; }
  body.card-mode > footer, body.card-mode .app-footer, body.card-mode footer:not(.card-foot) { display: none !important; }
  .card-similar li:nth-child(n+4), .card-similar-far, .card-key { display: none; }
  .card-similar ul, .card-standout ul { margin: 0; }
  .card-subhead { font-size: 8pt; margin-bottom: 0.05rem; }
  .card-outcomes .source-note { font-size: 7pt; margin: 0.1rem 0 0; }
  .card-type .source-note, .card-habitat { font-size: 7pt; margin-bottom: 0.15rem; }
  .card-standout { background: none; border: 1px solid #bbb; }
  .card-locator { width: 95px; }
  /* the one-page card leaves the icon counts and then-and-now charts to the
     screen (their numbers are already in the rows below) */
  #view-card .then-now, #view-card .icon-counts { display: none; }
  .pbar, .card-locator { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .card-row { padding: 0.03rem 0; font-size: 7.3pt; line-height: 1.2; grid-template-columns: minmax(0, 1fr) auto 4.4rem; }
  .card-order > h3 { font-size: 9pt; margin-bottom: 0.15rem; }
  .card-typename { font-size: 11pt; }
  .card-key { font-size: 7pt; margin-bottom: 0.3rem; }
  .card-row .pbar { width: 2.3rem; }
  .card-pnum { min-width: 1.1rem; font-size: 7pt; }
  .card-pos { gap: 0.2rem; }
  .card-outcomes { margin-top: 0.4rem; }
  .card-foot { margin-top: 0.4rem; padding-top: 0.3rem; }
  .card-foot p { margin-bottom: 0.1rem; }
  .card-foot { font-size: 6.8pt; line-height: 1.25; }
  .card-order > h3 { padding-bottom: 0.05rem; }
  .card-grid { row-gap: 0.25rem; }
  .tract-card { line-height: 1.3; }
  .card-type > p, .card-similar ul, .card-standout ul, .card-foot { font-size: 7.5pt; }
  .card-foot .card-credits { font-size: 6pt; line-height: 1.2; }
  .card-head { padding-bottom: 0.3rem; margin-bottom: 0.4rem; }
  .card-type, .card-standout { margin-bottom: 0.4rem; }
  .card-standout { padding: 0.3rem 0.5rem; }
}
