/*
Theme Name: Sacapuntas Editorial
Theme URI: https://sacapuntas-publishing.com
Author: Sacapuntas Publishing
Description: A bilingual editorial WordPress theme for evidence-based health publishing.
Version: 0.5.2
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: sacapuntas-editorial
*/

:root {
  --sp-ink: #151724;
  --sp-muted: #626672;
  --sp-paper: #fff;
  --sp-soft: #f4f5f2;
  --sp-line: #d9ddd8;
  --sp-green: #21634f;
  --sp-green-dark: #164739;
  --sp-red: #9b3f45;
  --sp-blue: #315d78;
  --sp-content: 800px;
  --sp-wide: 1220px;
  --sp-radius: 8px;
  --sp-shadow: 0 14px 36px rgba(21, 23, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sp-paper);
  color: var(--sp-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

a {
  color: var(--sp-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--sp-red);
}

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  background: var(--sp-paper);
  color: var(--sp-ink);
  height: auto;
  left: 16px;
  padding: 12px 16px;
  top: 16px;
  width: auto;
  z-index: 100000;
}

.site-shell {
  margin-inline: auto;
  max-width: var(--sp-wide);
  padding-inline: 28px;
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--sp-line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(310px, auto) 1fr auto;
  min-height: 86px;
}

.site-brand {
  align-items: center;
  color: var(--sp-ink);
  display: inline-flex;
  gap: 15px;
  text-decoration: none;
}

.site-brand:hover,
.site-brand:focus-visible {
  color: var(--sp-ink);
}

.site-brand__mark {
  background: var(--sp-paper);
  flex: 0 0 64px;
  height: 64px;
  overflow: hidden;
  position: relative;
  width: 64px;
}

.site-brand__mark img {
  max-width: none;
  position: absolute;
  transform: translate(-36px, -22px);
  width: 136px;
}

.custom-logo-link {
  display: block;
  flex: 0 0 auto;
}

.custom-logo {
  max-height: 58px;
  width: auto;
}

.site-brand__mark .custom-logo {
  max-height: none;
}

.site-brand__copy {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-brand__name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.1;
  max-width: none;
  text-transform: none;
  white-space: nowrap;
}

.site-brand__tagline {
  color: var(--sp-green);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.095em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-nav {
  justify-self: end;
}

.primary-nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav > div > ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 25px;
  justify-content: flex-end;
}

.primary-nav li {
  position: relative;
}

.primary-nav a {
  color: var(--sp-ink);
  display: block;
  font-size: 0.89rem;
  font-weight: 550;
  padding-block: 10px;
  text-decoration: none;
}

.primary-nav a::after {
  background: var(--sp-green);
  bottom: 5px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
  width: 100%;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after {
  transform: scaleX(1);
}

.primary-nav .sub-menu {
  background: var(--sp-paper);
  border: 1px solid var(--sp-line);
  box-shadow: var(--sp-shadow);
  display: none;
  left: -18px;
  min-width: 220px;
  padding: 10px 18px;
  position: absolute;
  top: 100%;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  display: block;
}

.language-switcher {
  align-items: center;
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
  text-transform: uppercase;
}

.language-switcher a,
.language-switcher span {
  border: 1px solid transparent;
  color: var(--sp-muted);
  display: inline-flex;
  min-width: 34px;
  padding: 5px 6px;
  place-content: center;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a:focus-visible {
  border-color: var(--sp-green);
  color: var(--sp-green);
}

.language-switcher .is-current {
  background: var(--sp-green);
  border-color: var(--sp-green);
  color: var(--sp-paper);
}

.menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  color: var(--sp-ink);
  cursor: pointer;
  display: none;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.menu-toggle svg {
  height: 22px;
  width: 22px;
}

.site-main {
  min-height: 58vh;
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(33, 99, 79, 0.055), transparent 52%),
    var(--sp-soft);
  border-bottom: 1px solid var(--sp-line);
  padding-block: clamp(42px, 5vw, 68px);
}

.page-hero--home {
  background:
    linear-gradient(90deg, rgba(244, 245, 242, 0.98) 0%, rgba(244, 245, 242, 0.92) 37%, rgba(244, 245, 242, 0.34) 61%, rgba(244, 245, 242, 0.04) 100%),
    url("assets/images/hero-pencil-sharpener.png") 58% center / cover no-repeat;
  min-height: clamp(450px, 62vh, 610px);
  padding-block: clamp(80px, 11vw, 142px);
}

.page-hero__inner {
  margin-inline: auto;
  max-width: var(--sp-wide);
  padding-inline: 28px;
}

.page-hero__eyebrow {
  color: var(--sp-green);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--sp-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  font-size: clamp(3.9rem, 7vw, 5.4rem);
  margin: 0;
  max-width: 980px;
}

.page-hero:not(.page-hero--home) h1 {
  font-size: clamp(3rem, 5.2vw, 4.15rem);
}

.page-hero--home h1 {
  max-width: 600px;
}

.content-wrap {
  margin-inline: auto;
  max-width: var(--sp-content);
  padding: clamp(44px, 5vw, 68px) 28px;
}

.content-wrap--wide {
	max-width: var(--sp-wide);
}

.page--author-profile .page-hero {
	padding-block: clamp(36px, 4vw, 64px);
}

.page--author-profile .content-wrap {
	padding-block: clamp(24px, 3vw, 44px) clamp(44px, 6vw, 76px);
}

.page--author-profile .entry-content > .author-profile {
	margin-block: 0;
}

.entry-content > * {
  margin-bottom: 1.45em;
  margin-top: 0;
}

.entry-content > :last-child {
  margin-bottom: 0;
}

.entry-content > p:first-child {
  color: var(--sp-ink);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.page-hero--home + .content-wrap .entry-content > p:first-child {
  color: var(--sp-ink);
  font-family: inherit;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.entry-content h2 {
  font-size: clamp(2.2rem, 4vw, 2.85rem);
  margin-top: 1.55em;
}

.entry-content h3 {
  font-size: clamp(1.65rem, 3vw, 2rem);
  margin-top: 1.65em;
}

/* Long-form articles need a quieter hierarchy than editorial landing pages. */
.single-post .page-hero h1 {
  font-size: clamp(2.65rem, 4.5vw, 3.75rem);
  line-height: 1.08;
  max-width: 900px;
}

.single-post .content-wrap {
  max-width: 900px;
}

.single-post .entry-content {
  line-height: 1.72;
}

.single-post .entry-content h2 {
  font-size: clamp(1.85rem, 3vw, 2.25rem);
  line-height: 1.16;
  margin-top: 1.75em;
}

.single-post .entry-content h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  line-height: 1.25;
  margin-top: 1.8em;
}

.single-post .wp-block-table {
  margin-block: 2em;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.single-post .wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.single-post .wp-block-table th,
.single-post .wp-block-table td {
  border: 1px solid var(--sp-line);
  line-height: 1.5;
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.single-post .wp-block-table th {
  background: var(--sp-soft);
  font-weight: 700;
}

.single-post .wp-block-file {
  align-items: center;
  background: var(--sp-soft);
  border-left: 4px solid var(--sp-green);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: space-between;
  margin-block: 2.25em;
  padding: 18px 20px;
}

.single-post .wp-block-file > a:not(.wp-block-file__button) {
  color: var(--sp-ink);
  font-weight: 700;
}

.single-post .wp-block-file .wp-block-file__button {
  background: var(--sp-green);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 16px;
}

.single-post .consumer-summary {
  background: var(--sp-soft);
  border: 1px solid var(--sp-line);
  border-bottom: 4px solid var(--sp-green);
  margin-block: 2.25em;
  padding: clamp(20px, 3vw, 30px);
}

.single-post .consumer-summary .consumer-summary__title {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.3;
  margin: 0 0 0.9em;
  text-transform: uppercase;
}

.single-post .consumer-summary ul {
  margin: 0;
  padding-left: 1.35em;
}

.single-post .consumer-summary li {
  margin-bottom: 0.55em;
  padding-left: 0.25em;
}

.single-post .consumer-summary li:last-child {
  margin-bottom: 0;
}

.entry-content blockquote {
  border-left: 4px solid var(--sp-green);
  color: var(--sp-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  margin-inline: 0;
  padding: 12px 0 12px 30px;
}

.entry-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.page-hero--home + .content-wrap .entry-content > .wp-block-buttons {
  align-items: center;
  display: inline-flex !important;
  flex-direction: row !important;
  margin: 30px 8px 0 0;
  vertical-align: top;
}

.page-hero--home + .content-wrap .entry-content > .wp-block-buttons .wp-block-button {
  margin: 0;
}

.page-hero--home + .content-wrap .entry-content > pre {
  background: transparent;
  border: 0;
  color: var(--sp-ink);
  font: inherit;
  line-height: inherit;
  margin: 0 0 1.45em;
  overflow: visible;
  padding: 0;
  white-space: normal;
}

.wp-block-button__link,
.button,
button[type="submit"],
input[type="submit"] {
  background: var(--sp-green);
  border: 1px solid var(--sp-green);
  border-radius: var(--sp-radius);
  color: var(--sp-paper);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 700;
  justify-content: center;
  padding: 12px 19px;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.button:hover,
.button:focus-visible,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--sp-green-dark);
  border-color: var(--sp-green-dark);
  color: var(--sp-paper);
  transform: translateY(-1px);
}

.is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--sp-green);
}

.alignwide {
  margin-left: calc((min(var(--sp-wide), 100vw - 72px) - min(var(--sp-content), 100vw - 72px)) / -2);
  max-width: var(--sp-wide);
  width: min(var(--sp-wide), calc(100vw - 72px));
}

.alignfull {
  margin-left: calc((100vw - min(var(--sp-content), 100vw - 56px)) / -2);
  max-width: 100vw;
  width: 100vw;
}

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

.blog-layout,
.books-layout {
  padding-top: clamp(48px, 6vw, 76px);
}

.blog-intro,
.books-intro {
  color: var(--sp-ink);
  font-family: inherit;
  font-size: 1.08rem;
  line-height: 1.62;
  margin: 0;
  max-width: 900px;
}

.page--work .entry-content h2 {
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  margin-bottom: 0.85em;
  margin-top: 1.6em;
}

.page--work .entry-content h3 {
  font-size: clamp(1.16rem, 1.7vw, 1.3rem);
  margin-bottom: 0.65em;
  margin-top: 1.9em;
}

.blog-index,
.books-index {
  margin-top: clamp(58px, 8vw, 96px);
}

.section-title {
  border-bottom: 1px solid var(--sp-line);
  font-size: clamp(2.35rem, 4vw, 3.2rem);
  margin: 0 0 34px;
  padding-bottom: 18px;
}

.post-grid--blog {
  gap: 30px 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-about,
.books-about,
.publications-appendix {
  border-bottom: 1px solid var(--sp-line);
  border-top: 1px solid var(--sp-line);
  margin-top: clamp(62px, 8vw, 96px);
}

.blog-about summary,
.books-about summary,
.publications-appendix summary {
  color: var(--sp-ink);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  list-style-position: outside;
  padding: 24px 4px;
}

.blog-about summary::marker,
.books-about summary::marker,
.publications-appendix summary::marker {
  color: var(--sp-green);
}

.blog-about__content,
.books-about__content,
.publications-appendix__content {
  max-width: var(--sp-content);
  padding: 6px 4px 34px;
}

.blog-about__content > p:first-child,
.books-about__content > p:first-child,
.publications-appendix__content > p:first-child {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.publications-appendix {
  margin-top: clamp(34px, 5vw, 58px);
}

.publications-appendix__content h2 {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.publications-appendix__content h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
}

.publications-appendix__content ul,
.publications-appendix__content ol {
  padding-left: 1.35em;
}

.publications-appendix__content li + li {
  margin-top: 0.75em;
}

.book-grid {
  display: grid;
  gap: 30px 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-card {
  background: var(--sp-paper);
  border: 1px solid var(--sp-line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.book-card:hover {
  box-shadow: var(--sp-shadow);
  transform: translateY(-2px);
}

.book-card__media {
  align-items: center;
  background: var(--sp-soft);
  display: flex;
  justify-content: center;
  padding: 28px;
}

.book-card__cover,
.book-card__cover-placeholder {
  aspect-ratio: 2 / 3;
  box-shadow: 0 12px 28px rgba(21, 23, 36, 0.14);
  display: block;
  max-height: 370px;
  object-fit: cover;
  width: auto;
}

.book-card__cover-placeholder {
  align-items: flex-end;
  background:
    linear-gradient(155deg, rgba(33, 99, 79, 0.16), rgba(244, 245, 242, 0.92)),
    var(--sp-soft);
  color: var(--sp-green);
  display: flex;
  font-size: 0.72rem;
  font-weight: 750;
  justify-content: center;
  letter-spacing: 0.08em;
  padding: 24px 16px;
  text-align: center;
  text-transform: uppercase;
  width: min(100%, 246px);
}

.book-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}

.book-card__meta {
  color: var(--sp-green);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  margin: 0 0 11px;
  text-transform: uppercase;
}

.book-card h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  margin: 0 0 15px;
}

.book-card__description {
  color: var(--sp-muted);
  font-size: 0.94rem;
  margin: 0 0 24px;
}

.book-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
}

.book-card__retailer {
  border: 1px solid var(--sp-green);
  border-radius: var(--sp-radius);
  color: var(--sp-green);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 9px 12px;
  text-decoration: none;
}

.book-card__retailer:hover,
.book-card__retailer:focus-visible {
  background: var(--sp-green);
  color: var(--sp-paper);
}

.book-card--featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.6fr);
}

.book-card--featured .book-card__media {
  padding: clamp(32px, 5vw, 58px);
}

.book-card--featured .book-card__cover,
.book-card--featured .book-card__cover-placeholder {
  max-height: 460px;
}

.book-card--featured .book-card__body {
  justify-content: center;
  padding: clamp(34px, 5vw, 62px);
}

.book-card--featured h2 {
  font-size: clamp(2.35rem, 4vw, 3.35rem);
}

.author-profile {
  background: linear-gradient(145deg, #2a6a58 0%, #205747 52%, #183f35 100%);
  color: rgba(255, 255, 255, 0.9);
  margin-block: clamp(70px, 10vw, 130px);
  max-width: none;
  border-radius: var(--sp-radius);
  box-shadow: 0 18px 42px rgba(24, 63, 53, 0.16);
  padding: clamp(30px, 5vw, 60px);
}

.author-profile .wp-block-columns {
  align-items: stretch;
  display: grid;
  gap: clamp(34px, 6vw, 78px);
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  margin-bottom: 0;
}

.author-profile .wp-block-column:first-child {
  align-self: stretch;
}

.author-profile h2 {
  color: var(--sp-paper);
  font-size: clamp(2.8rem, 5vw, 3.75rem);
  margin: 0 0 22px;
}

.author-profile__eyebrow {
  color: #c8e1d7;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin: 0 0 15px;
  text-transform: uppercase;
}

.author-profile__portrait {
  aspect-ratio: 4 / 5.25;
  margin: 0;
  overflow: hidden;
  position: sticky;
  top: 116px;
}

.author-profile__portrait img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 47%;
  transform: scale(1.025);
  width: 100%;
}

.entry-content > .wp-block-image:not(.author-profile__portrait),
.entry-content > figure:not(.author-profile__portrait) {
  margin-block: clamp(34px, 5vw, 56px);
}

.entry-content figcaption {
  color: var(--sp-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 10px;
  text-align: left;
}

.page--legal .page-hero {
  padding-block: clamp(42px, 6vw, 72px);
}

.page--legal .page-hero h1 {
  font-size: clamp(2.45rem, 4vw, 3.35rem);
  overflow-wrap: anywhere;
}

.page--legal .content-wrap {
  max-width: 860px;
  padding-block: clamp(38px, 5vw, 62px);
}

.page--legal .entry-content h2 {
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  margin-top: 2.1em;
}

.page--legal .entry-content > h2:first-child {
  margin-top: 0;
}

.page--legal .entry-content h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.4rem);
  line-height: 1.25;
  margin-top: 1.8em;
}

.legal-notice {
  border-top: 4px solid var(--sp-green);
  padding-top: clamp(24px, 4vw, 38px);
}

.legal-notice__lead {
  color: var(--sp-ink);
  font-family: inherit;
  font-size: 1.24rem;
  line-height: 1.55;
}

.legal-notice > :last-child {
  background: var(--sp-soft);
  border-left: 3px solid var(--sp-green);
  font-weight: 650;
  margin-top: 2.2em;
  padding: 18px 22px;
}

.post-card {
  background: var(--sp-paper);
  border: 1px solid var(--sp-line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover {
  box-shadow: var(--sp-shadow);
  transform: translateY(-2px);
}

.post-card__media {
  background: var(--sp-soft);
  display: block;
  overflow: hidden;
}

.post-card__image {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  object-fit: cover;
  transition: transform 220ms ease;
  width: 100%;
}

.post-card:hover .post-card__image {
  transform: scale(1.015);
}

.post-card__placeholder {
  align-items: flex-end;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(33, 99, 79, 0.18), rgba(244, 245, 242, 0.82)),
    var(--sp-soft);
  color: var(--sp-green);
  display: flex;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  padding: 20px;
  text-transform: uppercase;
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.post-card__meta,
.entry-meta {
  color: var(--sp-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.post-card h2 {
  font-size: clamp(1.62rem, 2.5vw, 2rem);
  margin: 0 0 14px;
}

.post-card h2 a {
  color: var(--sp-ink);
  text-decoration: none;
}

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

.post-card__excerpt {
  color: var(--sp-muted);
  font-size: 0.94rem;
  margin: 0 0 22px;
}

.post-card__summary-label {
  color: var(--sp-green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  margin: 2px 0 8px;
  text-transform: uppercase;
}

.post-card__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.post-card__action {
  border: 1px solid var(--sp-green);
  border-radius: var(--sp-radius);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 9px 12px;
  text-decoration: none;
}

.post-card__action--primary {
  background: var(--sp-green);
  color: #fff;
}

.post-card__action--primary:hover,
.post-card__action--primary:focus-visible {
  background: var(--sp-green-dark);
  border-color: var(--sp-green-dark);
  color: #fff;
}

.post-card__action--pdf {
  background: #fff;
  color: var(--sp-green);
}

.post-card__action--pdf:hover,
.post-card__action--pdf:focus-visible {
  background: var(--sp-soft);
  color: var(--sp-green-dark);
}

.post-card--featured {
	display: flex;
	grid-column: 1 / -1;
}

.post-card--featured .post-card__media,
.post-card--featured .post-card__placeholder,
.post-card--featured .post-card__image {
	max-height: 460px;
	min-height: 300px;
}

.post-card--featured .post-card__placeholder,
.post-card--featured .post-card__image {
  aspect-ratio: auto;
}

.post-card--featured .post-card__body {
	margin-inline: auto;
	max-width: 940px;
	padding: clamp(34px, 6vw, 68px);
	width: 100%;
}

.post-card--featured h2 {
	font-size: clamp(2.35rem, 4.4vw, 3.65rem);
	font-weight: 800;
	line-height: 1.05;
	margin-bottom: clamp(28px, 5vw, 48px);
}

.post-card__long-summary {
	color: var(--sp-ink);
	font-family: Calibri, Aptos, "Segoe UI", Arial, sans-serif !important;
	font-size: 1.03rem;
	line-height: 1.74;
}

/*
 * The independent short version can also be pasted from Word. Normalise its
 * imported spans so it uses the same typography as the complete review.
 */
.post-card__long-summary p,
.post-card__long-summary li {
	color: #191b18;
	font-family: Calibri, Aptos, "Segoe UI", Arial, sans-serif !important;
	font-size: 1.0625rem !important;
	line-height: 1.67 !important;
}

.post-card__long-summary p :is(span, font, strong, b, em, i),
.post-card__long-summary li :is(span, font, strong, b, em, i) {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

.post-card__long-summary :is(h1, h2, h3, h4) {
	color: #3e5025 !important;
	font-family: Georgia, "Times New Roman", serif !important;
	font-weight: 700 !important;
	line-height: 1.2;
}

.post-card__long-summary h1,
.post-card__long-summary h2 {
	font-size: clamp(1.65rem, 2.8vw, 2rem) !important;
	margin: 1.75em 0 0.65em;
}

.post-card__long-summary h3 {
	font-size: clamp(1.35rem, 2.2vw, 1.6rem) !important;
}

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

.post-card__long-summary > p:first-child {
	font-size: inherit;
	line-height: inherit;
}

.post-card__long-summary h3,
.post-card__summary-cta h3,
.post-card__about h3 {
	color: var(--sp-green-dark);
	font-size: clamp(1.55rem, 3vw, 2.15rem);
	font-weight: 750;
	margin: 2em 0 0.7em;
}

.post-card__long-summary p,
.post-card__long-summary ul {
	margin: 0 0 1.35em;
}

.post-card__long-summary ul {
	padding-left: 1.35em;
}

.post-card__long-summary li + li {
	margin-top: 0.55em;
}

.post-card__summary-cta {
	background: linear-gradient(135deg, #edf5f0, #f7faf8);
	border: 1px solid var(--sp-line);
	border-left: 5px solid var(--sp-green);
	margin-top: clamp(38px, 6vw, 60px);
	padding: clamp(24px, 4vw, 36px);
}

.post-card__summary-cta h3 {
	margin-top: 0;
}

.post-card__summary-cta p {
	margin: 0 0 1em;
}

.post-card__summary-cta .post-card__action {
	margin-top: 0.4em;
}

.post-card__about {
	border-top: 1px solid var(--sp-line);
	color: var(--sp-muted);
	font-size: 0.88rem;
	line-height: 1.6;
	margin-top: clamp(38px, 6vw, 58px);
	padding-top: 4px;
}

.post-card__about h3 {
	font-size: 1.2rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.post-card__about p {
	margin: 0 0 1em;
}

.blog-summary__byline {
	font-weight: 700;
}

.pagination {
  margin-top: 60px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination a,
.pagination .current {
  border: 1px solid var(--sp-line);
  color: var(--sp-ink);
  display: inline-flex;
  min-height: 42px;
  min-width: 42px;
  padding: 7px 12px;
  place-content: center;
  text-decoration: none;
}

.pagination .current {
  background: var(--sp-green);
  border-color: var(--sp-green);
  color: var(--sp-paper);
}

.empty-state {
  border-left: 4px solid var(--sp-green);
  color: var(--sp-muted);
  max-width: 620px;
  padding-left: 24px;
}

.site-footer {
  background: var(--sp-ink);
  color: rgba(255, 255, 255, 0.78);
  margin-top: clamp(40px, 5vw, 68px);
  padding-block: 58px 34px;
}

.footer-grid {
  display: grid;
  gap: clamp(48px, 7vw, 92px);
  grid-template-columns: minmax(320px, 1.35fr) minmax(260px, 0.8fr) auto;
}

.site-footer .site-brand,
.site-footer .site-brand:hover {
  color: var(--sp-paper);
}

.site-footer .site-brand__mark {
  background: var(--sp-paper);
}

.site-footer .site-brand__name {
  color: var(--sp-paper);
  font-size: 1.34rem;
}

.site-footer .site-brand__tagline {
  color: #9ec5b5;
}

.footer-intro {
  font-size: 0.9rem;
  margin: 18px 0 0;
  max-width: 390px;
}

.footer-heading {
  color: var(--sp-paper);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  gap: 11px;
  grid-template-columns: 1fr;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.78);
  display: inline-block;
  font-size: 0.87rem;
  line-height: 1.45;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--sp-paper);
  text-decoration: underline;
}

.site-footer .language-switcher a,
.site-footer .language-switcher span {
  color: rgba(255, 255, 255, 0.76);
}

.site-footer .language-switcher a:hover,
.site-footer .language-switcher a:focus-visible {
  border-color: var(--sp-paper);
  color: var(--sp-paper);
}

.social-links {
  display: flex;
  gap: 9px;
  margin-top: 24px;
}

.social-links a {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: var(--sp-paper);
  display: flex;
  height: 38px;
  justify-content: center;
  text-decoration: none;
  width: 38px;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: var(--sp-paper);
  color: var(--sp-ink);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.76rem;
  margin-top: 44px;
  padding-top: 24px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  color: var(--sp-ink);
  max-width: 100%;
  padding: 11px 13px;
}

.search-field:focus,
input:focus,
textarea:focus {
  border-color: var(--sp-green);
  outline: 2px solid rgba(33, 99, 79, 0.18);
}

@media (max-width: 1000px) {
	.post-grid--blog {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.book-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

  .header-inner {
    grid-template-columns: 1fr auto auto;
  }

  .menu-toggle {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
  }

  .header-inner > .language-switcher {
    grid-column: 2;
    grid-row: 1;
  }

  .primary-nav {
    border-top: 1px solid var(--sp-line);
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    padding-block: 12px 22px;
  }

  .site-header.is-menu-open .primary-nav {
    display: block;
  }

  .primary-nav > div > ul {
    align-items: stretch;
    display: grid;
    gap: 0;
    justify-content: stretch;
  }

  .primary-nav a {
    border-bottom: 1px solid var(--sp-line);
    padding: 12px 0;
  }

  .primary-nav a::after {
    display: none;
  }

  .primary-nav .sub-menu {
    border: 0;
    box-shadow: none;
    display: block;
    padding: 0 0 0 20px;
    position: static;
  }

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

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 17px;
  }

  h1,
  .page-hero:not(.page-hero--home) h1 {
    font-size: 3rem;
  }

  .page-hero--home + .content-wrap .entry-content > p:first-child {
    font-size: 1.55rem;
  }

  .blog-intro,
  .books-intro {
    font-size: 1rem;
    line-height: 1.62;
  }

  .entry-content h2 {
    font-size: 2.2rem;
  }

  .entry-content h3 {
    font-size: 1.65rem;
  }

  .single-post .page-hero h1 {
    font-size: 2.5rem;
  }

  .single-post .entry-content h2 {
    font-size: 1.8rem;
  }

  .single-post .entry-content h3 {
    font-size: 1.35rem;
  }

  .single-post .wp-block-table {
    margin-left: -4px;
    margin-right: -4px;
    max-width: calc(100% + 8px);
  }

  .single-post .wp-block-table th,
  .single-post .wp-block-table td {
    min-width: 180px;
    padding: 11px 12px;
  }

  .page--work .entry-content h2 {
    font-size: 1.5rem;
  }

  .page--work .entry-content h3 {
    font-size: 1.15rem;
  }

  .page--legal .page-hero h1 {
    font-size: 2.25rem;
  }

  .page--legal .entry-content h2 {
    font-size: 1.5rem;
  }

  .page--legal .entry-content h3 {
    font-size: 1.18rem;
  }

  .author-profile h2 {
    font-size: 2.6rem;
  }

  .post-card h2 {
    font-size: 2rem;
  }

  .site-shell,
  .page-hero__inner,
  .content-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-inner {
    gap: 12px;
    min-height: 76px;
  }

  .page-hero--home {
    background:
      linear-gradient(180deg, rgba(244, 245, 242, 0.98) 0%, rgba(244, 245, 242, 0.91) 48%, rgba(244, 245, 242, 0.38) 100%),
      url("assets/images/hero-pencil-sharpener.png") 69% center / cover no-repeat;
    min-height: 460px;
    padding-block: 86px 72px;
  }

  .site-brand__mark {
    flex-basis: 48px;
    height: 48px;
    width: 48px;
  }

  .site-brand__mark img {
    transform: translate(-27px, -16px);
    width: 102px;
  }

  .site-brand__name {
    font-size: 1.02rem;
    max-width: none;
    white-space: normal;
  }

  .site-brand__copy {
    gap: 4px;
  }

  .site-brand__tagline {
    font-size: 0.5rem;
    letter-spacing: 0.065em;
    white-space: normal;
  }

  .header-inner > .language-switcher {
    display: none;
  }

  .menu-toggle {
    grid-column: 3;
  }

  .primary-nav {
    grid-column: 1 / -1;
  }

  .post-grid,
  .book-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .post-card--featured {
    display: flex;
    grid-column: auto;
  }

  .post-card--featured .post-card__media,
  .post-card--featured .post-card__placeholder,
  .post-card--featured .post-card__image {
    height: auto;
    min-height: 0;
  }

  .post-card--featured .post-card__placeholder,
  .post-card--featured .post-card__image {
    aspect-ratio: 16 / 9;
  }

  .book-card--featured {
    display: flex;
    grid-column: auto;
  }

  .book-card--featured .book-card__cover,
  .book-card--featured .book-card__cover-placeholder {
    max-height: 390px;
  }

  .author-profile {
    margin-left: -20px;
    margin-right: -20px;
    padding: 24px 20px 40px;
  }

  .author-profile.alignwide,
  .publications-appendix.alignwide {
    max-width: none;
    width: auto;
  }

  .author-profile .wp-block-columns {
    gap: 28px;
    grid-template-columns: 1fr;
  }

  .author-profile__portrait {
    position: static;
  }

  .footer-nav ul {
    grid-template-columns: 1fr;
  }

  .page-hero--home + .content-wrap .entry-content > .wp-block-buttons {
    display: flex !important;
    margin-right: 0;
    width: 100%;
  }

  .alignwide,
  .alignfull {
    margin-left: -20px;
    width: 100vw;
  }
}

/*
 * Keep long-form post headings compact even when block styles add sizing.
 * Word frequently imports section headings as H1 blocks. A post already has
 * its single H1 in the article header, so render any imported content H1 with
 * the same restrained scale as an H2 rather than as a second page title.
 */
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 {
  font-size: clamp(1.75rem, 2.5vw, 2.05rem) !important;
  line-height: 1.18;
}

body.single.single-post .entry-content h3,
body.single.single-post .entry-content h3.wp-block-heading {
  font-size: clamp(1.3rem, 1.8vw, 1.48rem) !important;
  line-height: 1.25;
}

/* Quiet, compact end matter for transparency and correction notes. */
body.single.single-post .entry-content .editorial-notes {
  border-top: 1px solid var(--sp-line);
  color: var(--sp-muted);
  font-size: 0.82rem;
  line-height: 1.55;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.15rem;
}

body.single.single-post .entry-content .editorial-notes h1,
body.single.single-post .entry-content .editorial-notes h2,
body.single.single-post .entry-content .editorial-notes h3,
body.single.single-post .entry-content .editorial-notes h4 {
  color: var(--sp-ink);
  font-family: inherit;
  font-size: 0.9rem !important;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.3;
  margin: 0 0 0.85rem;
  text-transform: uppercase;
}

body.single.single-post .entry-content .editorial-notes p {
  margin: 0 0 0.72rem;
}

body.single.single-post .entry-content .editorial-notes p:last-child {
  margin-bottom: 0;
}

@media (max-width: 680px) {
  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 {
    font-size: 1.65rem !important;
  }

  body.single.single-post .entry-content h3,
  body.single.single-post .entry-content h3.wp-block-heading {
    font-size: 1.25rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
