.twd-ap-article-content::after {
  content: "";
  display: table;
  clear: both;
}

.twd-ap-article-content {
  /* 1.50.0: every colour, font and size reads the site's own --twd-site-* tokens
     when a theme or Site Kit publishes them, and falls back to the plugin's own
     values when it does not, so a site without tokens looks exactly as before. */
  --twd-ap-content-text: var(--twd-site-color-body, #1f2937);
  --twd-ap-content-muted: var(--twd-site-color-muted, #6b7280);
  --twd-ap-content-link: var(--twd-site-color-accent-text, #2563eb);
  --twd-ap-content-border: var(--twd-site-color-border, #e5e7eb);
  /* Centers itself regardless of what the theme's own Single Post
     template does with its content column. Without this, a theme whose
     template gives the_content a wide, uncentered container (no max-width
     of its own) left this max-width block sitting flush against the left
     edge instead of centered in the page, only really surfacing on a
     theme without a built Single Post design of its own. */
  max-width: 720px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  font-family: var(--twd-ap-content-font, var(--twd-site-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif)) !important;
  font-size: var(--twd-ap-content-size, var(--twd-site-size-body, 17px)) !important;
  line-height: var(--twd-ap-content-leading, 1.75) !important;
  color: var(--twd-ap-content-text) !important;
}

.twd-ap-article-content p {
  margin: 0 0 1.2em !important;
  color: var(--twd-ap-content-text) !important;
}

/* Line endings (1.46.0): headings are balanced across their lines, and a
   paragraph avoids ending on a lonely word, where the browser supports it
   (Chrome, Edge, Safari; others ignore it and wrap as before). The
   "Tidy line endings" setting adds the other half, keeping a short word with
   the word after it, in the page text itself. */
.twd-ap-article-content h2,
.twd-ap-article-content h3,
.twd-ap-article-content h4 {
  text-wrap: balance !important;
}
.twd-ap-article-content p,
.twd-ap-article-content li,
.twd-ap-article-content blockquote {
  text-wrap: pretty !important;
}

.twd-ap-article-content h2 {
  font-size: var(--twd-ap-content-h2-size, var(--twd-site-size-h2, 26px)) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 1.6em 0 0.6em !important;
  color: var(--twd-ap-content-heading, var(--twd-ap-content-text)) !important;
}
.twd-ap-article-content h3 {
  font-size: var(--twd-ap-content-h3-size, var(--twd-site-size-h3, 21px)) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 1.4em 0 0.5em !important;
  color: var(--twd-ap-content-heading, var(--twd-ap-content-text)) !important;
}
.twd-ap-article-content h4 {
  font-size: var(--twd-ap-content-h4-size, 18px) !important;
  font-weight: 700 !important;
  margin: 1.2em 0 0.5em !important;
  color: var(--twd-ap-content-heading, var(--twd-ap-content-text)) !important;
}
.twd-ap-article-content h2:first-child,
.twd-ap-article-content h3:first-child,
.twd-ap-article-content h4:first-child {
  margin-top: 0 !important;
}

.twd-ap-article-content ul,
.twd-ap-article-content ol {
  margin: 0 0 1.2em !important;
  padding-left: 1.4em !important;
}
.twd-ap-article-content li {
  margin-bottom: 0.4em !important;
  color: var(--twd-ap-content-text) !important;
}

.twd-ap-article-content blockquote {
  margin: 1.4em 0 !important;
  padding: 0.4em 0 0.4em 1.2em !important;
  border-left: 3px solid var(--twd-ap-content-quote, var(--twd-ap-content-link)) !important;
  color: var(--twd-ap-content-quote, var(--twd-ap-content-muted)) !important;
  font-style: italic !important;
}

.twd-ap-article-content hr {
  border: none !important;
  border-top: 1px solid var(--twd-ap-content-border) !important;
  margin: 2em 0 !important;
}

.twd-ap-article-content a {
  color: var(--twd-ap-content-link) !important;
  text-decoration: underline !important;
}

.twd-ap-article-content strong,
.twd-ap-article-content b {
  font-weight: 700 !important;
}

.twd-ap-article-content figure {
  margin: 1.6em 0 !important;
}
.twd-ap-article-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  display: block !important;
}
.twd-ap-article-content .twd-ap-img-left {
  float: left !important;
  margin: 4px 20px 12px 0 !important;
  max-width: 50% !important;
}
.twd-ap-article-content .twd-ap-img-right {
  float: right !important;
  margin: 4px 0 12px 20px !important;
  max-width: 50% !important;
}
.twd-ap-article-content .twd-ap-img-center {
  margin-left: auto !important;
  margin-right: auto !important;
}
.twd-ap-article-content .twd-ap-img-full {
  width: 100% !important;
  max-width: 100% !important;
}
.twd-ap-article-content figcaption {
  margin-top: 0.5em !important;
  font-size: 13px !important;
  color: var(--twd-ap-content-muted) !important;
  text-align: center !important;
}

.twd-ap-yt-embed {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  background: #000 !important;
  margin: 1.6em 0 !important;
}
.twd-ap-yt-embed img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  opacity: 0.85 !important;
}
.twd-ap-yt-embed::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 68px !important;
  height: 48px !important;
  transform: translate(-50%, -50%) !important;
  background: rgba(0, 0, 0, 0.75) !important;
  border-radius: 12px !important;
  pointer-events: none !important;
}
.twd-ap-yt-embed::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 0 !important;
  height: 0 !important;
  margin-left: -6px !important;
  transform: translateY(-50%) !important;
  border-style: solid !important;
  border-width: 12px 0 12px 20px !important;
  border-color: transparent transparent transparent #fff !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
.twd-ap-yt-embed-active::before,
.twd-ap-yt-embed-active::after {
  display: none !important;
}
.twd-ap-yt-embed-active {
  cursor: default !important;
}
.twd-ap-yt-embed iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

.twd-ap-swipebook-row {
  margin: 1.8em 0 0 !important;
}
/* Doubled class on purpose, not a typo: a theme/Elementor global "Text
   Editor" widget link style (e.g. `.elementor-widget-text-editor a`) can
   outrank a plain single-class selector on specificity even with
   !important on both sides -- !important only wins ties on equal
   specificity, it doesn't bypass specificity comparison entirely. This
   button shipped with `!important` alone and still rendered as a bare
   theme link on a live site, so the selector itself needs the extra
   weight too. */
a.twd-ap-swipebook-btn.twd-ap-swipebook-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  border: 1px solid var(--twd-ap-swipebook-color, #5b8a72) !important;
  color: var(--twd-ap-swipebook-color, #5b8a72) !important;
  background: var(--twd-ap-swipebook-bg, rgba(91, 138, 114, 0.08)) !important;
  padding: 9px 18px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
}
/* The button at the end of the article sits to the right. */
.twd-ap-swipebook-row.twd-ap-swipebook-row-end {
  text-align: right !important;
}
a.twd-ap-swipebook-btn.twd-ap-swipebook-btn:hover {
  background: var(--twd-ap-swipebook-bg-hover, rgba(91, 138, 114, 0.16)) !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 600px) {
  .twd-ap-article-content {
    font-size: var(--twd-ap-content-size-m, 16px) !important;
  }
  .twd-ap-article-content h2 {
    font-size: var(--twd-ap-content-h2-size-m, var(--twd-site-size-h2-sm, 22px)) !important;
  }
  .twd-ap-article-content h3 {
    font-size: var(--twd-ap-content-h3-size-m, 19px) !important;
  }
  .twd-ap-article-content h4 {
    font-size: var(--twd-ap-content-h4-size-m, 18px) !important;
  }
}

/* The swipe book (and Summary Book) buttons straight under the title, as the
   first thing in the article's text. */
.twd-ap-swipebook-top {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
  margin: 0 0 1.4em !important;
}
.twd-ap-swipebook-top .twd-ap-swipebook-row {
  margin: 0 !important;
}

/* ---- 1.50.0: headings, header block, tags, aligned title (site tokens with fallbacks) ---- */
.twd-ap-article-content h2,
.twd-ap-article-content h3,
.twd-ap-article-content h4 {
  font-family: var(--twd-ap-content-heading-font, var(--twd-site-font-heading, inherit)) !important;
  font-style: var(--twd-site-heading-style, normal) !important;
  font-weight: var(--twd-site-heading-weight, 700) !important;
}
.twd-ap-article-content .twd-ap-article-header {
  margin: 0 0 1.6em !important;
}
.twd-ap-article-content .twd-ap-article-lead {
  margin: 0 0 0.8em !important;
  font-size: var(--twd-site-size-lead, 20px) !important;
  line-height: 1.5 !important;
  color: var(--twd-ap-content-muted) !important;
}
.twd-ap-article-content .twd-ap-article-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px 10px !important;
  margin: 0 0 1.2em !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: var(--twd-ap-content-muted) !important;
}
.twd-ap-article-content .twd-ap-article-topic {
  font-weight: 600 !important;
  color: var(--twd-site-color-eyebrow, var(--twd-ap-content-link)) !important;
}
.twd-ap-article-content .twd-ap-article-hero {
  margin: 0 0 1.4em !important;
}
.twd-ap-article-content .twd-ap-article-hero-img,
.twd-ap-article-content .twd-ap-article-hero-img img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 420px !important;
  object-fit: cover !important;
  border-radius: var(--twd-site-radius-image, 12px) !important;
}

/* The theme's own title and tag line (Hello Elementor markup), lined up with the text column. */
body.single-post .page-header,
body.single-post .page-content > .post-tags {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}
body.single-post .page-header .entry-title {
  margin: 32px 0 16px;
  padding-left: 0;
  padding-right: 0;
  font-family: var(--twd-site-font-heading, inherit);
  font-size: var(--twd-site-size-page-title, 40px);
  font-weight: var(--twd-site-title-weight, 600);
  font-style: var(--twd-site-title-style, normal);
  line-height: var(--twd-site-line-heading, 1.2);
  color: var(--twd-site-color-title, inherit);
  text-wrap: balance;
}
@media (max-width: 600px) {
  .twd-ap-article-content .twd-ap-article-lead {
    font-size: 18px !important;
  }
  body.single-post .page-header .entry-title {
    font-size: var(--twd-site-size-page-title-sm, 30px);
  }
}
/* "Tagged a, b, c" as small chips: the word and the commas are hidden by zero font size. */
body.single-post .post-tags {
  margin-top: 28px;
  margin-bottom: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--twd-site-color-border, #e5e7eb);
}
body.single-post .post-tags .tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0;
  line-height: 0;
}
body.single-post .post-tags .tag-links a {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--twd-site-color-border, #d1d5db);
  border-radius: var(--twd-site-radius-pill, 999px);
  background: var(--twd-site-color-surface, #f9fafb);
  color: var(--twd-site-color-body, #374151);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}
body.single-post .post-tags .tag-links a:hover {
  border-color: var(--twd-site-color-accent-text, #2563eb);
  color: var(--twd-site-color-accent-text, #2563eb);
}

/* ---- 1.51.0: the picture chosen for the top of an article, and the full width banner ---- */
.twd-ap-article-banner {
  position: relative !important;
  left: 50% !important;
  width: var(--twd-ap-vw, 100vw) !important;
  max-width: var(--twd-ap-vw, 100vw) !important;
  margin: 0 0 32px calc(var(--twd-ap-vw, 100vw) / -2) !important;
  padding: 0 !important;
}
.twd-ap-article-banner-img {
  display: block !important;
  width: 100% !important;
  height: clamp(200px, 34vw, 440px) !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
}
/* The page width without the scrollbar is set by the banner's own script (--twd-ap-vw); 100vw includes the scrollbar, which left the banner a few pixels off. The clip below is only a safety net. */
body.twd-ap-has-banner {
  overflow-x: clip;
}
/* Moved in front of the theme's title block, the banner has no space above it. */
main > .twd-ap-article-banner {
  margin-top: 0 !important;
}
