/* Small adaptations of the bundled Twenty Seventeen 3.6 stylesheet. */
:root { --navigation-height: 72px; }
html { scroll-behavior: smooth; }
body { overflow-wrap: break-word; }
body.has-header-image .site-description { font-weight: bold; opacity: 1; }
.entry-title { overflow-wrap: anywhere; }
.entry-content a { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid #245e81; outline-offset: 5px; }
.site-branding a:focus-visible { outline-color: #fff; }
.site-content:focus { outline: none; }
.social-navigation a { height: 44px; width: 44px; }
.social-navigation .icon { top: 14px; }
.original-image-link { margin-top: 1.5em; }
.attachment .entry-content a[aria-haspopup="dialog"] { cursor: zoom-in; }
.attachment .entry-content img { height: auto; }
.single-attachment #primary { float: none; margin: 0 auto; width: 100%; }
.single-attachment .entry-header { margin-bottom: 2em; }
.single-attachment .entry-content { float: none; width: 100%; }

@media (min-width: 48em) {
  html { scroll-padding-top: calc(var(--navigation-height) + 16px); }
  body.has-header-image .site-branding { margin-bottom: var(--navigation-height); }
  .single-attachment #primary { max-width: 740px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .has-header-image .custom-header-media img { position: absolute; }
}

/* Optional image viewer; the original image links work without JavaScript. */
html.lightbox-open { overflow: hidden; scrollbar-gutter: stable; }
.lightbox {
  width: 100%; height: 100%; height: 100dvh;
  max-width: none; max-height: none; margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border: 0; background: #fff; color: #333; overflow: auto;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(0 0 0 / .8); }
.lightbox-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; width: min(100%, 80rem); height: 100%; min-height: 12rem; gap: .5rem; }
.lightbox-header, .lightbox-footer, .lightbox-navigation { display: flex; align-items: center; gap: .75rem; }
.lightbox-header, .lightbox-footer { justify-content: space-between; }
.lightbox-header h2 { margin: 0; padding: 0; color: #222; font-size: 1rem; line-height: 1.4; font-weight: 600; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.lightbox button { flex-shrink: 0; min-height: 44px; min-width: 44px; padding: .5rem .8rem; border: 1px solid #aaa; border-radius: 2px; background: #f5f5f5; color: #222; font: inherit; font-size: .9rem; cursor: pointer; }
.lightbox button:hover { border-color: #222; background: #eee; }
.lightbox-close span { margin-left: .3rem; font-size: 1.3em; line-height: 1; }
.lightbox-stage { display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.lightbox-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.lightbox [hidden] { display: none; }
.lightbox-status { margin: 0; color: #666; font-size: .9rem; text-align: center; }
.lightbox-counter { min-width: 3.5rem; color: #666; text-align: center; font-variant-numeric: tabular-nums; }
.lightbox-original { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; text-decoration: underline; }
#lightbox-help { margin: 0; color: #666; text-align: center; font-size: .75rem; }
@media (max-width: 32rem) {
  .lightbox { padding: .65rem; }
  .lightbox-header h2 { font-size: .85rem; }
  .lightbox-footer { flex-direction: column; gap: .1rem; }
  .lightbox-navigation { justify-content: center; width: 100%; }
}
@media (max-height: 30rem) and (min-width: 32rem) {
  .lightbox { padding: .5rem 1rem; }
  .lightbox-panel { gap: .2rem; }
  #lightbox-help { display: none; }
}
