/* =========================================================
   Annual ESG – single article, pages, 404
   Uses the tokens from blog.css:
   --ink, --ink-2, --text, --muted, --soft, --line, --white,
   --shadow, --radius
   ========================================================= */

.container.narrow { max-width: 820px; }

/* ---------- Reading progress ---------- */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  background: var(--ink-2);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .1s linear;
}

/* ---------- Hero ---------- */
.post-hero {
  position: relative;
  background: var(--soft);
  padding: 128px 0 88px;
  border-bottom: 1px solid var(--line);
}
.post-hero.not-found { text-align: center; padding-bottom: 96px; }
.post-hero.not-found .search-box { margin: 0 auto 28px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--line); }

.post-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: border-color .2s, color .2s;
}
.post-eyebrow:hover { border-color: var(--ink-2); color: var(--ink); }

.post-title {
  margin: 0 0 20px;
  max-width: 22ch;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.post-dek {
  max-width: 62ch;
  margin: 0 0 32px;
  font-size: 1.14rem;
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.post-meta .post-avatar { width: 44px; height: 44px; border-radius: 50%; }
.post-meta .meta-stack { display: flex; flex-direction: column; gap: 3px; }
.post-meta .author-name { font-size: .95rem; font-weight: 700; color: var(--ink); }
.post-meta .meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--muted);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ---------- Cover ---------- */
.post-cover {
  position: relative;
  margin: -48px auto 0;
  max-width: 1100px;
}
.post-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: var(--soft);
}
.post-cover figcaption { margin-top: 12px; font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- Layout: TOC sidebar + article ---------- */
.post-layout {
  max-width: 820px;
  padding-top: 56px;
  padding-bottom: 80px;
}
.post-main { min-width: 0; }

@media (min-width: 1080px) {
  .post-layout.has-toc {
    display: grid;
    grid-template-columns: 240px minmax(0, 720px);
    justify-content: center;
    gap: 64px;
    max-width: 1100px;
  }
}

/* ---------- Sidebar TOC (desktop) ---------- */
.post-sidebar { display: none; }

@media (min-width: 1080px) {
  .post-sidebar {
    display: block;
    position: sticky;
    top: 110px;
    align-self: start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.toc-heading {
  margin: 0 0 14px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc-item a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.toc-item.lvl-3 a { padding-left: 30px; font-size: .84rem; }
.toc-item a:hover { color: var(--ink); }
.toc-item a.is-active {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--ink-2);
}
.toc-top {
  display: inline-block;
  margin-top: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s;
}
.toc-top:hover { color: var(--ink); }

/* ---------- Mobile TOC ---------- */
.toc-mobile {
  margin-bottom: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.toc-mobile[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc-mobile .toc-count { margin-left: auto; font-size: .8rem; font-weight: 500; color: var(--muted); }
.toc-mobile nav { padding: 0 20px 18px; }

@media (min-width: 1080px) {
  .post-layout.has-toc .toc-mobile { display: none; }
}

/* ---------- Key points ---------- */
.key-points {
  margin-bottom: 44px;
  padding: 28px 30px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-2);
  border-radius: var(--radius);
  background: var(--soft);
}
.key-points-title {
  margin: 0 0 16px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.key-points-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: kp;
}
.key-points-list li {
  position: relative;
  padding: 12px 0 12px 40px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  counter-increment: kp;
}
.key-points-list li + li { border-top: 1px solid var(--line); }
.key-points-list li::before {
  content: counter(kp, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 13px;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.key-points-list strong { color: var(--ink); }
.key-points-list a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Article content ---------- */
.entry-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text);
  overflow-wrap: break-word;
}
.entry-content > * { margin-top: 0; margin-bottom: 1.4em; }
.entry-content > p:first-child { font-size: 1.16rem; line-height: 1.8; color: var(--ink-2); }

.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-top: 2.2em;
  margin-bottom: .65em;
  scroll-margin-top: 110px;
  text-wrap: balance;
}
.entry-content h2 {
  font-size: 1.75rem;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
}
.entry-content > h2:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.entry-content h3 { font-size: 1.32rem; }
.entry-content h4 { font-size: 1.12rem; }

.entry-content a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--ink); text-decoration-thickness: 2px; }
.entry-content strong { color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; padding-left: .2em; }
.entry-content li::marker { color: var(--muted); }

.entry-content img, .entry-content video, .entry-content iframe { max-width: 100%; height: auto; border-radius: 14px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: 10px; font-size: .85rem; color: var(--muted); text-align: center; }

.entry-content blockquote, .entry-content .wp-block-quote {
  margin: 2em 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--ink-2);
  font-size: 1.22rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content cite { display: block; margin-top: 10px; font-size: .85rem; font-style: normal; font-weight: 400; color: var(--muted); }

.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.entry-content code { padding: 2px 6px; border-radius: 6px; background: var(--soft); font-size: .9em; }
.entry-content pre { padding: 20px 22px; border-radius: 14px; background: var(--ink); color: #e5e7eb; overflow-x: auto; font-size: .9rem; line-height: 1.6; }
.entry-content pre code { padding: 0; background: none; }

/* Tables */
.entry-content table { width: 100%; border-collapse: collapse; font-size: .94rem; display: block; overflow-x: auto; }
.entry-content .wp-block-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.entry-content .wp-block-table table { display: table; }
.entry-content th, .entry-content td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content th { color: var(--ink); font-weight: 700; background: var(--soft); }

/* Alignment */
.entry-content .alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }
.entry-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.entry-content .alignfull img { border-radius: 0; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; display: block; }
.entry-content::after { content: ""; display: table; clear: both; }

/* Buttons + embeds */
.entry-content .wp-block-button__link { display: inline-block; padding: 13px 26px; border-radius: 9999px; background: var(--ink-2); color: var(--white); text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--ink); color: var(--white); }
.entry-content .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; }

@media (max-width: 1240px) { .post-layout.has-toc .entry-content .alignwide { margin-left: 0; margin-right: 0; } }
@media (max-width: 960px)  { .entry-content .alignwide { margin-left: 0; margin-right: 0; } }
@media (max-width: 600px)  { .entry-content .alignleft, .entry-content .alignright { float: none; margin: 0 0 1em; max-width: 100%; } }

.page-links { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-top: 2em; }

/* ---------- Tags + share ---------- */
.post-tags, .share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.post-tags { margin-top: 48px; }
.post-tags .label, .share-row .label, .author-box .label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
}
.post-tags .chip { padding: 7px 14px; font-size: .82rem; }

.share-row {
  justify-content: space-between;
  margin-top: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.share-buttons { display: flex; gap: 10px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  background: var(--white);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.share-btn:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); }
.share-btn .ico-check { display: none; }
.share-btn.is-copied { background: var(--ink-2); color: var(--white); }
.share-btn.is-copied .ico-link { display: none; }
.share-btn.is-copied .ico-check { display: inline-flex; }

/* ---------- Author box ---------- */
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 40px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.author-box img { border-radius: 50%; flex: 0 0 auto; }
.author-box h3 { margin: 4px 0 8px; font-size: 1.1rem; color: var(--ink); }
.author-box p { margin: 0; font-size: .94rem; line-height: 1.7; color: var(--text); }

/* ---------- Prev / next ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: box-shadow .3s, border-color .3s, transform .3s;
}
.post-nav-link:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-3px); }
.post-nav-link.next { text-align: right; align-items: flex-end; }
.post-nav-link .label { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-nav-link .title { font-weight: 700; line-height: 1.45; color: var(--ink); }

/* ---------- Related ---------- */
.related-section { background: var(--soft); padding: 72px 0 80px; border-top: 1px solid var(--line); }
.related-section .post-card { background: var(--white); }

/* Newsletter spacing after related */
.single-page .newsletter-cta { padding-top: 72px; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .post-hero { padding: 108px 0 64px; }
  .post-cover { margin-top: -32px; }
  .post-cover img { border-radius: 14px; aspect-ratio: 16 / 10; }
  .post-layout { padding-top: 40px; }
  .key-points { padding: 22px 20px 18px; }
  .key-points-list li { padding-left: 34px; }
  .entry-content { font-size: 1.03rem; }
  .entry-content h2 { font-size: 1.45rem; }
  .entry-content h3 { font-size: 1.2rem; }
  .author-box { flex-direction: column; }
  .share-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress span, .post-nav-link, .share-btn, .toc-item a { transition: none; }
  .post-nav-link:hover { transform: none; }
}