/* Sacapuntas editorial treatment for standard WordPress posts. */
body.single-post {
  --sacapuntas-ink: #111522;
  --sacapuntas-green: #1f6955;
  --sacapuntas-green-dark: #174d40;
  --sacapuntas-green-deep: #103d32;
  --sacapuntas-green-light: #dcebe4;
  --sacapuntas-pale: #eef5f1;
  --sacapuntas-line: #d9dfdc;
  --sacapuntas-paper: #f7f8f6;
  --sacapuntas-word-green: #3e5025;
  --sacapuntas-word-lime: #9bbb59;
  --sacapuntas-word-pale: #f3f6e9;
  --sacapuntas-word-line: #d8e4bc;
  --sacapuntas-reference: #1f5f92;
  background: #f4f8f5;
}

/* Give individual articles the recognisable Sacapuntas green treatment. */
body.single-post .site-main {
  background:
    linear-gradient(180deg, #edf5f0 0, #f7faf8 32rem, #f4f8f5 100%);
}

body.single-post .site-main > article,
body.single-post main > article,
body.single-post article.post {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
  color: var(--sacapuntas-ink);
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 61, 50, 0.07);
}

body.single-post .page-hero {
  border-bottom-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(135deg, var(--sacapuntas-green) 0%, var(--sacapuntas-green-deep) 100%);
}

body.single-post .page-hero h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

body.single-post .page-hero .entry-meta {
  color: var(--sacapuntas-green-light);
}

body.single-post .entry-header {
  margin: 72px 0 44px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--sacapuntas-line);
}

body.single-post .entry-title {
  max-width: 860px;
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--sacapuntas-ink);
}

body.single-post .entry-meta,
body.single-post .posted-on,
body.single-post .byline {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sacapuntas-green);
}

body.single-post .entry-content {
  max-width: 780px;
  margin: 0 auto 96px;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--sacapuntas-ink);
}

body.single-post .entry-content > p:first-child {
  font-size: inherit;
  line-height: inherit;
}

/*
 * Keep the opening paragraph consistent across translated posts. WordPress
 * imports sometimes wrap the complete English lead in a strong element while
 * the translated lead remains plain text.
 */
body.single-post .entry-content > p:first-of-type {
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

body.single-post .entry-content > p:first-of-type > strong:only-child,
body.single-post .entry-content > p:first-of-type > b:only-child {
  font-weight: inherit;
}

/*
 * Editorial opening block: article deck, key message and review metadata.
 * Both language versions follow the same three-paragraph structure.
 */
body.single-post .entry-content > p:nth-of-type(1) {
  margin-bottom: 0.8rem;
  color: var(--sacapuntas-word-green);
  font-size: clamp(1.32rem, 2.4vw, 1.55rem) !important;
  font-weight: 750 !important;
  line-height: 1.32 !important;
}

body.single-post .entry-content > p:nth-of-type(2) {
  margin-bottom: 0.9rem;
  color: var(--sacapuntas-ink);
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}

body.single-post .entry-content > p:nth-of-type(3) {
  margin-bottom: 2.35rem;
  padding-bottom: 1.45rem;
  border-bottom: 1px solid var(--sacapuntas-word-line);
  color: #62685f;
  font-size: 0.94rem !important;
  font-weight: 500;
  line-height: 1.55 !important;
}

body.single-post .entry-content > p:nth-of-type(-n + 3) :is(span, font, strong, b, em, i) {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

body.single-post .entry-content p,
body.single-post .entry-content ul,
body.single-post .entry-content ol {
  margin-top: 0;
  margin-bottom: 1.45em;
}

body.single-post .entry-content h2,
body.single-post .entry-content h3,
body.single-post .entry-content h4 {
  margin: 2.2em 0 0.7em;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--sacapuntas-green-dark);
}

body.single-post .entry-content h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

body.single-post .entry-content h3 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

body.single-post .entry-content a {
  color: var(--sacapuntas-green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body.single-post .entry-content blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  border: 0;
  border-left: 5px solid var(--sacapuntas-green);
  background: var(--sacapuntas-pale);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

body.single-post .entry-content .wp-block-group.has-border-color,
body.single-post .entry-content .wp-block-group[style*="border"],
body.single-post .entry-content > [class*="has-border"] {
  margin-block: 2rem;
  padding: 1.5rem 1.65rem;
  border: 1px solid var(--sacapuntas-line) !important;
  border-bottom: 4px solid var(--sacapuntas-green) !important;
  background: var(--sacapuntas-paper);
}

body.single-post .entry-content .wp-block-group.has-border-color > :first-child,
body.single-post .entry-content .wp-block-group[style*="border"] > :first-child {
  margin-top: 0;
}

body.single-post .entry-content figure.wp-block-table {
  max-width: 100%;
  margin: 2.25rem 0;
  overflow-x: auto;
}

body.single-post .entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.55;
}

body.single-post .entry-content th,
body.single-post .entry-content td {
  padding: 0.9rem 1rem;
  border: 1px solid var(--sacapuntas-line);
  vertical-align: top;
  text-align: left;
}

body.single-post .entry-content thead th {
  border-color: var(--sacapuntas-green-dark);
  background: var(--sacapuntas-green-dark);
  color: #fff;
}

body.single-post .entry-content tbody tr:nth-child(even) {
  background: var(--sacapuntas-paper);
}

body.single-post .entry-content .wp-block-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--sacapuntas-line);
  background: var(--sacapuntas-paper);
}

body.single-post .entry-content .wp-block-file__button {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  background: var(--sacapuntas-green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

body.single-post .entry-footer {
  width: min(100% - 40px, 780px);
  margin: 0 auto 80px;
  padding-top: 24px;
  border-top: 1px solid var(--sacapuntas-line);
}

body.single-post .article-downloads {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border: 1px solid var(--sacapuntas-line);
  border-left: 6px solid var(--sacapuntas-green);
  background: linear-gradient(135deg, var(--sacapuntas-pale), #fff);
}

body.single-post .article-downloads--top {
  margin: 0 0 clamp(2.25rem, 5vw, 3.5rem);
  padding: clamp(1.25rem, 3vw, 1.8rem);
}

body.single-post .article-downloads__eyebrow {
  margin: 0 0 0.55rem;
  color: var(--sacapuntas-green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.single-post .article-downloads h2 {
  margin: 0 0 1.25rem;
  color: var(--sacapuntas-green-dark);
  font-size: clamp(1.55rem, 3vw, 2.15rem) !important;
  font-weight: 800;
}

body.single-post .article-downloads--top h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem) !important;
}

body.single-post .article-downloads__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

body.single-post .article-downloads__button {
  display: inline-flex;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sacapuntas-green);
  border-radius: 6px;
  background: var(--sacapuntas-green);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

body.single-post .article-downloads__button:hover,
body.single-post .article-downloads__button:focus-visible {
  border-color: var(--sacapuntas-green-dark);
  background: var(--sacapuntas-green-dark);
  color: #fff;
}

body.single-post .article-downloads__button--outline {
  background: #fff;
  color: var(--sacapuntas-green-dark);
}

/*
 * Word-import normalisation and evidence-review styling.
 * Word and DOCX-to-HTML converters often attach Times New Roman and small
 * point sizes directly to spans. These rules deliberately override that
 * imported presentation while preserving bold, italic and link semantics.
 */
body.single-post .entry-content,
body.single-post .entry-content p,
body.single-post .entry-content li,
body.single-post .entry-content td,
body.single-post .entry-content th,
body.single-post .entry-content figcaption {
  font-family: Calibri, Aptos, "Segoe UI", Arial, sans-serif !important;
}

body.single-post .entry-content p,
body.single-post .entry-content li {
  color: #191b18;
  font-size: 1.0625rem !important;
  line-height: 1.67 !important;
}

body.single-post .entry-content p :is(span, strong, b, em, i),
body.single-post .entry-content li :is(span, strong, b, em, i),
body.single-post .entry-content td :is(span, strong, b, em, i),
body.single-post .entry-content th :is(span, strong, b, em, i) {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.single.single-post .entry-content h1,
body.single.single-post .entry-content h1.wp-block-heading,
body.single.single-post .entry-content h2,
body.single.single-post .entry-content h2.wp-block-heading {
  margin: 2.25em 0 0.78em;
  padding-left: 18px;
  border-left: 4px solid var(--sacapuntas-word-lime);
  color: var(--sacapuntas-word-green) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(1.72rem, 2.8vw, 2.08rem) !important;
  font-weight: 700 !important;
  line-height: 1.18;
}

body.single.single-post .entry-content h3,
body.single.single-post .entry-content h3.wp-block-heading,
body.single.single-post .entry-content h4,
body.single.single-post .entry-content h4.wp-block-heading {
  color: var(--sacapuntas-word-green) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 700 !important;
}

body.single-post .entry-content :is(h1, h2, h3, h4) :is(span, strong, b, em, i) {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.single-post .entry-content a:not(.article-downloads__button):not(.wp-block-button__link) {
  color: var(--sacapuntas-reference) !important;
}

body.single-post .entry-content blockquote,
body.single-post .entry-content .consumer-summary,
body.single-post .entry-content .wp-block-group.has-border-color,
body.single-post .entry-content .wp-block-group[style*="border"],
body.single-post .entry-content .wp-block-group.has-background,
body.single-post .entry-content > [class*="has-border"] {
  border: 1px solid var(--sacapuntas-word-line) !important;
  border-left: 5px solid var(--sacapuntas-word-lime) !important;
  background: var(--sacapuntas-word-pale) !important;
  box-shadow: none;
}

body.single-post .entry-content .consumer-summary .consumer-summary__title,
body.single-post .entry-content .wp-block-group.has-background > :first-child {
  color: var(--sacapuntas-word-green) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 700;
}

body.single-post .entry-content table {
  border-color: var(--sacapuntas-word-line) !important;
  font-size: 0.94rem !important;
}

body.single-post .entry-content th,
body.single-post .entry-content td {
  border-color: var(--sacapuntas-word-line) !important;
  font-size: inherit !important;
  line-height: 1.45 !important;
}

body.single-post .entry-content thead th {
  border-color: var(--sacapuntas-word-lime) !important;
  background: var(--sacapuntas-word-lime) !important;
  color: #fff !important;
  font-weight: 700;
}

body.single-post .entry-content tbody tr:nth-child(even) {
  background: var(--sacapuntas-word-pale) !important;
}

body.single-post .entry-content ul li::marker,
body.single-post .entry-content ol li::marker {
  color: #284c70;
}

@media (max-width: 720px) {
  body.single-post .site-main > article,
  body.single-post main > article,
  body.single-post article.post {
    width: min(100% - 28px, 960px);
    box-shadow: 0 10px 30px rgba(16, 61, 50, 0.06);
  }

  body.single-post .entry-header {
    margin-top: 42px;
  }

  body.single-post .entry-content {
    font-size: 1rem;
    line-height: 1.68;
  }

  body.single-post .entry-content p,
  body.single-post .entry-content li {
    font-size: 1rem !important;
  }

  body.single-post .entry-content > p:nth-of-type(1) {
    font-size: 1.3rem !important;
  }

  body.single-post .entry-content > p:nth-of-type(2) {
    font-size: 1.04rem !important;
  }

  body.single-post .entry-content > p:nth-of-type(3) {
    font-size: 0.9rem !important;
  }

  body.single.single-post .entry-content h1,
  body.single.single-post .entry-content h1.wp-block-heading,
  body.single.single-post .entry-content h2,
  body.single.single-post .entry-content h2.wp-block-heading {
    padding-left: 13px;
    font-size: 1.55rem !important;
  }

  body.single-post .entry-content .wp-block-file {
    align-items: flex-start;
    flex-direction: column;
  }

  body.single-post .entry-content th,
  body.single-post .entry-content td {
    min-width: 180px;
    padding: 0.75rem;
  }
}
