/* ========================================
   ANTHEON. Blog (listing + articles)
   Shares tokens with index.htm (Pattern C: Editorial Minimal)
   ======================================== */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F7F7F5;
  --bg-tint: #FBFAFF;
  --text: #111114;
  --text-muted: #5C5C66;
  --border: #E6E6E9;
  --border-strong: #CBCBD1;

  --brand-violet: #9333EA;
  --brand-blue: #3B82F6;
  --brand-gradient: linear-gradient(105deg, #9333EA 0%, #6D48E6 50%, #3B82F6 100%);
  --brand-ink: #1A1230;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1280px;
  --measure: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); font-size: 18px; line-height: 1.7;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  opacity: 0; animation: pageFade 0.6s ease-out 0.1s forwards; overflow-x: hidden;
}
@keyframes pageFade { to { opacity: 1; } }
@media (max-width: 767px) { body { font-size: 16px; } }

h1, h2, h3, h4 { text-wrap: balance; word-break: normal; overflow-wrap: normal; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
h3 { font-family: var(--font-body); font-weight: 600; line-height: 1.25; }
a { color: var(--text); text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
img { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Header (shared with the main site) --- */
header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
header nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; display: block; }
.brand .wordmark { font-family: var(--font-body); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.brand .wordmark .ant { color: var(--text); }
.brand .wordmark .heon { color: var(--brand-violet); }
.nav-links { display: none; align-items: center; gap: 36px; }
.nav-links a { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--brand-violet); font-weight: 700; }
.nav-links .mobile-cta { display: none; }
@media (min-width: 900px) { .nav-links { display: flex; } }
@media (min-width: 900px) and (max-width: 1099px) { .nav-links { gap: 22px; } .nav-links a { font-size: 15px; } }

.nav-burger {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
  color: var(--text); flex-shrink: 0; position: relative; z-index: 201;
}
.nav-burger svg { width: 24px; height: 24px; }
.nav-burger .icon-close { display: none; }
.nav-burger[aria-expanded="true"] .icon-open { display: none; }
.nav-burger[aria-expanded="true"] .icon-close { display: block; }
@media (min-width: 900px) { .nav-burger { display: none; } }
@media (max-width: 899px) {
  .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    background: #fff; z-index: 200; padding: 104px 32px 40px; gap: 0; overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.4s;
    visibility: hidden;
  }
  .nav-links a { padding: 18px 0; border-top: 1px solid var(--border); font-size: 19px; }
  .nav-links a:first-child { border-top: none; }
  .nav-links .mobile-cta { display: inline-flex; margin-top: 24px; border-top: none; color: #fff; }
  .nav-links.mobile-open { transform: translateX(0); visibility: visible; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* Reading progress, pinned to the bottom edge of the sticky header */
.read-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--brand-gradient); transform: scaleX(0); transform-origin: left center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 30px; font-family: var(--font-body); font-size: 16px; font-weight: 600;
  letter-spacing: 0.01em; cursor: pointer; border: none; border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-align: center;
}
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 8px 24px -8px rgba(109,72,230,0.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(109,72,230,0.65); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--text); }
.btn-sm { padding: 11px 22px; font-size: 15px; }
.nav-cta { display: none; }
@media (min-width: 900px) { .nav-cta { display: inline-flex; } }

/* --- Shared bits --- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  font-size: 14px; color: var(--text-muted); margin-bottom: 22px;
}
.eyebrow strong { color: var(--text); font-weight: 700; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-gradient); }
.cat {
  display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-violet);
}
@media (max-width: 767px) { .cat { font-size: 13px; } }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--text-muted); }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
@media (max-width: 767px) { .meta { font-size: 13px; } }

/* ========================================
   LISTING PAGE
   ======================================== */
.blog-hero { padding: 104px 0 56px; text-align: center; }
.blog-hero .kicker {
  display: block; font-size: 14px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brand-violet); margin-bottom: 18px;
}
.blog-hero h1 { font-size: 64px; max-width: 860px; margin: 0 auto 20px; }
.blog-hero h1 .accent { color: var(--brand-violet); }
.blog-hero .lead { font-size: 19px; color: var(--text-muted); max-width: 640px; margin: 0 auto; text-wrap: balance; }
@media (max-width: 767px) {
  .blog-hero { padding: 48px 0 28px; }
  .blog-hero .kicker { font-size: 13px; margin-bottom: 12px; }
  .blog-hero h1 { font-size: 34px; margin-bottom: 14px; }
  .blog-hero .lead { font-size: 16px; }
}

.blog-list { padding: 8px 0 120px; }
@media (max-width: 767px) { .blog-list { padding: 0 0 64px; } }

.read-link { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--brand-violet); }
.read-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.read-link:hover svg { transform: translateX(4px); }

.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.list-head h2 { font-size: 38px; }
@media (max-width: 767px) { .list-head h2 { font-size: 26px; } }

/* Article card (base, also used by the related reads on article pages) */
.post-card { display: flex; flex-direction: column; gap: 18px; }
.post-card .pc-cover { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 10; background: var(--bg-alt); border: 1px solid var(--border); }
.post-card .pc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .pc-cover img { transform: scale(1.05); }
.post-card .pc-body { display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; margin: 8px 0 10px; transition: color 0.2s ease; }
.post-card:hover h3 { color: var(--brand-violet); }
.post-card .excerpt { font-size: 16px; color: var(--text-muted); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { margin-top: auto; }

/* Listing: featured story on top, the rest in a card grid.
   The photo shows whole; the panel under it starts with a soft, blurred
   mirror of the photo's bottom edge and fades into the Antheon ink colour. */
.feature {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  border-radius: 24px; background: var(--brand-ink); color: #fff;
  box-shadow: 0 30px 60px -30px rgba(26, 18, 48, 0.5);
}
.feature-media { aspect-ratio: 16 / 9; overflow: hidden; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.feature:hover .feature-media img { transform: scale(1.02); }
.feature-body { position: relative; z-index: 0; overflow: hidden; padding: 34px 40px 32px; }
.feature-body::before {
  content: ""; position: absolute; inset: -40px; z-index: -2;
  background: var(--cover) center bottom / 100% auto no-repeat;
  transform: scaleY(-1); filter: blur(28px) saturate(1.1);
}
.feature-body::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 120% at 100% 100%, rgba(109, 72, 230, 0.35), transparent 70%),
    radial-gradient(50% 100% at 0% 100%, rgba(59, 130, 246, 0.18), transparent 70%),
    linear-gradient(to bottom, rgba(26, 18, 48, 0.55) 0%, rgba(26, 18, 48, 0.9) 38%, #1A1230 70%);
}
.feature-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.feature h2 {
  font-family: var(--font-body); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
  font-size: 34px; color: #fff; text-wrap: balance;
}
.feature-arrow {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; transition: background 0.25s ease, transform 0.25s ease;
}
.feature-arrow svg { width: 20px; height: 20px; }
.feature:hover .feature-arrow { background: var(--brand-gradient); border-color: transparent; transform: rotate(45deg); }
.feature-excerpt { margin-top: 10px; max-width: 720px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 20px; }
.feature-by { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 15px; font-weight: 600; }
.feature-by .who, .feature-by .when { display: inline-flex; align-items: center; gap: 10px; }
.feature-by .who img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.6); }
.feature-by .when svg { width: 30px; height: 30px; padding: 6px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.35); }
.feature-by .who img.logo, .pc-foot .who img.logo { object-fit: contain; background: #fff; padding: 5px; }
.pc-foot .who img.logo { padding: 4px; border: 1px solid var(--border); }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tags span { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.45); font-size: 14px; font-weight: 500; }
@media (max-width: 1023px) { .feature-body { padding: 26px 28px 26px; } }
@media (max-width: 767px) {
  .feature { border-radius: 18px; }
  .feature-body { padding: 18px 18px 20px; }
  .feature h2 { font-size: 23px; }
  .feature-arrow { width: 38px; height: 38px; }
  .feature-excerpt { font-size: 15px; }
  .feature-by { font-size: 14px; gap: 10px 18px; }
  .feature-tags span { font-size: 13px; }
}

.list-label { margin: 72px 0 24px; font-family: var(--font-body); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.post-grid .pc-cover { aspect-ratio: 4 / 3; border-radius: 18px; border: 0; }
.post-grid .post-card { gap: 16px; }
.post-grid h3 { font-family: var(--font-body); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; line-height: 1.3; margin: 6px 0 8px; }
.post-grid .excerpt { font-size: 15px; -webkit-line-clamp: 2; }
.post-grid .cat { font-size: 13px; letter-spacing: 0.04em; text-transform: none; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; font-size: 14px; color: var(--text-muted); }
.pc-foot .who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.pc-foot .who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.more-posts:not(:has(.post-card)) { display: none; }
@media (max-width: 979px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) {
  .list-label { margin: 48px 0 18px; font-size: 22px; }
  .post-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Closing call to action */
.cta-band {
  margin-top: 88px; padding: 48px 40px; border-radius: 18px; text-align: center;
  background: var(--brand-ink); color: #fff; position: relative; overflow: hidden; isolation: isolate;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 80% at 10% 0%, rgba(147,51,234,0.45), transparent 60%),
    radial-gradient(ellipse 60% 80% at 95% 100%, rgba(59,130,246,0.35), transparent 60%);
}
.cta-band h2 { font-size: 40px; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 540px; margin: 0 auto 26px; font-size: 18px; }
@media (max-width: 767px) {
  .cta-band { margin-top: 40px; padding: 30px 22px; border-radius: 14px; }
  .cta-band h2 { font-size: 26px; }
  .cta-band p { font-size: 15px; margin-bottom: 20px; }
  .cta-band .btn { width: 100%; }
}

/* ========================================
   ARTICLE PAGE
   ======================================== */
.post-head { padding: 64px 0 36px; background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%); }
.post-head .inner { max-width: 860px; margin: 0 auto; text-align: center; }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); margin-bottom: 22px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--brand-violet); }
.crumbs svg { width: 14px; height: 14px; opacity: 0.6; }
.post-head h1 { font-size: 60px; margin: 14px 0 18px; }
.post-head .dek { font-size: 21px; color: var(--text-muted); max-width: 680px; margin: 0 auto 28px; line-height: 1.6; }
.byline { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.byline .avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; padding: 7px; flex-shrink: 0; }
.byline .who { font-size: 15px; font-weight: 600; line-height: 1.3; }
.byline .meta { font-size: 14px; }
@media (max-width: 767px) {
  .post-head { padding: 26px 0 20px; }
  .post-head .inner { text-align: left; }
  .crumbs { justify-content: flex-start; font-size: 13px; margin-bottom: 14px; }
  .post-head h1 { font-size: 32px; margin: 8px 0 12px; }
  .post-head .dek { font-size: 17px; margin: 0 0 18px; }
  .byline .avatar { width: 38px; height: 38px; padding: 6px; }
  .byline .who { font-size: 14px; }
  .byline .meta { font-size: 13px; }
}

.post-cover { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.post-cover figure { overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 8; background: var(--bg-alt); border: 1px solid var(--border); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) { .post-cover { padding: 0 48px; } }
@media (max-width: 767px) { .post-cover figure { aspect-ratio: 16 / 9; border-radius: 12px; } }

/* Body layout: sticky contents rail on wide screens, single column otherwise */
.post-layout { max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 0; display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: center; }
@media (min-width: 768px) { .post-layout { padding: 64px 48px 0; } }
@media (min-width: 1180px) { .post-layout { grid-template-columns: 220px minmax(0, var(--measure)) 220px; column-gap: 56px; } }
@media (max-width: 767px) { .post-layout { padding-top: 24px; } }

.toc-rail { display: none; }
@media (min-width: 1180px) { .toc-rail { display: block; } }
.toc-rail .toc { position: sticky; top: 112px; }
.toc-label { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc li a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 15px; line-height: 1.45; color: var(--text-muted);
}
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--brand-violet); border-left-color: var(--brand-violet); font-weight: 600; }

/* Mobile contents: collapsed by default so it costs one line of scroll */
.toc-inline { margin-bottom: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); }
.toc-inline summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; font-size: 15px; font-weight: 600;
}
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary svg { width: 18px; height: 18px; color: var(--brand-violet); transition: transform 0.25s ease; }
.toc-inline[open] summary svg { transform: rotate(180deg); }
.toc-inline .toc { padding: 0 18px 14px; }
.toc-inline .toc li a { font-size: 15px; }
@media (min-width: 1180px) { .toc-inline { display: none; } }
.toc-rail:empty, .toc-inline.is-empty { display: none; }

.takeaways {
  margin-bottom: 40px; padding: 26px 28px; border-radius: 14px;
  background: linear-gradient(160deg, #FBFAFF 0%, #F5F3FF 60%, #F2F6FF 100%);
  border: 1px solid #ECE7FB;
}
.takeaways .toc-label { color: var(--brand-violet); margin-bottom: 10px; }
.takeaways ul { list-style: none; }
.takeaways li { position: relative; padding: 6px 0 6px 28px; font-size: 17px; line-height: 1.6; }
.takeaways li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand-gradient);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.takeaways li::after {
  content: ""; position: absolute; left: 5px; top: 16px; width: 6px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@media (max-width: 767px) {
  .toc-label { font-size: 13px; }
  .takeaways { padding: 18px 18px; margin-bottom: 28px; }
  .takeaways li { font-size: 15px; padding: 5px 0 5px 26px; }
  .takeaways li::before { top: 10px; } .takeaways li::after { top: 13px; }
}

/* Article typography */
.prose { font-size: 19px; line-height: 1.8; color: #26262C; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 38px; color: var(--text); margin-top: 1.7em; scroll-margin-top: 104px; }
.prose h3 { font-size: 24px; color: var(--text); margin-top: 1.5em; scroll-margin-top: 104px; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { color: var(--brand-violet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--brand-blue); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: 0.55em; padding-left: 0.2em; }
.prose li::marker { color: var(--brand-violet); font-weight: 700; }
.prose blockquote {
  font-family: var(--font-display); font-size: 30px; line-height: 1.3; color: var(--text);
  padding: 4px 0 4px 26px; border-left: 3px solid var(--brand-violet); margin: 1.6em 0;
}
.prose .callout { padding: 22px 24px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 17px; }
.prose .callout strong { display: block; margin-bottom: 4px; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--text-muted); text-align: center; line-height: 1.5; }
@media (max-width: 767px) {
  .prose { font-size: 17px; line-height: 1.75; }
  .prose h2 { font-size: 27px; margin-top: 1.5em; scroll-margin-top: 88px; }
  .prose h3 { font-size: 20px; }
  .prose blockquote { font-size: 22px; padding-left: 18px; margin: 1.3em 0; }
  .prose .callout { padding: 16px 18px; font-size: 15px; }
  .prose figure { margin: 1.5em 0; }
  .prose figcaption { font-size: 13px; }
}

/* Share + tags */
.post-foot { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 14px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.share { display: flex; align-items: center; gap: 8px; }
.share .share-label { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.share a, .share button {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.share a:hover, .share button:hover { border-color: var(--brand-violet); color: var(--brand-violet); transform: translateY(-2px); }
.share svg { width: 18px; height: 18px; }
@media (max-width: 767px) { .post-foot { margin-top: 36px; padding-top: 22px; } .tags span { font-size: 13px; } }

.author-card { margin-top: 32px; display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border: 1px solid var(--border); border-radius: 14px; }
.author-card .avatar { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border); padding: 9px; flex-shrink: 0; }
.author-card .who { font-size: 16px; font-weight: 600; }
.author-card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin-top: 2px; }
@media (max-width: 767px) { .author-card { display: none; } }

/* Article call to action */
.post-cta { max-width: var(--measure); margin: 48px auto 0; }
.post-cta .cta-band { margin-top: 0; text-align: left; padding: 36px 36px; }
.post-cta .cta-band h2 { font-size: 34px; }
.post-cta .cta-band p { margin: 0 0 22px; }
@media (max-width: 767px) { .post-cta { margin-top: 32px; } .post-cta .cta-band { padding: 26px 20px; } .post-cta .cta-band h2 { font-size: 24px; } }

/* Related reads: grid on desktop, one swipeable row on mobile */
.related { padding: 88px 0 112px; }
.related .list-head { margin-bottom: 28px; align-items: center; }
.related .list-head .read-link { margin-top: 0; }
.related .rel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 979px) { .related .rel-row { grid-template-columns: repeat(2, 1fr); } .related .rel-row > :nth-child(3) { display: none; } }
@media (max-width: 639px) {
  .related { padding: 44px 0 56px; }
  .related .list-head { margin: 0 0 16px; }
  .related .rel-row {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px;
    margin: 0 -24px; padding: 0 24px 6px; scrollbar-width: none;
  }
  .related .rel-row::-webkit-scrollbar { display: none; }
  .related .rel-row > :nth-child(3) { display: flex; }
  .related .post-card {
    flex: 0 0 76%; flex-direction: column; align-items: stretch; gap: 12px;
    padding: 0; border: none; scroll-snap-align: start;
  }
  .related .post-card .pc-cover { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; }
  .related .post-card h3 { font-size: 20px; -webkit-line-clamp: 2; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 20px);
  background: var(--brand-ink); color: #fff; font-size: 15px; font-weight: 600;
  padding: 12px 20px; border-radius: 10px; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- Footer (shared) --- */
footer { background: var(--brand-ink); color: rgba(255,255,255,0.72); padding: 72px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; } }
footer .brand .wordmark .ant { color: #fff; }
footer .brand .wordmark .heon { color: #C4B5FD; }
footer .f-about { font-size: 15px; max-width: 340px; margin-top: 18px; line-height: 1.7; }
footer h4 { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
footer ul { list-style: none; }
footer li { margin-bottom: 12px; }
footer a { color: rgba(255,255,255,0.72); font-size: 15px; }
footer a:hover { color: #fff; }
.foot-bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 14px; text-align: center; }
@media (max-width: 767px) {
  footer { padding: 48px 0 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .foot-bottom { margin-top: 36px; }
}

/* --- Motion --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
  .reveal.visible { opacity: 1; transform: none; }
  .stagger-item { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease-out var(--stagger, 0ms), transform 0.55s ease-out var(--stagger, 0ms); }
  .stagger-item.visible { opacity: 1; transform: none; }
  .hero-in > * { opacity: 0; transform: translateY(16px); animation: heroIn 0.7s ease-out forwards; }
  .hero-in > :nth-child(1) { animation-delay: 0.2s; }
  .hero-in > :nth-child(2) { animation-delay: 0.3s; }
  .hero-in > :nth-child(3) { animation-delay: 0.4s; }
  .hero-in > :nth-child(4) { animation-delay: 0.5s; }
  .hero-in > :nth-child(5) { animation-delay: 0.6s; }
  @keyframes heroIn { to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  body { opacity: 1; animation: none; }
  html { scroll-behavior: auto; }
  .read-progress { display: none; }
}

/* Wide cover: shows a 16:9 photo uncropped (for covers with text in the image) */
.post-cover figure.cover-169 { aspect-ratio: 16 / 9; }

/* Tables inside articles: rows stack as cards on phones */
.prose .table-wrap { border: 1px solid var(--border); border-radius: 12px; margin-top: 1.4em; overflow: hidden; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.6; }
.prose th, .prose td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.prose thead th { border-top: 0; background: var(--bg-alt); font-size: 14px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.prose tbody th { width: 17%; font-weight: 600; color: var(--text); }
.prose table.cols-2 tbody th { width: 32%; }
.prose thead th { white-space: nowrap; }
.prose td.who { width: 20%; color: var(--text-muted); font-size: 15px; }
@media (max-width: 767px) {
  .prose table, .prose tbody, .prose tr, .prose th, .prose td { display: block; width: auto !important; }
  .prose thead { display: none; }
  .prose table { font-size: 15px; }
  .prose tbody tr { padding: 16px 18px; border-top: 1px solid var(--border); }
  .prose tbody tr:first-child { border-top: 0; }
  .prose tbody th, .prose tbody td { padding: 0; border: 0; }
  .prose tbody th { font-size: 16px; margin-bottom: 4px; }
  .prose td.who { margin-top: 8px; font-size: 14px; }
  .prose td.who::before { content: "Who uses it: "; font-weight: 600; color: var(--text); }
}

/* Closing call to action: room above the footer when nothing follows it */
main > .container:last-child > .post-cta { margin-bottom: 112px; }
@media (max-width: 767px) { main > .container:last-child > .post-cta { margin-bottom: 64px; } }

/* Demo preview: the cover photo turns into a muted walkthrough video,
   and a small player keeps it going while the reader scrolls. */
.cover-demo { position: relative; }
.cover-demo .demo-link { position: absolute; inset: 0; display: block; color: #fff; }
.cover-demo .demo-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; background: transparent; }
.cover-demo.is-playing .demo-video { opacity: 1; }
.demo-badge {
  position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; background: rgba(26, 18, 48, 0.82); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 24px -8px rgba(26, 18, 48, 0.6);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s, background 0.2s ease;
}
.demo-badge .live { width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.25); }
.demo-badge svg { width: 16px; height: 16px; }
.cover-demo.is-playing .demo-badge, .cover-demo.is-static .demo-badge { opacity: 1; transform: none; }
.cover-demo .demo-link:hover .demo-badge { background: var(--brand-violet); }
.cover-demo .demo-link:focus-visible { outline: 3px solid var(--brand-violet); outline-offset: -3px; border-radius: inherit; }

.demo-mini {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 340px; border-radius: 14px; overflow: hidden;
  background: var(--brand-ink); box-shadow: 0 24px 50px -12px rgba(26, 18, 48, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none; transition: opacity 0.35s ease, transform 0.35s ease;
}
.demo-mini.is-open { opacity: 1; transform: none; pointer-events: auto; }
.demo-mini[hidden] { display: none; }
.demo-mini-link { display: block; color: #fff; }
.demo-mini-screen { position: relative; aspect-ratio: 16 / 9; background: #0f0b1f; }
.demo-mini-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo-mini-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.demo-mini-bar .open { display: inline-flex; align-items: center; gap: 6px; color: #c4b5fd; }
.demo-mini-bar .open svg { width: 14px; height: 14px; }
.demo-mini-link:hover .open { color: #fff; }
.demo-mini-x {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: rgba(15, 11, 31, 0.75); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.2s ease;
}
.demo-mini-x:hover { background: var(--brand-violet); }
.demo-mini-x svg { width: 16px; height: 16px; }
.demo-mini-x:focus-visible, .demo-mini-link:focus-visible { outline: 3px solid #c4b5fd; outline-offset: -3px; }
@media (max-width: 767px) {
  .demo-badge { right: 10px; bottom: 10px; padding: 7px 12px; font-size: 13px; gap: 8px; }
  .demo-badge .bl { display: none; }
  .demo-mini { right: 12px; bottom: 12px; width: min(210px, 52vw); border-radius: 12px; }
  .demo-mini-bar { padding: 7px 10px; font-size: 13px; }
  .demo-mini-bar .label { display: none; }
  .demo-mini-x { width: 28px; height: 28px; top: 6px; right: 6px; }
}
@media (prefers-reduced-motion: reduce) { .demo-mini, .demo-badge, .cover-demo .demo-video { transition: none; } }
