/* Single article: bare printer-icon button (screen) and the article print layout (print). */

/* ---------- Screen ---------- */

/* One line under the title: date / author / read time on the left, Play-Pause / Print icons on the right.
   When the column is too narrow for both, the buttons drop to their own line, still right-aligned. */
.single-byline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 0.4rem;
}

.single-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin: 0 0 0 auto;
}

/* The read-aloud group brings its own margins; in the byline row the toolbar owns them. */
.single-tools .post-speech {
  gap: 0;
  margin: 0;
}

.vpp-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0.4rem; /* Invisible: keeps a comfortable tap target around the bare icon. */
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--color-heading, #0a4b95);
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.vpp-print-btn svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vpp-print-btn:hover {
  color: var(--color-accent, #1da64a);
  transform: translateY(-1px);
}

.vpp-print-btn:focus-visible {
  outline: 2px solid var(--color-brand-blue, #0f82cb);
  outline-offset: 2px;
}

.vpp-print-note {
  display: none;
}

/* Phones: tighter invisible padding so the icon stays level with Listen / Stop (it wraps neatly on narrower screens). */
@media (max-width: 520px) {
  .vpp-print-btn {
    padding: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vpp-print-btn {
    transition: none;
    transform: none;
  }
}

/* ---------- Print ---------- */

@media print {
  @page {
    margin: 16mm;
  }

  /* Only the article stays: no navigation, sidebar, comments, ads, forms or listen controls. */
  .site-utility-bar,
  .utility-drawer,
  .utility-drawer-overlay,
  .site-header,
  .news-ticker,
  .sidebar-stack,
  .site-footer,
  .post-speech,
  .vpp-print-btn,
  .single-post-nav,
  .pagination-wrap,
  .discussion-section,
  .post-pdf-download,
  .single-recent-posts,
  .vyqon-gate,
  .vyqon-gate__backdrop,
  .vyqon-infeed-ad,
  ins.adsbygoogle,
  iframe {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .archive-layout {
    display: block !important;
  }

  .single-main {
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .single-byline-row {
    display: block;
  }

  .single-tools {
    display: block;
    margin: 0 0 4mm;
  }

  .vpp-print-note {
    display: block;
    margin: 2mm 0 0;
    color: #333;
    font-size: 9pt;
  }

  .single-header {
    border-bottom: 1px solid #000;
  }

  .single-main .entry-title {
    color: #000 !important;
    font-size: 22pt;
  }

  .single-meta span {
    background: none !important;
    border-color: #888 !important;
    color: #000 !important;
  }

  .single-featured-media {
    margin: 0 0 5mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .single-featured-media img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 95mm;
    margin: 0 auto;
    object-fit: contain;
  }

  .entry-content {
    font-size: 11pt;
    line-height: 1.5;
  }

  .entry-content img,
  .entry-content figure,
  .entry-content blockquote {
    max-width: 100% !important;
    height: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .entry-content h2,
  .entry-content h3,
  .entry-content h4 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .entry-content tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .entry-content a,
  .single-main a {
    color: inherit !important;
    text-decoration: underline !important;
  }

  /* On paper a link is useless without its address. */
  .entry-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    color: #444;
    font-size: 8.5pt;
    word-break: break-all;
  }
}
