/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: #fff;
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { cursor: pointer; }

/* ── Constrained wrapper ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font); }

/* ── Prose body (Gutenberg output) ── */
.prose h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  margin: 28px 0 10px;
  line-height: 1.2;
}
.prose h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  margin: 18px 0 8px;
}
.prose h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin: 14px 0 6px;
}
.prose p {
  font-size: 15px;
  line-height: 1.72;
  color: var(--black);
  margin-bottom: 14px;
}
.prose p a,
.prose li a {
  color: var(--dark);
  text-decoration: none;
  border-bottom: 1px solid var(--g2);
}
.prose p a:hover,
.prose li a:hover {
  border-bottom-color: var(--dark);
}
.prose ul, .prose ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.prose li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--black);
  margin-bottom: 5px;
}
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.prose blockquote {
  border-left: 3px solid var(--g2);
  padding: 16px 20px;
  margin: 20px 0;
  background: var(--g1);
  border-radius: 0;
}
.prose blockquote p {
  font-size: 14px;
  font-style: italic;
  color: var(--dark);
  margin: 0;
}
.prose blockquote p em,
.prose blockquote cite {
  font-size: 12px;
  color: var(--g4);
  display: block;
  margin-top: 6px;
  font-style: italic;
}

/* ── H5 CTA pill ── */
.prose h5 {
  margin: 20px 0;
}
.prose h5 a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  border-bottom: none;
}
.prose h5 a:hover {
  filter: brightness(1.1);
  border-bottom: none;
}
.prose img {
  border-radius: 6px;
  margin: 20px 0;
}
.prose iframe {
  max-width: 100%;
  border-radius: 6px;
}

/* ── Lede paragraph ── */
.lede {
  font-size: 17px;
  line-height: 1.72;
  color: var(--g4);
  font-weight: 300;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--g1);
}

/* ── Category pills ── */
.cat-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 40px;
  border: 1px solid var(--g2);
  color: var(--g4);
  background: var(--g1);
  text-decoration: none;
}
.cat-pill:hover {
  border-color: var(--g3);
  color: var(--dark);
}
.cp-report   { background: rgba(255, 236, 0, 0.12); color: var(--yellow); border-color: rgba(255, 236, 0, 0.22); }
.cp-finance  { background: rgba(21, 101, 192, 0.1); color: #6fa3d8; border-color: rgba(21, 101, 192, 0.2); }
.cp-milestone{ background: rgba(255, 77, 17, 0.1); color: var(--orange); border-color: rgba(255, 77, 17, 0.22); }
.cp-event    { background: rgba(255, 77, 17, 0.12); color: var(--orange); border-color: rgba(255, 77, 17, 0.25); }
.cp-sme      { background: rgba(255, 236, 0, 0.1); color: var(--yellow); border-color: rgba(255, 236, 0, 0.2); }
.cp-water    { background: rgba(0, 151, 167, 0.12); color: var(--t-teal); border-color: rgba(0, 151, 167, 0.25); }
.cp-minutes  { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.5); border-color: rgba(255, 255, 255, 0.12); }
.cp-consult  { background: rgba(0, 151, 167, 0.12); color: var(--t-teal); border-color: rgba(0, 151, 167, 0.22); }
.cp-energy   { background: rgba(255, 236, 0, 0.1); color: var(--yellow); border-color: rgba(255, 236, 0, 0.2); }

/* On light backgrounds, use dark-bg variants */
.cat-pill--light {
  color: var(--dark);
  background: var(--g2);
  border-color: var(--g3);
}

/* ── Breadcrumb (hidden) ── */
.breadcrumb {
  display: none;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.breadcrumb a {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
}
.breadcrumb a:hover { color: rgba(255, 255, 255, 0.65); }
.breadcrumb__sep {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.18);
}
.breadcrumb__current {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Post header (shared across single templates) ── */
.post-header {
  background: var(--dark);
  padding: 24px 0 0;
}
.post-header__cats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.post-header__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.12;
  color: #fff;
  max-width: 700px;
  margin-bottom: 14px;
}
.post-header__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 24px;
}
.post-header__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.post-header__author {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.post-header__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.post-header__date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
}

/* ── Content + sidebar layout ── */
.content-sidebar {
  display: flex;
  gap: 0;
}
.main-col {
  flex: 1;
  min-width: 0;
  padding: 36px 48px 56px 0;
  border-right: 1px solid var(--g2);
}
.sidebar-col {
  width: 280px;
  flex-shrink: 0;
  padding: 36px 0 56px 36px;
}

@media (max-width: 1023px) {
  .content-sidebar {
    flex-direction: column;
  }
  .main-col {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--g2);
    padding-bottom: 36px;
  }
  .sidebar-col {
    width: 100%;
    padding-left: 0;
    padding-top: 28px;
  }
}

/* ── Sidebar shared components ── */
.sb-section { margin-bottom: 24px; }
.sb-section + .sb-section {
  padding-top: 20px;
  border-top: 1px solid var(--g1);
}
.sb-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g3);
  margin-bottom: 10px;
}

/* ── Share buttons ── */
.share-btns { display: flex; gap: 6px; }
.share-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--g2);
  color: var(--g4);
}
.share-btn:hover {
  border-color: var(--g3);
  color: var(--dark);
}
.share-btn i { font-size: 13px; }

/* ── Related posts list ── */
.related-posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-decoration: none;
}
.rp-item:hover .rp-title { color: var(--orange); }
.rp-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--g2);
  flex-shrink: 0;
  margin-top: 5px;
}
.rp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 1px;
}
.rp-date {
  font-size: 11px;
  color: var(--g3);
}

/* ── Post tags ── */
.post-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--g1);
}
.post-tags__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g3);
}
.post-tag {
  font-size: 12px;
  color: var(--dark);
  background: var(--g1);
  border: 1px solid var(--g2);
  padding: 3px 12px;
  border-radius: 40px;
  text-decoration: none;
}
.post-tag:hover { background: var(--g2); }

/* ── Post navigation ── */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--g1);
}
.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 48%;
}
.post-nav__item--right { text-align: right; }
.post-nav__dir {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-nav__item--right .post-nav__dir { justify-content: flex-end; }
.post-nav__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  line-height: 1.4;
}
.post-nav__link:hover { color: var(--orange); }

@media (max-width: 767px) {
  .post-nav { flex-direction: column; }
  .post-nav__item { max-width: 100%; }
  .post-nav__item--right { text-align: left; }
  .post-nav__item--right .post-nav__dir { justify-content: flex-start; }
}

/* ── Buttons ── */
.btn-pri {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 22px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-family: var(--font);
}
.btn-sec {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  text-decoration: none;
  font-family: var(--font);
}
.btn-yellow {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-size: 13px;
  font-weight: 700;
  padding: 11px 22px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-family: var(--font);
}

/* ── Screen reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
