/* ==========================================================================
   Blog: index, article, author. Loaded only on blog pages (after site.css).
   Builds on the site tokens (palette, Melodrama + Satoshi, radius, the juntos dot).

   What is unique to the blog
     - generated covers for articles without an image (decor vectors on brand gradients)
     - a reading-progress rail with a travelling dot under the header
     - a table of contents whose active item carries the juntos dot
     - numbered lists, pull-quotes and a "· · ·" divider written in the same visual language
   ========================================================================== */

/* ---------- Shared bits ---------- */
.avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--sand); box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--line); }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 92px; height: 92px; }
.avatar-initial { display: inline-grid; place-items: center; background: var(--terracotta); color: var(--white); font-family: var(--font-display); font-weight: 600; }
.avatar-sm.avatar-initial { font-size: 16px; }
.avatar-md.avatar-initial { font-size: 21px; }
.avatar-lg.avatar-initial { font-size: 38px; }

.byline { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; }
.byline-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.byline-name { font-weight: 700; font-size: 14px; }
.byline-name a { text-decoration: none; }
.byline-name a:hover { color: var(--terracotta); }
.byline-sub { font-size: 13px; color: var(--slate); }
.byline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--slate); }
.byline-read { display: inline-flex; align-items: center; gap: 5px; }
.byline-read .icon { color: var(--terracotta); width: 15px; height: 15px; }
.byline-lg .byline-name { font-size: 16px; }

.cat-chip {
  position: relative; z-index: 2; display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.cat-0 { background: rgba(200, 94, 69, 0.12); color: var(--terracotta-dark); }
.cat-0:hover { background: var(--terracotta); color: var(--white); }
.cat-1 { background: rgba(23, 38, 61, 0.08); color: var(--navy); }
.cat-1:hover { background: var(--navy); color: var(--white); }
.cat-2 { background: rgba(242, 162, 142, 0.3); color: #8A3722; }
.cat-2:hover { background: var(--coral); color: var(--navy); }

.featured-flag {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: var(--navy); color: var(--white); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.featured-flag .live-dot { background: var(--coral); }
.featured-flag .live-dot::after { border-color: var(--coral); }

.tag-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--white);
  border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.tag-pill:hover { border-color: var(--terracotta); transform: translateY(-1px); }
.tag-pill small { font-size: 12px; font-weight: 700; color: var(--slate); margin-left: 2px; }
.tag-cloud, .post-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Generated covers (articles without an image) ---------- */
.cover-fallback { position: absolute; inset: 0; display: block; overflow: hidden; isolation: isolate; }
.cover-fallback .decor-cover {
  position: absolute; left: 50%; top: 50%; right: auto; bottom: auto; width: 96%; height: auto; max-height: 130%;
  transform: translate(-50%, -50%); animation: none; opacity: .34; color: var(--white);
}
.cover-mark {
  position: absolute; left: 20px; bottom: 16px; z-index: 1; font-family: var(--font-display); font-weight: 500;
  font-size: 24px; line-height: 1; letter-spacing: -0.01em; color: var(--white);
}
.cover-mark .dot { color: var(--navy); }
.cover-v0 { background: var(--grain-soft), radial-gradient(520px 320px at 85% 0%, rgba(255, 255, 255, .28), transparent 70%), linear-gradient(135deg, var(--coral), var(--terracotta)); }
.cover-v1 { background: var(--grain-soft), radial-gradient(520px 320px at 90% 110%, rgba(242, 162, 142, .28), transparent 70%), linear-gradient(135deg, var(--navy), var(--navy-2)); }
.cover-v1 .cover-mark .dot, .cover-v3 .cover-mark .dot { color: var(--coral); }
.cover-v2 { background: var(--grain-soft), radial-gradient(520px 320px at 10% 100%, rgba(242, 162, 142, .45), transparent 70%), linear-gradient(135deg, #EBDCCC, #F6E9DA); }
.cover-v2 .decor-cover { color: var(--terracotta); opacity: .42; }
.cover-v2 .cover-mark { color: var(--navy); }
.cover-v2 .cover-mark .dot { color: var(--terracotta); }
.cover-v3 { background: var(--grain-soft), radial-gradient(520px 320px at 15% 0%, rgba(242, 162, 142, .4), transparent 70%), linear-gradient(135deg, var(--terracotta-dark), var(--navy-2)); }
.cover-v4 { background: var(--grain-soft), radial-gradient(520px 320px at 80% 0%, rgba(200, 94, 69, .45), transparent 70%), linear-gradient(160deg, var(--navy-2), var(--navy)); }
.cover-v4 .cover-mark .dot { color: var(--coral); }

/* ---------- Index hero ---------- */
.blog-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.blog-hero .pill a { text-decoration: none; }
.blog-hero .pill a:hover { color: var(--terracotta); }
.blog-hero .back-pill { margin-bottom: 18px; }
@media (max-width: 900px) { .blog-hero-grid { grid-template-columns: 1fr; } }

.blog-search {
  display: flex; align-items: center; gap: 8px; max-width: 520px; margin-top: 32px; padding: 6px 6px 6px 18px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.blog-search:focus-within { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(200, 94, 69, 0.14); }
.blog-search-icon { display: grid; color: var(--terracotta); }
.blog-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 4px; font-size: 16px; outline: none; }
.blog-search input::-webkit-search-cancel-button { display: none; }

.author-hero { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); margin-bottom: 14px; }
.author-hero .eyebrow { margin-bottom: 8px; }
.author-hero .avatar-lg { width: clamp(84px, 11vw, 120px); height: clamp(84px, 11vw, 120px); }
.author-hero-title { margin: 0 0 14px; font-weight: 700; color: var(--slate); }
.author-links { margin: 18px 0 0; }

/* ---------- Listing ---------- */
.blog-section { padding-top: clamp(40px, 5vw, 64px); }

.topic-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); }
.topic {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px 0 18px; border-radius: 999px;
  background: var(--white); border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.topic:not(:has(span)) { padding-right: 18px; }
.topic span { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--cream); color: var(--slate); font-size: 12px; text-align: center; }
.topic:hover { border-color: var(--terracotta); }
.topic[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.topic[aria-current="page"] span { background: rgba(255, 255, 255, .16); color: var(--white); }
@media (max-width: 720px) {
  .topic-bar { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scrollbar-width: none; }
  .topic-bar::-webkit-scrollbar { display: none; }
}

.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.post-grid > li { display: flex; min-width: 0; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23, 38, 61, 0.05), 0 18px 40px rgba(23, 38, 61, 0.1); }
.post-card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sand); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px 24px 24px; }
.post-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 26px; }
.post-card-title { margin: 0; }
.post-card-title a { text-decoration: none; transition: color .2s ease; }
.post-card:hover .post-card-title a { color: var(--terracotta); }
/* Stretch the title link over the whole card (the chip stays clickable above it). */
.post-card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.post-card-excerpt {
  margin: 0; color: var(--slate); font-size: 15px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .byline { padding-top: 10px; }

.featured-wrap { margin-bottom: clamp(32px, 4vw, 52px); }
.post-card-featured { display: grid; grid-template-columns: 1.1fr 1fr; }
.post-card-featured .post-card-media { aspect-ratio: auto; min-height: 380px; }
.post-card-featured .post-card-media img, .post-card-featured .cover-fallback { position: absolute; inset: 0; }
.post-card-featured .post-card-body { justify-content: center; gap: 16px; padding: clamp(28px, 4vw, 52px); }
.post-card-featured .post-card-excerpt { font-size: 17px; -webkit-line-clamp: 4; }
.post-card-featured .byline { margin-top: 6px; }
.post-card-cta { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; }
.post-card-featured:hover .post-card-cta .icon-arrow { transform: translateX(4px); }
@media (max-width: 860px) {
  .post-card-featured { grid-template-columns: 1fr; }
  .post-card-featured .post-card-media { min-height: 0; aspect-ratio: 16 / 10; }
}

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 16px; margin-top: clamp(40px, 5vw, 64px); }
.pager-pages { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pager-num, .pager-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--white); border: 1.5px solid var(--line); font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.pager-num:hover, .pager-link:hover { border-color: var(--terracotta); color: var(--terracotta); }
.pager-num.is-current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pager-gap { padding: 0 4px; color: var(--slate); }
.blog-topics { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(56px, 7vw, 96px); }
.tag-pill .dot { font-weight: 700; }

/* ==========================================================================
   Article
   ========================================================================== */
.preview-bar {
  position: sticky; top: 76px; z-index: 48; padding: 10px var(--gutter); background: var(--navy); color: var(--white); font-size: 14px; text-align: center;
}
.preview-bar a { color: var(--coral); font-weight: 700; margin-left: 10px; }

/* Reading progress: a hairline under the header with the juntos dot riding its end. */
.read-progress { position: fixed; top: 76px; left: 0; right: 0; height: 3px; z-index: 49; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.read-progress.is-active { opacity: 1; }
.read-progress span { display: block; position: relative; height: 100%; width: calc(var(--read, 0) * 100%); background: linear-gradient(90deg, rgba(242, 162, 142, .2), var(--terracotta)); }
.read-progress span::after {
  content: ''; position: absolute; right: -6px; top: -4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--terracotta); box-shadow: 0 0 0 4px rgba(200, 94, 69, .2);
}

.post-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.post-hero.has-cover { padding-bottom: clamp(96px, 12vw, 176px); }
.post-hero .container { max-width: 1000px; }
.post-hero .post-title { max-width: 17em; }
.post-hero .decor-topo { opacity: .12; top: 40%; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 14px; font-weight: 700; color: var(--slate); }
.crumbs a { text-decoration: none; color: var(--slate); transition: color .2s ease; }
.crumbs a:hover { color: var(--terracotta); }
.post-lead { max-width: 36em; font-size: clamp(18px, 1.8vw, 21px); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.post-meta .byline { margin-top: 0; padding-top: 0; }
.post-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; font-weight: 500; color: var(--slate); }
.post-facts li { display: inline-flex; align-items: center; gap: 8px; }
.post-facts .icon { color: var(--terracotta); }
.post-updated { padding-left: 22px; border-left: 1px solid var(--line); }

.post-cover-wrap { position: relative; z-index: 2; max-width: 1080px; margin-top: calc(-1 * clamp(64px, 9vw, 136px)); }
.post-cover { position: relative; margin: 0; }
.post-cover::before {
  content: ''; position: absolute; inset: 18px -18px -18px 18px; z-index: 0; border: 1.5px solid rgba(200, 94, 69, .45);
  border-radius: calc(var(--radius) + 4px); pointer-events: none;
}
.post-cover img {
  position: relative; z-index: 1; width: 100%; height: auto; max-height: 620px; object-fit: cover; border-radius: var(--radius); background: var(--sand);
  box-shadow: 0 2px 4px rgba(23, 38, 61, .06), 0 34px 80px rgba(23, 38, 61, .2);
}
@media (max-width: 760px) { .post-cover::before { inset: 12px -8px -12px 8px; } }

.post-section { padding-top: clamp(48px, 6vw, 88px); }
.post-layout { display: grid; grid-template-columns: 224px minmax(0, 720px); gap: clamp(40px, 6vw, 96px); justify-content: center; align-items: start; }
.post-main { min-width: 0; }

/* ----- Left rail: contents + share ----- */
.post-rail { position: sticky; top: 112px; max-height: calc(100vh - 136px); overflow: auto; padding: 4px 4px 4px 0; scrollbar-width: thin; }
.toc summary { list-style: none; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--terracotta-ink); }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.toc-list a {
  position: relative; display: block; padding: 7px 0 7px 18px; margin-left: -1.5px; border-left: 1.5px solid transparent;
  font-size: 14.5px; line-height: 1.38; color: var(--slate); text-decoration: none; transition: color .2s ease;
}
.toc-list a:hover { color: var(--navy); }
.toc-list .toc-h3 a { padding-left: 32px; font-size: 13.5px; }
.toc-list a[aria-current="true"] { color: var(--navy); font-weight: 700; border-left-color: var(--terracotta); }
/* The juntos dot rides the rail to the section being read. */
.toc-list a[aria-current="true"]::before {
  content: ''; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--terracotta); box-shadow: 0 0 0 3px var(--paper);
}
.rail-title { margin: 28px 0 12px; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--slate); }
.toc + .share-rail .rail-title { margin-top: 30px; }
.post-rail > .share-rail:first-child .rail-title { margin-top: 0; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--white); border: 1px solid var(--line); color: var(--navy); text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.share-btn:hover { background: var(--terracotta); border-color: var(--terracotta); color: var(--white); transform: translateY(-2px); }
.share-btn[hidden] { display: none; }
.share-btn.is-copied { background: var(--navy); border-color: var(--navy); color: var(--white); }
.share-btn.is-copied::after {
  content: 'Link copied'; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; background: var(--navy); color: var(--white); font-size: 12px; font-weight: 700;
}
.icon-brand { width: 17px; height: 17px; }
.btn .icon-brand { width: 16px; height: 16px; }

@media (max-width: 1000px) {
  .post-layout { grid-template-columns: minmax(0, 720px); }
  .post-rail { position: static; max-height: none; overflow: visible; padding: 0; display: grid; gap: 22px; }
  .toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
  .toc-title { margin: 0; justify-content: flex-start; }
  .toc-title::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
  .toc[open] .toc-title { margin-bottom: 14px; }
  .toc[open] .toc-title::after { transform: rotate(-135deg); }
  .share-rail { display: none; }
}

/* ----- Article body ----- */
.prose-post { font-size: clamp(17.5px, 1.5vw, 19px); line-height: 1.78; color: var(--navy); overflow-wrap: break-word; }
.prose-post > * + * { margin-top: 1.3em; margin-bottom: 0; }
.prose-post > * { margin-bottom: 0; }
.prose-post > :first-child { margin-top: 0; }
.prose-post h2, .prose-post h3, .prose-post h4 { position: relative; scroll-margin-top: 112px; color: var(--navy); }
.prose-post h2 { margin-top: 2.3em; font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.2vw, 36px); line-height: 1.12; letter-spacing: -0.02em; }
.prose-post h3 { margin-top: 1.9em; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 27px); line-height: 1.2; letter-spacing: -0.01em; }
.prose-post h4 { margin-top: 1.7em; font-size: 14px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--terracotta-ink); }
.prose-post h2 + *, .prose-post h3 + *, .prose-post h4 + * { margin-top: .7em; }
.prose-post .heading-anchor {
  margin-left: .45em; font-family: var(--font-body); font-size: .55em; font-weight: 700; color: var(--terracotta); text-decoration: none; opacity: 0; transition: opacity .2s ease;
}
.prose-post h2:hover .heading-anchor, .prose-post h3:hover .heading-anchor, .prose-post h4:hover .heading-anchor, .prose-post .heading-anchor:focus-visible { opacity: 1; }
@media (hover: none) { .prose-post .heading-anchor { display: none; } }
.prose-post h2:target, .prose-post h3:target { animation: anchor-flash 2s ease; }
@keyframes anchor-flash { 0%, 40% { background: linear-gradient(90deg, rgba(242, 162, 142, .3), transparent); } 100% { background: transparent; } }

.prose-post a { color: var(--terracotta-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(173, 75, 52, .4); transition: color .2s ease, text-decoration-color .2s ease; }
.prose-post a:hover { color: var(--terracotta-dark); text-decoration-color: currentColor; }
.prose-post a[target="_blank"]::after { content: '↗'; display: inline-block; margin-left: .18em; font-size: .78em; text-decoration: none; }
.prose-post .heading-anchor::after { content: none; }
.prose-post strong { font-weight: 700; }
.prose-post del { opacity: .65; }

.prose-post ul, .prose-post ol { list-style: none; padding: 0; }
.prose-post li { position: relative; padding-left: 30px; margin: .6em 0; }
.prose-post ul > li::before { content: ''; position: absolute; left: 6px; top: .78em; width: 7px; height: 7px; border-radius: 50%; background: var(--terracotta); }
.prose-post ol { counter-reset: step; }
.prose-post ol > li { counter-increment: step; }
.prose-post ol > li::before {
  content: counter(step); position: absolute; left: 0; top: .32em; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid rgba(200, 94, 69, .45); background: rgba(200, 94, 69, .06); color: var(--terracotta-dark); font-size: 12px; font-weight: 700; line-height: 1;
}

.prose-post blockquote {
  position: relative; margin: 2.2em 0; padding: 6px 0 6px 30px; border-left: 3px solid var(--terracotta);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.5vw, 28px); line-height: 1.38; letter-spacing: -0.01em; color: var(--navy);
}
.prose-post blockquote::before { content: '“'; position: absolute; left: 28px; top: -.42em; font-size: 4.2em; line-height: 1; color: var(--terracotta); opacity: .16; pointer-events: none; }
.prose-post blockquote > * { position: relative; }

.prose-post pre {
  position: relative; margin: 1.8em 0; padding: 20px 22px; overflow: auto; border-radius: var(--radius-sm); background: var(--navy); color: #F3E9DD;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14.5px; line-height: 1.65; tab-size: 2;
}
.prose-post pre:focus-visible { outline-offset: 2px; }
.prose-post code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; padding: .14em .42em; border-radius: 6px; background: rgba(23, 38, 61, .07); }
.prose-post pre code { padding: 0; background: none; font-size: inherit; }
.copy-code {
  position: absolute; top: 10px; right: 10px; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(255, 255, 255, .08);
  color: var(--white); font-size: 12px; font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .2s ease, background-color .2s ease;
}
.prose-post pre:hover .copy-code, .copy-code:focus-visible { opacity: 1; }
.copy-code:hover { background: rgba(255, 255, 255, .18); }
@media (hover: none) { .copy-code { opacity: 1; } }

/* Divider: three dots, the juntos motif at its smallest. */
.prose-post hr { width: 74px; height: 8px; margin: 2.8em auto; border: 0; background: radial-gradient(circle at 4px 4px, var(--terracotta) 3px, transparent 3.5px) 0 0 / 26px 8px repeat-x; }

.prose-post .post-figure { margin: 2.2em 0; }
.prose-post .post-figure img { width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--sand); box-shadow: var(--shadow); }
.prose-post .post-figure figcaption { margin-top: 12px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--slate); }
@media (min-width: 1180px) { .prose-post .post-figure { margin-left: -56px; margin-right: -56px; } }
.prose-post > .post-figure + .post-figure { margin-top: -1em; }

.post-tags { margin-top: 2.6em; }
.post-share { margin-top: 36px; }
.post-share .share-actions .btn { gap: 8px; }

/* ----- Author box ----- */
.author-box { display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 26px); margin-top: 36px; padding: clamp(22px, 3vw, 32px); background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
.author-box .eyebrow { margin-bottom: 6px; }
.author-box h2 { margin: 0; }
.author-box h2 a { text-decoration: none; }
.author-box h2 a:hover { color: var(--terracotta); }
.author-box-title { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--slate); }
.author-box-bio { margin: 12px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--navy); opacity: .88; }
.author-box-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; }
@media (max-width: 560px) { .author-box { flex-direction: column; } }

/* ----- Previous / next ----- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.post-nav-link {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.post-nav-link:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23, 38, 61, 0.05), 0 18px 40px rgba(23, 38, 61, 0.1); }
.post-nav-link:hover .display { color: var(--terracotta); }
.post-nav-link .display { transition: color .2s ease; }
.post-nav-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--terracotta-ink); }
.post-nav-next { text-align: right; align-items: flex-end; grid-column: 2; }
.post-nav-prev { grid-column: 1; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next, .post-nav-prev { grid-column: auto; } }

.post-related .post-card { box-shadow: none; }

@media print {
  .site-header, .site-footer, .cta-band, .post-rail, .post-share, .post-nav, .post-related, .read-progress, .preview-bar, .copy-code { display: none !important; }
  .post-layout { display: block; }
  .prose-post { font-size: 12pt; }
  .prose-post a::after { content: ' (' attr(href) ')'; font-size: .8em; }
  .prose-post .heading-anchor { display: none; }
}

/* Tables in an article (made with the editor's Table button; the base look is .rt-table in site.css). */
.prose-post .rt-table-wrap { margin: 2em 0; box-shadow: var(--shadow); }
.prose-post .rt-table { font-size: .88em; line-height: 1.55; }
.prose-post .rt-table th, .prose-post .rt-table td { padding: .7em 1em; }
.prose-post .rt-table a[target="_blank"]::after { content: none; }
@media (min-width: 1180px) { .prose-post .rt-table-wrap { margin-left: -56px; margin-right: -56px; } }
