/* Post share bar — native-first sharing. One place to restyle every post. */
.post-share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: -0.85rem 0 2rem;
  min-height: 42px;
}
.post-share .share-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-right: 0.15rem;
}

/* Shared pill look: glass, orange on hover (brand button language) */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.share-btn svg { width: 18px; height: 18px; flex: none; }
.share-btn:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }
.share-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Icon-only variants (desktop fallback row) */
.share-btn.icon { width: 40px; padding: 0; }
.share-btn.icon svg { width: 17px; height: 17px; }

/* The native "forward" button carries the orange accent: it is the primary action */
.share-btn.native { border-color: rgba(255, 122, 0, 0.55); }
.share-btn.native:hover { background: var(--orange); border-color: var(--orange); color: var(--black); }

.share-btn.copied { border-color: var(--orange); color: var(--orange); }

@media (max-width: 600px) {
  .post-share { gap: 0.5rem; }
  .post-share .share-label { width: 100%; margin-bottom: 0.1rem; }
}

/* ── Reading progress ─────────────────────────────────────────────
   Thin orange fill across the top edge, above the nav. Tracks the
   article body only, so it reads 100% when the post ends, not when
   the footer does. */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  z-index: 120;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--orange), #ffa64d);
  will-change: transform;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .read-progress { transition: none; }
}

/* ── Keep reading ─────────────────────────────────────────────────
   Same block as before; JS refreshes the links so newly published
   posts surface on every older post automatically. */
.post-related-links a.is-new::after {
  content: "New";
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── Cross-page view transitions ──────────────────────────────────
   Modern soft cross-fade between pages where the browser supports
   it; a normal page load everywhere else. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* End-of-post share: sits between the article and Keep reading, where the
   reader has just finished and is most likely to pass it along. */
.post-share-end {
  margin: 2.6rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.post-share-end .share-label { color: var(--white); }

/* ── Column alignment for everything after the article ────────────
   Share, Keep reading and the CTA live OUTSIDE .post-body, so they had
   no column of their own: Keep reading ran edge to edge and the CTA rule
   sat 3rem wider than the text. Reproduce the body's column exactly:
   .post-body is max-width 800px with a 1.5rem gutter, so its text measures
   calc(100% - 3rem) capped at 752px. These use the same maths, which keeps
   them aligned at every viewport and keeps the mobile gutter.
   Selectors are prefixed with `article` so they outrank the per-post
   <style> block, which the browser reads after this file. */
article .post-share-end,
article .post-related,
article .post-cta {
  box-sizing: border-box;
  width: calc(100% - 3rem);
  max-width: calc(var(--container-narrow) - 3rem);
  margin-left: auto;
  margin-right: auto;
}
article .post-share-end { margin-top: 2.6rem; padding: 1.6rem 0 0; }
article .post-related { margin-top: 3rem; }
article .post-cta { margin-top: 0; margin-bottom: 5rem; padding: 2.2rem 0; }
