.post-page {
  --post-sticky-offset: 90px;
  color: var(--ink);
  background: var(--white);
}

.post-page p {
  max-width: 68ch;
}

.post-breadcrumb {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.post-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  width: min(calc(100% - 96px), 1360px);
  margin: 0 auto;
  padding-block: 17px;
  color: rgb(13 13 13 / 0.68);
  font-size: 14px;
  list-style: none;
}

.post-breadcrumb li:not(:last-child)::after {
  margin-left: 9px;
  color: var(--green);
  content: "/";
}

.post-breadcrumb a:hover,
.post-breadcrumb a:focus-visible {
  color: var(--green);
}

.post-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
  min-height: 610px;
  background: var(--page-paper);
}

.post-masthead-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 72px clamp(48px, 7vw, 112px) 76px max(48px, calc((100vw - 1360px) / 2));
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-bottom: 24px;
  color: #0b6f35;
  font-size: 14px;
  font-weight: 700;
}

.post-meta span {
  color: rgb(13 13 13 / 0.68);
  font-weight: 500;
}

.post-masthead h1 {
  max-width: 16ch;
  margin-bottom: 22px;
  font-size: clamp(42px, 4.15vw, 60px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.post-deck {
  margin-bottom: 0;
  color: rgb(13 13 13 / 0.72);
  font-family: var(--display);
  font-size: clamp(18px, 1.45vw, 21px);
  font-weight: 300;
  line-height: 1.55;
}

.post-masthead-media {
  min-height: 610px;
  overflow: hidden;
  background: var(--mint);
}

.post-masthead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  padding-block: clamp(72px, 8vw, 122px);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 0.9fr) minmax(140px, 0.22fr);
  grid-template-areas: "contents body related";
  gap: clamp(40px, 6vw, 88px);
  width: min(calc(100% - 96px), 1180px);
  margin-inline: auto;
  align-items: start;
}

.post-aside {
  position: sticky;
  top: var(--post-sticky-offset);
  grid-area: contents;
}

.post-aside h2 {
  margin-bottom: 16px;
  color: rgb(13 13 13 / 0.72);
  font-size: 14px;
  font-weight: 700;
}

.post-aside nav,
.post-aside ul {
  display: grid;
  gap: 12px;
}

.post-aside ul,
.post-rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-aside a {
  color: rgb(13 13 13 / 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.post-aside a:hover,
.post-aside a:focus-visible {
  color: var(--green);
}

.post-body {
  min-width: 0;
  grid-area: body;
}

.post-body > p:first-child {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(20px, 1.75vw, 25px);
  font-weight: 400;
  line-height: 1.55;
}

.post-body p {
  margin-bottom: 26px;
  color: rgb(13 13 13 / 0.78);
  font-size: 18px;
  line-height: 1.82;
}

.post-body h2 {
  margin: 58px 0 18px;
  font-size: clamp(30px, 3.2vw, 43px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  scroll-margin-top: var(--post-sticky-offset);
}

.post-body h2:first-of-type {
  margin-top: 48px;
}

.post-body h3 {
  margin: 38px 0 14px;
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1.25;
}

.post-body ul,
.post-body ol {
  margin: 0 0 28px;
  padding-left: 1.4em;
  color: rgb(13 13 13 / 0.78);
  font-size: 18px;
  line-height: 1.75;
}

.post-body li + li {
  margin-top: 8px;
}

.post-body blockquote {
  margin: 42px 0;
  padding: 8px 0 8px 28px;
  border-left: 4px solid var(--gold);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(21px, 2vw, 27px);
}

.post-body blockquote p {
  color: inherit;
  font-size: inherit;
  line-height: 1.55;
}

.post-body blockquote cite {
  display: block;
  margin-top: 12px;
  color: rgb(13 13 13 / 0.68);
  font-family: var(--body-font);
  font-size: 14px;
}

.post-body .wp-block-image,
.post-body .wp-block-gallery,
.post-body .wp-caption,
.post-body .gallery,
.post-body > p:has(> img) {
  margin-block: 46px;
}

.post-body .wp-block-image img,
.post-body .wp-block-gallery img,
.post-body .wp-caption img,
.post-body > p > img {
  width: 100%;
  height: auto;
}

.post-body .wp-caption {
  max-width: 100%;
}

.post-body .gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.post-body .gallery-item,
.post-body .gallery-icon {
  margin: 0;
}

.post-body .gallery img {
  width: 100%;
  height: auto;
}

.post-body > p a,
.post-body > ul a,
.post-body > ol a {
  border-bottom: 1px solid var(--green);
  font-weight: 600;
}

.post-body > p a:hover,
.post-body > ul a:hover,
.post-body > ol a:hover {
  color: var(--green);
}

.post-body figcaption {
  margin-top: 10px;
  color: rgb(13 13 13 / 0.66);
  font-size: 14px;
  line-height: 1.5;
}

.post-body .wp-block-buttons {
  margin-block: 34px;
}

.post-body .wp-block-button__link {
  border: 2px solid var(--green);
  border-radius: 0;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
}

.post-body .wp-block-button__link:hover,
.post-body .wp-block-button__link:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
}

.post-body a:focus-visible,
.post-aside a:focus-visible,
.post-rail a:focus-visible,
.post-footer-nav a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.post-figure {
  margin: 50px 0;
}

.post-figure img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.post-figure figcaption {
  margin-top: 12px;
  color: rgb(13 13 13 / 0.66);
  font-size: 14px;
  line-height: 1.5;
}

.post-note {
  margin: 42px 0;
  padding: 30px 32px;
  border-left: 5px solid var(--green);
  background: var(--page-soft-green);
}

.post-note h2,
.post-note h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.post-note p {
  margin: 0;
  color: rgb(13 13 13 / 0.8);
  font-size: 16px;
  line-height: 1.65;
}

.post-rail {
  position: sticky;
  top: var(--post-sticky-offset);
  display: grid;
  gap: 14px;
  justify-items: start;
  grid-area: related;
}

.post-rail > span,
.post-rail > h2 {
  margin: 0;
  color: rgb(13 13 13 / 0.66);
  font-size: var(--text-supporting);
  font-weight: 700;
}

.post-rail ul {
  display: grid;
  gap: 14px;
}

.post-rail a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--green);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.post-rail a:hover,
.post-rail a:focus-visible {
  color: var(--green);
  border-color: var(--green);
}

.post-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-footer-nav a {
  display: grid;
  gap: 5px;
  max-width: 45%;
  color: var(--ink);
  font-weight: 700;
}

.post-footer-nav a:last-child {
  margin-left: auto;
  text-align: right;
}

.post-footer-nav span {
  color: rgb(13 13 13 / 0.62);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-layout.has-no-contents {
  grid-template-columns: minmax(0, 0.9fr) minmax(140px, 0.22fr);
  grid-template-areas: "body related";
  max-width: 920px;
}

.post-layout.has-no-related-links {
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 0.9fr);
  grid-template-areas: "contents body";
  max-width: 960px;
}

.post-layout.has-no-contents.has-no-related-links {
  grid-template-columns: minmax(0, 760px);
  grid-template-areas: "body";
  justify-content: center;
}

.post-footer-nav a:hover,
.post-footer-nav a:focus-visible {
  color: var(--green);
}

.related-reading {
  padding-block: clamp(72px, 7vw, 108px);
  background: var(--page-paper);
}

.related-reading-inner {
  width: min(calc(100% - 96px), 1180px);
  margin-inline: auto;
}

.related-reading h2 {
  margin-bottom: 34px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.035em;
}

.related-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

.related-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1fr);
  min-height: 280px;
  background: var(--white);
}

.related-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.related-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.related-card time {
  margin-bottom: 10px;
  color: #0b6f35;
  font-size: var(--text-supporting);
  font-weight: 700;
}

.related-card h3 {
  margin-bottom: 10px;
  font-size: clamp(22px, 2vw, 29px);
  line-height: 1.2;
}

.related-card p {
  margin-bottom: 0;
  color: rgb(13 13 13 / 0.72);
  line-height: 1.6;
}

.related-card-link::after {
  position: absolute;
  inset: 0;
  content: "";
}

.related-card:has(.related-card-link:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.related-card:hover .related-card-link,
.related-card:focus-within .related-card-link {
  color: var(--green);
}

/* WordPress block wrappers retain the approved article composition. */
.post-masthead.wp-block-group,
.post-content.wp-block-group,
.related-reading.wp-block-group {
  margin: 0;
}

.post-masthead .wp-block-post-title {
  max-width: 16ch;
  margin: 0 0 22px;
  font-size: clamp(42px, 4.15vw, 60px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.post-masthead .wp-block-post-excerpt,
.post-masthead .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.post-masthead .wp-block-post-excerpt__excerpt {
  color: rgb(13 13 13 / 0.72);
  font-family: var(--display);
  font-size: clamp(18px, 1.45vw, 21px);
  font-weight: 300;
  line-height: 1.55;
}

.post-masthead-media.wp-block-post-featured-image {
  margin: 0;
}

.post-content .wp-block-post-content {
  display: contents;
}

.related-reading .wp-block-shortcode {
  margin: 0;
}

@media (max-width: 1050px) {
  .post-masthead {
    grid-template-columns: 1fr 1fr;
  }

  .post-layout {
    grid-template-columns: minmax(165px, 0.32fr) minmax(0, 1fr);
    grid-template-areas: "contents body" "contents related";
  }

  .post-rail {
    position: static;
    grid-template-columns: auto auto auto;
    align-items: center;
    margin-top: -18px;
  }

  .post-layout.has-no-contents {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "body" "related";
  }

  .post-layout.has-no-related-links {
    grid-template-columns: minmax(165px, 0.32fr) minmax(0, 1fr);
    grid-template-areas: "contents body";
  }

  .post-layout.has-no-contents.has-no-related-links {
    grid-template-columns: minmax(0, 760px);
    grid-template-areas: "body";
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .post-page {
    --post-sticky-offset: 106px;
  }
}

@media (max-width: 760px) {
  .post-page {
    --post-sticky-offset: 96px;
  }

  .post-breadcrumb ol,
  .post-layout,
  .related-reading-inner {
    width: calc(100% - 32px);
  }

  .post-masthead {
    display: flex;
    flex-direction: column-reverse;
    min-height: auto;
  }

  .post-masthead-copy {
    padding: 48px 16px 56px;
  }

  .post-masthead h1 {
    max-width: 14ch;
    font-size: clamp(40px, 12vw, 54px);
  }

  .post-masthead-media {
    flex: 0 0 330px;
    height: 330px;
    min-height: 0;
    max-height: none;
  }

  .post-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "contents" "body" "related";
    gap: 38px;
  }

  .post-layout.has-no-contents,
  .post-layout.has-no-related-links,
  .post-layout.has-no-contents.has-no-related-links {
    grid-template-columns: 1fr;
  }

  .post-layout.has-no-contents {
    grid-template-areas: "body" "related";
  }

  .post-layout.has-no-related-links {
    grid-template-areas: "contents" "body";
  }

  .post-layout.has-no-contents.has-no-related-links {
    grid-template-areas: "body";
  }

  .post-aside,
  .post-rail {
    position: static;
  }

  .post-aside {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }

  .post-aside nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
  }

  .post-rail {
    grid-template-columns: auto auto auto;
    margin-top: 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .post-body p {
    font-size: 17px;
  }

  .post-note {
    padding: 24px;
  }

  .post-body .gallery {
    grid-template-columns: 1fr;
  }

  .post-footer-nav a {
    max-width: 100%;
  }

  .related-card {
    grid-template-columns: 1fr;
  }

  .related-card img {
    height: 240px;
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .post-meta {
    display: grid;
    gap: 3px;
  }

  .post-aside nav,
  .post-rail {
    grid-template-columns: 1fr;
  }
}
