@page {
  margin: 16mm;
}

html,
body {
  min-height: 0 !important;
  color: #111 !important;
  background: #fff !important;
  font-size: 10.5pt;
  line-height: 1.45;
}

body::before,
.status-bar,
.page-nav,
.site-footer,
.skip-link,
.reading-progress,
.appearance-control,
.post-neighbor-nav,
.related-posts,
.leaflet-container,
.mgs-ride-map-status {
  display: none !important;
}

main,
.content-wrap,
.page-content {
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  color: #111 !important;
  background: transparent !important;
  box-shadow: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #111 !important;
  break-after: avoid;
  page-break-after: avoid;
}

p,
li {
  orphans: 3;
  widows: 3;
}

a,
a:visited {
  color: #111 !important;
  text-decoration: underline;
}

.post-meta-strip,
figure,
blockquote,
pre,
table {
  break-inside: avoid;
  page-break-inside: avoid;
}

.post-meta-strip {
  border: 1px solid #777 !important;
  color: #111 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.post-meta-strip a,
.post-tag-chip {
  color: #111 !important;
  background: transparent !important;
}

.mgs-photo,
.page-content .mgs-photo,
.page-content figure.mgs-photo.mgs-photo-center {
  float: none !important;
  clear: both;
  width: auto !important;
  max-width: 100% !important;
  margin: 1em auto !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mgs-photo img,
.post-hero img,
img {
  max-width: 100% !important;
  height: auto !important;
  box-shadow: none !important;
}

.mgs-photo figcaption,
figcaption {
  color: #333 !important;
  background: transparent !important;
}

.mgs-ride-map::before {
  display: block;
  content: "Interactive route map omitted from print; use the GPX link below.";
  margin-bottom: 0.5em;
  color: #333;
  font-size: 9pt;
}

.mgs-ride-map-canvas,
.leaflet-control-container {
  display: none !important;
}

button,
input,
select,
textarea {
  display: none !important;
}

* {
  box-shadow: none !important;
  text-shadow: none !important;
}
