/* ==========================================================================
 * RankwellPress — Single Post Styles (v3.2.0)
 * 
 * Supports two layouts via single_post_layout setting:
 * - 'standard' — Default magazine with inline featured image + sidebar
 * - 'hero'     — Full-width hero image with overlay title + sidebar
 * 
 * Changelog v3.2.0:
 * - Flat ordered lists (text numbers, primary green)
 * - Flat unordered lists (em-based bullet alignment)
 * - Removed content-visibility on sidebar (AdSense safety)
 * - Kept content-visibility on related posts + comments
 * 
 * Changelog v3.2.1:
 * - Link colors unified: all links (internal + external) use
 *   --rw-color-primary. Explicit :link / :visited to beat UA defaults.
 * - Removed separate --rw-color-link variables from link rules.
 * ========================================================================== */

@layer reset, base, components, utilities;

:root {
  --rw-single-content-width: 728px;
  --rw-single-gap: 24px;
  --rw-sidebar-width: 320px;
  --rw-space-5: 1.5rem;
  --rw-space-6: 2rem;
  --rw-space-8: 3rem;
  --rw-font-primary: var(--rw-font-body, 'Lexend', system-ui, -apple-system, sans-serif);
  --rw-font-heading: var(--rw-font-heading, 'Lexend', system-ui, -apple-system, sans-serif);
  --rw-font-article: var(--rw-font-article, 'Lexend', system-ui, -apple-system, sans-serif);
  --rw-text-body: #4b5563;
  --rw-text-muted: #6b7280;
  --rw-color-bg: #ffffff;
  --rw-color-accent: #0f1e33;
  --rw-color-link: #0d7c3e;
  --rw-color-link-hover: #0f1e33;
  --rw-border-light: #e5e7eb;
  --rw-radius-sm: 4px;
  --rw-radius-md: 8px;
  --rw-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --rw-text-heading: #111827;
  --rw-bg-alt: #f3f4f6;
  --rw-text-inverse: #ffffff;
  --rw-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --rw-transition-standard: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --rw-heading-weight: var(--rw-font-heading-weight, 700);
  --rw-body-size: 1.05rem;
  --rw-body-lh: 1.75;
}

/* ==========================================================================
   Container
   ========================================================================== */
.rankwellpress-container {
  width: 100%;
  max-width: var(--rw-container-desktop, 1200px);
  margin-inline: auto;
  padding-inline: 2.5%;
  box-sizing: border-box;
}

@media screen and (max-width: 1024px) {
  .rankwellpress-container {
    max-width: var(--rw-container-tablet, 95%);
  }
}

@media screen and (max-width: 768px) {
  .rankwellpress-container {
    max-width: 100%;
    width: 100%;
    padding-inline: 0;
  }
}

/* ==========================================================================
   Single Post Layout — Standard + Hero (with sidebar)
   ========================================================================== */
.single-post-layout {
  margin-block: calc(var(--rw-space-5, 1.5rem) * 0.5);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .single-post-layout {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rw-single-gap, 24px);
    align-items: flex-start;
  }

  .single-post-layout.has-sidebar-right .single-post-main,
  .single-post-layout.has-sidebar-left .single-post-main {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
  }

  .single-post-layout.has-sidebar-right .single-post-sidebar,
  .single-post-layout.has-sidebar-left .single-post-sidebar {
    flex: 0 0 var(--rw-sidebar-width, 320px);
    max-width: var(--rw-sidebar-width, 320px);
  }

  .single-post-sidebar.rwp-sidebar-sticky {
    position: sticky;
    top: 90px;
    align-self: flex-start;
  }

  .single-post-layout.has-sidebar-none {
    display: block;
    max-width: 800px;
    margin-inline: auto;
  }
}

/* ==========================================================================
   MOBILE FULL-WIDTH FIX — Forces 100% width, no right gap
   ========================================================================== */
@media (max-width: 768px) {
  .single-post-layout,
  .single-post-layout.has-sidebar-right,
  .single-post-layout.has-sidebar-left,
  .single-post-layout.has-sidebar-none {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
    box-sizing: border-box;
  }

  .single-post-main {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 12px;
    overflow: visible;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .single-post-sidebar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 12px;
    box-sizing: border-box;
  }
  
  .single-post-sidebar.rwp-sidebar-sticky {
    position: static;
  }
}

/* ==========================================================================
   HERO LAYOUT — Full-width featured image with overlay
   ========================================================================== */
.single-hero-template {
  margin-bottom: calc(var(--rw-space-8, 3rem) * 0.5);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  margin-bottom: calc(var(--rw-space-5, 1.5rem) * 0.5);
  box-sizing: border-box;
  overflow: hidden;
}

.hero-section--no-image {
  background: linear-gradient(135deg, #0f1e33 0%, #08101b 100%);
  min-height: 300px;
}

.hero-overlay {
  width: 100%;
  max-width: 100%;
  padding: 60px 20px 40px;
  box-sizing: border-box;
}

.hero-content {
  max-width: 800px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hero-category {
  margin-bottom: 16px;
}

.hero-category a {
  display: inline-block;
  background-color: var(--rw-widget-category-bg, #0d7c3e);
  color: var(--rw-widget-category-text, #ffffff);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 4px;
  text-decoration: none;
  margin-inline-end: 6px;
  transition: opacity 0.2s ease;
}

.hero-category a:hover,
.hero-category a:focus-visible {
  opacity: 0.85;
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
}

.hero-title {
  font-family: var(--rw-font-heading, 'Lexend', system-ui, sans-serif);
  font-size: var(--rw-h1-size, 36px);
  font-weight: var(--rw-font-heading-weight, 800);
  line-height: var(--rw-heading-lh, 1.15);
  color: #ffffff;
  margin: 0 0 20px;
  text-wrap: wrap;
  width: 100%;
  max-width: 100%;
  display: block;
  text-align: start;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--rw-h1-size, 26px);
    line-height: 1.25;
  }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.hero-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
}

.hero-author span {
  font-weight: 600;
  color: #ffffff;
}

.hero-date,
.hero-reading-time,
.hero-views,
.hero-comments {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-read-aloud {
  display: flex;
  align-items: center;
}

.hero-share {
  margin-top: 20px;
}

.hero-share .rwp-share-label {
  color: rgba(255, 255, 255, 0.8);
}

.hero-share .rwp-share-btn {
  background-color: rgba(255, 255, 255, 0.15);
}

.hero-share .rwp-share-btn:hover,
.hero-share .rwp-share-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.3);
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 300px;
    width: 100%;
    margin-inline: 0;
  }

  .hero-section--no-image {
    min-height: 220px;
  }

  .hero-overlay {
    padding: 40px 12px 30px;
    width: 100%;
    max-width: 100%;
  }

  .hero-meta {
    gap: 12px;
    font-size: 0.8rem;
  }

  .hero-author img {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   Post Header (Standard layout)
   ========================================================================== */
.post-header {
  margin-bottom: calc(var(--rw-space-4, 1rem) * 0.5);
  border-bottom: 1px solid var(--rw-border-light, #e5e7eb);
  padding-bottom: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Post Category Badge — Flat rectangle
   ========================================================================== */

.post-category-badge {
    display: block;
    margin-bottom: 12px;
}

.post-category-badge a {
    display: inline-block;
    padding: 5px 10px;
    color: var(--rw-single-category-text, #ffffff);
    background-color: var(--rw-single-category-bg, #0d7c3e);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.post-category-badge a:hover,
.post-category-badge a:focus-visible {
    background-color: var(--rw-single-category-hover-bg, #c92a2a);
    color: var(--rw-single-category-text, #ffffff);
    opacity: 0.9;
}

.post-category-badge a:focus-visible {
    outline: 2px solid var(--rw-color-primary, #0d7c3e);
    outline-offset: 2px;
}

/* ==========================================================================
   Post Title — Full Width Left-Aligned (Fixed)
   ========================================================================== */
.post-title {
  font-family: var(--rw-font-heading, 'Lexend', system-ui, sans-serif);
  font-size: var(--rw-h1-size, 36px);
  font-weight: var(--rw-font-heading-weight, 700);
  line-height: var(--rw-heading-lh, 1.2);
  margin: 0 0 16px;
  color: var(--rw-text-heading, #111827);
  letter-spacing: var(--rw-font-heading-spacing, -0.01em);
  text-wrap: wrap;
  width: 100%;
  max-width: 100%;
  display: block;
  text-align: start;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

@media (max-width: 768px) {
  .post-title {
    font-size: var(--rw-h1-size, 26px);
    line-height: 1.25;
    text-wrap: wrap;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* ==========================================================================
   Post Meta
   ========================================================================== */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.875rem;
  color: var(--rw-text-muted, #6b7280);
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  flex-shrink: 0;
  color: var(--rw-text-muted, #6b7280);
}

.meta-author {
  text-decoration: none;
  color: var(--rw-text-body, #4b5563);
  font-weight: 600;
}

.meta-author:hover,
.meta-author:focus-visible {
  color: var(--rw-color-primary, #0d7c3e);
  text-decoration: underline;
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
}

/* ==========================================================================
   Featured Image (Standard layout)
   ========================================================================== */
.post-featured-image {
  margin-bottom: calc(var(--rw-space-4, 1rem) * 0.5);
  margin-top: calc(var(--rw-space-4, 1rem) * 0.5);
  position: relative;
  border-radius: var(--rw-radius-md, 8px);
  overflow: hidden;
  background-color: var(--rw-bg-alt, #f3f4f6);
  box-shadow: var(--rw-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.featured-caption {
  font-size: 0.8rem;
  color: var(--rw-text-muted, #6b7280);
  padding: 6px 8px 6px 12px;
  background: var(--rw-bg-alt, #f3f4f6);
  text-align: start;
  font-style: italic;
  border-inline-start: 4px solid var(--rw-color-primary, #0d7c3e);
}

/* ==========================================================================
   Content Figures & Captions
   ========================================================================== */
:is(.post-content, .single-content, .rankwellpress-single-content) figure {
  margin: calc(var(--rw-space-4, 1rem) * 0.5) 0;
  max-width: 100%;
}

:is(.post-content, .single-content, .rankwellpress-single-content) figcaption,
:is(.post-content, .single-content, .rankwellpress-single-content) .wp-element-caption {
  font-size: 0.8rem;
  color: var(--rw-text-muted, #6b7280);
  text-align: start;
  margin-top: 0;
  font-style: italic;
  padding: 6px 8px 6px 12px;
  background: var(--rw-bg-alt, #f3f4f6);
  border-inline-start: 4px solid var(--rw-color-primary, #0d7c3e);
}

/* ==========================================================================
   Post Content Body — Updated for Article Typography
   ========================================================================== */
.post-content,
.single-content,
.rankwellpress-single-content,
.rwp-article-body {
  font-size: var(--rw-article-size, var(--rw-body-size, 1.05rem));
  line-height: var(--rw-article-lh, var(--rw-body-lh, 1.75));
  color: var(--rw-text-body, #4b5563);
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rwp-article-body,
.rwp-font-article {
  font-family: var(--rw-font-article, var(--rw-font-body, 'Lexend', system-ui, sans-serif));
  font-weight: var(--rw-font-article-weight, 400);
}

.rwp-article-body p,
.rwp-font-article p,
.post-content p,
.single-content p,
.rankwellpress-single-content p {
  margin: 0 0 var(--rw-article-paragraph-spacing, 12px);
}

.post-content img,
.single-content img,
.rankwellpress-single-content img,
.rwp-article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--rw-radius-sm, 4px);
  box-sizing: border-box;
}

.post-content h2,
.single-content h2,
.rankwellpress-single-content h2,
.rwp-article-body h2 {
  font-family: var(--rw-font-heading, 'Lexend', system-ui, sans-serif);
  font-size: var(--rw-h2-size, 24px);
  font-weight: var(--rw-font-heading-weight, 700);
  letter-spacing: var(--rw-font-heading-spacing, -0.01em);
  margin: calc(var(--rw-space-5, 1.5rem) * 0.5) 0 calc(var(--rw-space-3, 0.75rem) * 0.5);
  line-height: var(--rw-heading-lh, 1.3);
  color: var(--rw-text-heading, #111827);
  text-wrap: wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.post-content h3,
.single-content h3,
.rankwellpress-single-content h3,
.rwp-article-body h3 {
  font-family: var(--rw-font-heading, 'Lexend', system-ui, sans-serif);
  font-size: var(--rw-h3-size, 20px);
  font-weight: var(--rw-font-heading-weight, 700);
  letter-spacing: var(--rw-font-heading-spacing, -0.01em);
  margin: calc(var(--rw-space-4, 1rem) * 0.5) 0 calc(var(--rw-space-2, 0.5rem) * 0.5);
  line-height: var(--rw-heading-lh, 1.3);
  color: var(--rw-text-heading, #111827);
  text-wrap: wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

@media (max-width: 768px) {
  .post-content h2,
  .single-content h2,
  .rankwellpress-single-content h2,
  .rwp-article-body h2 {
    font-size: var(--rw-h2-size, 18px);
  }
}

/* ==========================================================================
   ARTICLE CONTENT LINKS — unified color
   
   All links (internal + external) use --rw-color-primary.
   Explicit :link / :visited to beat user-agent defaults.
   ========================================================================== */
.post-content a:link,
.post-content a:visited,
.entry-content a:link,
.entry-content a:visited,
.single-content a:link,
.single-content a:visited,
.rankwellpress-single-content a:link,
.rankwellpress-single-content a:visited,
.rwp-article-body a:link,
.rwp-article-body a:visited {
  color: var(--rw-color-primary, #0d7c3e);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, text-decoration-thickness 0.15s ease;
}

.post-content a:hover,
.post-content a:focus-visible,
.entry-content a:hover,
.entry-content a:focus-visible,
.single-content a:hover,
.single-content a:focus-visible,
.rankwellpress-single-content a:hover,
.rankwellpress-single-content a:focus-visible,
.rwp-article-body a:hover,
.rwp-article-body a:focus-visible {
  color: var(--rw-color-accent, #0f1e33);
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

.post-content a:focus-visible,
.entry-content a:focus-visible,
.single-content a:focus-visible,
.rankwellpress-single-content a:focus-visible,
.rwp-article-body a:focus-visible {
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
  border-radius: 2px;
}

/* External links — same color as internal, no special case */
.post-content a[target="_blank"]:link,
.post-content a[target="_blank"]:visited,
.entry-content a[target="_blank"]:link,
.entry-content a[target="_blank"]:visited,
.single-content a[target="_blank"]:link,
.single-content a[target="_blank"]:visited,
.rankwellpress-single-content a[target="_blank"]:link,
.rankwellpress-single-content a[target="_blank"]:visited,
.rwp-article-body a[target="_blank"]:link,
.rwp-article-body a[target="_blank"]:visited {
  color: var(--rw-color-primary, #0d7c3e);
}

.post-content a[target="_blank"]:hover,
.post-content a[target="_blank"]:focus-visible,
.entry-content a[target="_blank"]:hover,
.entry-content a[target="_blank"]:focus-visible,
.single-content a[target="_blank"]:hover,
.single-content a[target="_blank"]:focus-visible,
.rankwellpress-single-content a[target="_blank"]:hover,
.rankwellpress-single-content a[target="_blank"]:focus-visible,
.rwp-article-body a[target="_blank"]:hover,
.rwp-article-body a[target="_blank"]:focus-visible {
  color: var(--rw-color-accent, #0f1e33);
}

/* External link indicator arrow — only affects ::after pseudo */
.post-content a[target="_blank"]::after,
.entry-content a[target="_blank"]::after,
.single-content a[target="_blank"]::after,
.rankwellpress-single-content a[target="_blank"]::after,
.rwp-article-body a[target="_blank"]::after {
  content: "↗";
  display: inline-block;
  font-size: 0.75em;
  line-height: 1;
  margin-left: 2px;
  opacity: 0.7;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ==========================================================================
   FONT SIZE ADJUSTER — New Component
   ========================================================================== */
.rwp-font-adjuster {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  background: var(--rw-bg-alt, #f3f4f6);
  border-radius: var(--rw-radius-pill, 500px);
  width: fit-content;
  box-sizing: border-box;
}

.rwp-font-adjuster button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: var(--rw-text-body, #4b5563);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--rw-radius-pill, 500px);
  transition: background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.rwp-font-adjuster button:hover,
.rwp-font-adjuster button:focus-visible {
  background: var(--rw-color-primary, #0d7c3e);
  color: #ffffff;
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
}

.rwp-font-adjuster .rwp-font-decrease {
  font-size: 0.7rem;
}

.rwp-font-adjuster .rwp-font-increase {
  font-size: 0.9rem;
}

.rwp-font-adjuster .rwp-font-reset {
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================================
   UNORDERED LISTS — flat bullets, em-based alignment
   ========================================================================== */
.post-content ul,
.single-content ul,
.rankwellpress-single-content ul,
.rwp-article-body ul {
  margin: 0 0 14px 0;
  padding: 0 0 0 20px;
  list-style: none;
}

.post-content ul li,
.single-content ul li,
.rankwellpress-single-content ul li,
.rwp-article-body ul li {
  position: relative;
  padding-inline-start: 6px;
  margin-bottom: 4px;
  line-height: 1.5;
  color: var(--rw-text-body, #4b5563);
}

.post-content ul li::before,
.single-content ul li::before,
.rankwellpress-single-content ul li::before,
.rwp-article-body ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: -18px;
  top: 0.55em;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--rw-color-primary, #0d7c3e);
  border-radius: 50%;
}

.post-content ul ul,
.single-content ul ul,
.rankwellpress-single-content ul ul,
.rwp-article-body ul ul {
  margin-top: 4px;
  margin-bottom: 0;
  padding-inline-start: 16px;
}

.post-content ul ul li::before,
.single-content ul ul li::before,
.rankwellpress-single-content ul ul li::before,
.rwp-article-body ul ul li::before {
  width: 5px;
  height: 5px;
  background-color: transparent;
  border: 1.5px solid var(--rw-color-primary, #0d7c3e);
}

/* ==========================================================================
   ORDERED LISTS — flat text numbers, primary green accent
   ========================================================================== */
.post-content ol,
.single-content ol,
.rankwellpress-single-content ol,
.rwp-article-body ol {
  margin: 0 0 14px 0;
  padding: 0 0 0 20px;
  list-style: none;
  counter-reset: rwp-ol-counter;
}

.post-content ol li,
.single-content ol li,
.rankwellpress-single-content ol li,
.rwp-article-body ol li {
  position: relative;
  padding-inline-start: 6px;
  margin-bottom: 4px;
  line-height: 1.5;
  color: var(--rw-text-body, #4b5563);
  counter-increment: rwp-ol-counter;
}

.post-content ol li::before,
.single-content ol li::before,
.rankwellpress-single-content ol li::before,
.rwp-article-body ol li::before {
  content: counter(rwp-ol-counter) ".";
  position: absolute;
  inset-inline-start: -18px;
  top: 0;
  width: auto;
  height: auto;
  min-width: 18px;
  background: none;
  background-color: transparent;
  color: var(--rw-color-primary, #0d7c3e);
  font-size: 1em;
  font-weight: 700;
  line-height: inherit;
  text-align: right;
  border: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
}

.post-content ol ol,
.single-content ol ol,
.rankwellpress-single-content ol ol,
.rwp-article-body ol ol {
  margin-top: 4px;
  margin-bottom: 0;
  padding-inline-start: 16px;
  counter-reset: rwp-ol-sub-counter;
}

.post-content ol ol li,
.single-content ol ol li,
.rankwellpress-single-content ol ol li,
.rwp-article-body ol ol li {
  counter-increment: rwp-ol-sub-counter;
}

.post-content ol ol li::before,
.single-content ol ol li::before,
.rankwellpress-single-content ol ol li::before,
.rwp-article-body ol ol li::before {
  content: counter(rwp-ol-sub-counter, lower-alpha) ")";
  color: var(--rw-color-primary, #0d7c3e);
  font-weight: 700;
  font-size: 1em;
  line-height: inherit;
  background: none;
  border: none;
  border-radius: 0;
  width: auto;
  height: auto;
  text-align: right;
}

/* ==========================================================================
   Author Box — Complete Section (Light + Dark + Mobile)
   ========================================================================== */
.rwp-author-box {
  padding: var(--rw-space-5, 1.5rem);
  border: 1px solid var(--rw-border-light, #e5e7eb);
  border-radius: var(--rw-radius-md, 12px);
  background: var(--rw-bg-content, #ffffff);
  margin: var(--rw-space-5, 1.5rem) 0;
  clear: both;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: var(--rw-shadow-sm, 0 1px 3px rgba(0,0,0,0.04));
}

.rwp-author-box-header {
  font-size: 1rem;
  margin-bottom: var(--rw-space-4, 1rem);
  color: var(--rw-text-heading, #111827);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--rw-color-primary, #0d7c3e);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rwp-author-box-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: var(--rw-color-accent, #0f1e33);
}

.rwp-author-box-header strong {
  font-weight: 700;
}

.rwp-author-name-link {
  color: var(--rw-color-primary, #0d7c3e);
  text-decoration: none;
  font-weight: 700;
  transition: color var(--rw-transition-fast, 0.2s ease);
}

.rwp-author-name-link:hover,
.rwp-author-name-link:focus-visible {
  color: var(--rw-color-accent, #0f1e33);
  text-decoration: underline;
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
  border-radius: 2px;
}

.rwp-author-box-body {
  display: flex;
  gap: var(--rw-space-3, 1rem);
  align-items: flex-start;
  margin-bottom: var(--rw-space-4, 1rem);
}

.rwp-author-avatar {
  flex-shrink: 0;
  line-height: 0;
}

.rwp-author-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--rw-color-primary, #0d7c3e);
  padding: 2px;
  background: var(--rw-bg-content, #ffffff);
}

/* ── Bio wrapper — container-level clamp ──────────────── */
.rwp-author-info {
  flex: 1;
  min-width: 0;
  position: relative;
}

/* Base paragraph typography (applies to all states) */
.rwp-author-info p {
  font-size: 0.85rem;
  color: var(--rw-text-body, #4b5563);
  margin: 0 0 0.8em;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rwp-author-info p:last-child {
  margin-bottom: 0;
}

/* Short bio — no clamp, no toggle (JS adds this class) */
.rwp-author-info--short {
  max-height: none;
}

/* Clamped — 5 lines + soft fade at the bottom (JS adds this) */
.rwp-author-info--clamped {
  max-height: 5.8em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
}

/* Expanded — remove clamp and fade (JS adds this) */
.rwp-author-info--expanded {
  max-height: none;
  overflow: visible;
  -webkit-mask-image: none;
          mask-image: none;
}

/* ── "See full" / "See less" toggle button ──────────────── */
.rwp-author-bio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--rw-color-primary, #0d7c3e);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color var(--rw-transition-fast, 0.15s ease),
              opacity var(--rw-transition-fast, 0.15s ease);
  align-self: flex-start;
}

.rwp-author-bio-toggle::after {
  content: '›';
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform var(--rw-transition-fast, 0.2s ease);
}

.rwp-author-bio-toggle[aria-expanded="true"]::after {
  transform: translateY(-1px) rotate(90deg);
}

.rwp-author-bio-toggle:hover,
.rwp-author-bio-toggle:focus-visible {
  color: var(--rw-color-accent, #0f1e33);
  opacity: 0.85;
}

.rwp-author-bio-toggle:focus-visible {
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 3px;
  border-radius: 3px;
  opacity: 1;
}

.rwp-author-box-footer {
  display: flex;
  flex-direction: row;
  gap: var(--rw-space-3, 0.75rem);
  align-items: center;
  flex-wrap: nowrap;
  border-top: 1px solid var(--rw-border-light, #e5e7eb);
  padding-top: var(--rw-space-3, 0.75rem);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.rwp-author-box-footer::-webkit-scrollbar {
  height: 4px;
}

.rwp-author-box-footer::-webkit-scrollbar-thumb {
  background: var(--rw-border-light, #ccc);
  border-radius: 2px;
}

.rwp-author-box-footer a {
  color: var(--rw-color-primary, #0d7c3e);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--rw-transition-fast, 0.2s ease);
  flex-shrink: 0;
  white-space: nowrap;
  position: relative;
}

.rwp-author-box-footer a + a::before {
  content: '•';
  position: absolute;
  left: -8px;
  color: var(--rw-text-muted, #6b7280);
  font-size: 0.7rem;
}

.rwp-author-box-footer a:hover,
.rwp-author-box-footer a:focus-visible {
  color: var(--rw-color-accent, #0f1e33);
  text-decoration: underline;
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Author Box — Dark Mode */
html[data-theme="dark"] .rwp-author-box {
  background: #1a1a1a;
  border-color: #404040;
}

html[data-theme="dark"] .rwp-author-box-header {
  color: #f3f4f6;
  border-bottom-color: #34d399;
}

html[data-theme="dark"] .rwp-author-box-header::after {
  background: #6ee7b7;
}

html[data-theme="dark"] .rwp-author-avatar-img {
  border-color: #34d399;
  background: #1a1a1a;
}

html[data-theme="dark"] .rwp-author-name-link {
  color: #34d399;
}

html[data-theme="dark"] .rwp-author-name-link:hover {
  color: #6ee7b7;
}

html[data-theme="dark"] .rwp-author-info p {
  color: #d1d5db;
}

html[data-theme="dark"] .rwp-author-bio-toggle {
  color: #34d399;
}

html[data-theme="dark"] .rwp-author-bio-toggle:hover,
html[data-theme="dark"] .rwp-author-bio-toggle:focus-visible {
  color: #6ee7b7;
  outline-color: #34d399;
}

html[data-theme="dark"] .rwp-author-box-footer {
  border-top-color: #404040;
}

html[data-theme="dark"] .rwp-author-box-footer a {
  color: #34d399;
}

html[data-theme="dark"] .rwp-author-box-footer a:hover {
  color: #6ee7b7;
}

html[data-theme="dark"] .rwp-author-box-footer a + a::before {
  color: #64748b;
}

/* Author Box — Mobile Responsive */
@media (max-width: 600px) {
  .rwp-author-box {
    padding: 16px;
  }
  
  .rwp-author-box-body {
    flex-direction: column;
    gap: 12px;
  }
  
  .rwp-author-avatar-img {
    width: 48px;
    height: 48px;
  }
  
  .rwp-author-box-footer {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rwp-author-box,
  .rwp-author-name-link,
  .rwp-author-box-footer a,
  .rwp-author-bio-toggle,
  .rwp-author-bio-toggle::after {
    transition: none !important;
  }
}

/* ==========================================================================
   Scrollable Tables
   ========================================================================== */
.single-post-main,
.rankwellpress-single-content,
.single-content,
.post-content,
.rwp-article-body {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rankwellpress-table-wrapper,
.wp-block-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 20px 0 24px;
  border: 1px solid var(--rw-border-light, #e5e7eb);
  border-radius: var(--rw-radius-md, 8px);
  box-shadow: var(--rw-shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
  position: relative;
  box-sizing: border-box;
}

.rankwellpress-table-wrapper::before,
.rankwellpress-table-wrapper::after {
  content: '';
  position: sticky;
  top: 0;
  width: 20px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.rankwellpress-table-wrapper::before {
  inset-inline-start: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
  opacity: 0;
}

.rankwellpress-table-wrapper::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, rgba(0,0,0,0.08), transparent);
  opacity: 1;
}

.rankwellpress-table-wrapper.scrolled-left::before { opacity: 1; }
.rankwellpress-table-wrapper.scrolled-right::after { opacity: 0; }

.rankwellpress-table-wrapper table,
.wp-block-table table,
.rankwellpress-single-content table,
.single-content table,
.post-content table,
.rwp-article-body table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--rw-bg-content, #ffffff);
  table-layout: auto;
  margin: 0;
}

.rankwellpress-table-wrapper table th,
.wp-block-table table th,
.rankwellpress-single-content table th,
.single-content table th,
.post-content table th,
.rwp-article-body table th {
  border: 1px solid var(--rw-border-light, #e5e7eb);
  padding: 8px 10px;
  text-align: start;
  vertical-align: middle;
  font-size: 0.8rem;
  white-space: nowrap;
  background-color: var(--rw-bg-body, #f9fafb);
  font-weight: 700;
  color: var(--rw-text-heading, #111827);
}

.rankwellpress-table-wrapper table td,
.wp-block-table table td,
.rankwellpress-single-content table td,
.single-content table td,
.post-content table td,
.rwp-article-body table td {
  border: 1px solid var(--rw-border-light, #e5e7eb);
  padding: 7px 10px;
  text-align: start;
  vertical-align: top;
  font-size: 0.8rem;
  color: var(--rw-text-body, #4b5563);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-width: 120px;
}

.rankwellpress-table-wrapper table tbody tr:nth-child(even),
.wp-block-table table tbody tr:nth-child(even) {
  background-color: var(--rw-bg-alt, #f3f4f6);
}

.rankwellpress-table-wrapper::-webkit-scrollbar { height: 6px; }
.rankwellpress-table-wrapper::-webkit-scrollbar-track { background: var(--rw-bg-alt, #f3f4f6); border-radius: 3px; }
.rankwellpress-table-wrapper::-webkit-scrollbar-thumb { background: var(--rw-border-light, #e5e7eb); border-radius: 3px; }
.rankwellpress-table-wrapper::-webkit-scrollbar-thumb:hover { background: var(--rw-text-muted, #6b7280); }

.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 768px) {
  .rankwellpress-table-wrapper,
  .wp-block-table {
    margin: 16px 0 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
  }

  .rankwellpress-table-wrapper table th,
  .rankwellpress-table-wrapper table td,
  .wp-block-table table th,
  .wp-block-table table td {
    padding: 6px 8px;
    font-size: 0.72rem;
  }
} 


/* ==========================================================================
   Post Tags — Clean Outline / No Background
   ========================================================================== */
.post-tags {
  margin-top: var(--rw-space-5, 1.5rem);
  padding-top: var(--rw-space-4, 1rem);
  border-top: 1px solid var(--rw-border-light, #e5e7eb);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rw-space-2, 0.5rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.post-tags .tag-label {
  font-weight: 700;
  font-size: 0.875rem;
  margin-inline-end: 4px;
  color: var(--rw-text-heading, #111827);
  flex-shrink: 0;
}

/* Clean Outline Tag */
.post-tags a {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--rw-text-body, #4b5563);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--rw-transition-fast, 0.2s ease);
  border: 1px solid var(--rw-border-light, #e5e7eb);
  line-height: 1.4;
  white-space: nowrap;
}

/* Hover: Fill with primary color */
.post-tags a:hover,
.post-tags a:focus-visible {
  background: var(--rw-color-primary, #0d7c3e);
  color: #ffffff;
  border-color: var(--rw-color-primary, #0d7c3e);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-tags a:focus-visible {
  outline: 2px solid var(--rw-color-primary, #0d7c3e);
  outline-offset: 2px;
}

.post-tags a:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ── Dark Mode Overrides ── */
html[data-theme="dark"] .post-tags {
  border-top-color: var(--rw-border-light, #404040);
}

html[data-theme="dark"] .post-tags .tag-label {
  color: var(--rw-text-heading, #f3f4f6);
}

html[data-theme="dark"] .post-tags a {
  background: transparent;
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .post-tags a:hover,
html[data-theme="dark"] .post-tags a:focus-visible {
  background: var(--rw-color-primary, #34d399);
  color: #0f172a;
  border-color: var(--rw-color-primary, #34d399);
}

@media (max-width: 480px) {
  .post-tags {
    gap: 6px;
  }
  
  .post-tags a {
    padding: 4px 10px;
    font-size: 0.7rem;
  }
  
  .post-tags .tag-label {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-tags a {
    transition: none !important;
    transform: none !important;
  }
}




/* ==========================================================================
   Ad Container Protection
   ========================================================================== */
.rankwellpress-ad,
.rwp-ad-inline,
.rwp-ad-zone,
.wp-block-ad,
.ad-container {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin-inline: auto;
}

.rankwellpress-ad iframe,
.rwp-ad-inline iframe,
.rwp-ad-zone iframe {
  max-width: 100%;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .rankwellpress-container { max-width: 100%; padding: 0; }
  .single-post-sidebar,
  .related-posts,
  .post-navigation,
  .post-tags,
  .share-buttons,
  .rankwellpress-ad,
  .rwp-ad-inline,
  .rwp-ad-zone,
  .hero-section,
  .hero-overlay,
  .rwp-font-adjuster { display: none; }
  .post-content,
  .single-content,
  .rankwellpress-single-content,
  .rwp-article-body { color: #000; font-size: 12pt; line-height: 1.5; }
  .post-content a:link,
  .post-content a:visited,
  .single-content a:link,
  .single-content a:visited,
  .rankwellpress-single-content a:link,
  .rankwellpress-single-content a:visited,
  .rwp-article-body a:link,
  .rwp-article-body a:visited { color: #000; text-decoration: underline; }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .single-post *,
  .single-hero-template *,
  .single-post *::before,
  .single-hero-template *::before,
  .single-post *::after,
  .single-hero-template *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Dark Mode Support — Complete Override
   ========================================================================== */
html[data-theme="dark"] {
  --rw-color-bg: #1a1a1a;
  --rw-text-body: #d1d5db;
  --rw-text-muted: #9ca3af;
  --rw-text-heading: #f3f4f6;
  --rw-bg-alt: #2d2d2d;
  --rw-border-light: #404040;
  --rw-color-accent: #1a2a44;
  --rw-color-link: #34d399;
  --rw-color-link-hover: #6ee7b7;
  --rw-text-inverse: #ffffff;
  --rw-bg-content: #1a1a1a;
  --rw-bg-body: #2d2d2d;

  .single-post-layout,
  .single-post-main,
  .single-post-sidebar,
  .post-header,
  .post-content,
  .single-content,
  .rankwellpress-single-content,
  .rwp-article-body {
    color: var(--rw-text-body, #d1d5db);
  }

  .post-title,
  .post-content h2,
  .single-content h2,
  .rankwellpress-single-content h2,
  .rwp-article-body h2,
  .post-content h3,
  .single-content h3,
  .rankwellpress-single-content h3,
  .rwp-article-body h3,
  .post-content h4,
  .single-content h4,
  .rankwellpress-single-content h4,
  .rwp-article-body h4,
  .post-content h5,
  .single-content h5,
  .rankwellpress-single-content h5,
  .rwp-article-body h5,
  .post-content h6,
  .single-content h6,
  .rankwellpress-single-content h6,
  .rwp-article-body h6,
  .rwp-author-box-header,
  .rwp-author-box-header strong {
    color: var(--rw-text-heading, #f3f4f6) !important;
  }

  .post-content p,
  .single-content p,
  .rankwellpress-single-content p,
  .rwp-article-body p,
  .post-content ul li,
  .single-content ul li,
  .rankwellpress-single-content ul li,
  .rwp-article-body ul li,
  .post-content ol li,
  .single-content ol li,
  .rankwellpress-single-content ol li,
  .rwp-article-body ol li,
  .rwp-author-info p {
    color: var(--rw-text-body, #d1d5db);
  }

  /* Links — explicit :link / :visited for dark mode */
  .post-content a:link,
  .post-content a:visited,
  .entry-content a:link,
  .entry-content a:visited,
  .single-content a:link,
  .single-content a:visited,
  .rankwellpress-single-content a:link,
  .rankwellpress-single-content a:visited,
  .rwp-article-body a:link,
  .rwp-article-body a:visited {
    color: #34d399;
  }

  .post-content a:hover,
  .post-content a:focus-visible,
  .entry-content a:hover,
  .entry-content a:focus-visible,
  .single-content a:hover,
  .single-content a:focus-visible,
  .rankwellpress-single-content a:hover,
  .rankwellpress-single-content a:focus-visible,
  .rwp-article-body a:hover,
  .rwp-article-body a:focus-visible {
    color: #6ee7b7;
  }

  .post-content a[target="_blank"]:link,
  .post-content a[target="_blank"]:visited,
  .entry-content a[target="_blank"]:link,
  .entry-content a[target="_blank"]:visited,
  .single-content a[target="_blank"]:link,
  .single-content a[target="_blank"]:visited,
  .rankwellpress-single-content a[target="_blank"]:link,
  .rankwellpress-single-content a[target="_blank"]:visited,
  .rwp-article-body a[target="_blank"]:link,
  .rwp-article-body a[target="_blank"]:visited {
    color: #34d399;
  }

  .post-content a[target="_blank"]:hover,
  .entry-content a[target="_blank"]:hover,
  .single-content a[target="_blank"]:hover,
  .rankwellpress-single-content a[target="_blank"]:hover,
  .rwp-article-body a[target="_blank"]:hover {
    color: #6ee7b7;
  }

  .rwp-font-adjuster {
    background: var(--rw-bg-alt, #2d2d2d);
  }

  .rwp-font-adjuster button {
    color: var(--rw-text-body, #d1d5db);
  }

  .rwp-font-adjuster button:hover,
  .rwp-font-adjuster button:focus-visible {
    background: #34d399;
    color: #000000;
  }

  .post-meta,
  .meta-item,
  .meta-item svg {
    color: var(--rw-text-muted, #9ca3af);
  }

  .meta-author {
    color: var(--rw-text-body, #d1d5db);
  }

  .meta-author:hover {
    color: #34d399;
  }

  .post-category-badge a {
    color: #ffffff;
  }

  .post-featured-image {
    background-color: var(--rw-bg-alt, #2d2d2d);
  }

  .featured-caption,
  .post-content figcaption,
  .single-content figcaption,
  .rankwellpress-single-content figcaption,
  .rwp-article-body figcaption,
  .post-content .wp-element-caption,
  .single-content .wp-element-caption,
  .rankwellpress-single-content .wp-element-caption,
  .rwp-article-body .wp-element-caption {
    color: var(--rw-text-muted, #9ca3af);
    background: var(--rw-bg-alt, #2d2d2d);
  }

  /* Blockquotes — dark mode */
  .post-content blockquote,
  .single-content blockquote,
  .rankwellpress-single-content blockquote,
  .rwp-article-body blockquote {
    background: #1a2332;
    border-inline-start-color: #34d399;
  }

  .post-content blockquote::before,
  .single-content blockquote::before,
  .rankwellpress-single-content blockquote::before,
  .rwp-article-body blockquote::before {
    background: linear-gradient(90deg, #34d399 0%, #6ee7b7 50%, #a7f3d0 100%);
  }

  .post-content blockquote p,
  .single-content blockquote p,
  .rankwellpress-single-content blockquote p,
  .rwp-article-body blockquote p {
    color: #d1fae5;
  }

  .post-content blockquote cite,
  .single-content blockquote cite,
  .rankwellpress-single-content blockquote cite,
  .rwp-article-body blockquote cite {
    color: #34d399;
  }

  .post-content blockquote a,
  .single-content blockquote a,
  .rankwellpress-single-content blockquote a,
  .rwp-article-body blockquote a {
    color: #34d399;
  }

  .post-content blockquote a:hover,
  .single-content blockquote a:hover,
  .rankwellpress-single-content blockquote a:hover,
  .rwp-article-body blockquote a:hover {
    color: #6ee7b7;
  }

  .rankwellpress-table-wrapper,
  .wp-block-table {
    border-color: var(--rw-border-light, #404040);
  }

  .rankwellpress-table-wrapper table,
  .wp-block-table table,
  .rankwellpress-single-content table,
  .single-content table,
  .post-content table,
  .rwp-article-body table {
    background-color: var(--rw-bg-content, #1a1a1a);
  }

  .rankwellpress-table-wrapper table th,
  .wp-block-table table th,
  .rankwellpress-single-content table th,
  .single-content table th,
  .post-content table th,
  .rwp-article-body table th {
    background-color: var(--rw-bg-body, #2d2d2d);
    color: var(--rw-text-heading, #f3f4f6);
    border-color: var(--rw-border-light, #404040);
  }

  .rankwellpress-table-wrapper table td,
  .wp-block-table table td,
  .rankwellpress-single-content table td,
  .single-content table td,
  .post-content table td,
  .rwp-article-body table td {
    color: var(--rw-text-body, #d1d5db);
    border-color: var(--rw-border-light, #404040);
  }

  .rankwellpress-table-wrapper table tbody tr:nth-child(even),
  .wp-block-table table tbody tr:nth-child(even) {
    background-color: var(--rw-bg-alt, #2d2d2d);
  }

  .post-tags {
    border-top-color: var(--rw-border-light, #404040);
  }

  .post-tags .tag-label {
    color: var(--rw-text-heading, #f3f4f6);
  }

  .post-tags a {
    background: transparent;
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.15);
  }

  .post-tags a:hover,
  .post-tags a:focus-visible {
    background: var(--rw-color-primary, #34d399);
    color: #0f172a;
    border-color: var(--rw-color-primary, #34d399);
  }

  .hero-section--no-image {
    background: linear-gradient(135deg, #1a2a44 0%, #0d1520 100%);
  }

  /* List markers — dark mode */
  .post-content ul li::before,
  .single-content ul li::before,
  .rankwellpress-single-content ul li::before,
  .rwp-article-body ul li::before {
    background-color: #34d399;
  }

  .post-content ul ul li::before,
  .single-content ul ul li::before,
  .rankwellpress-single-content ul ul li::before,
  .rwp-article-body ul ul li::before {
    background-color: transparent;
    border-color: #34d399;
  }

  /* Ordered list numbers — plain text, no background */
  .post-content ol li::before,
  .single-content ol li::before,
  .rankwellpress-single-content ol li::before,
  .rwp-article-body ol li::before {
    background: none;
    background-color: transparent;
    color: #34d399;
    border: none;
  }

  .post-content ol ol li::before,
  .single-content ol ol li::before,
  .rankwellpress-single-content ol ol li::before,
  .rwp-article-body ol ol li::before {
    background: none;
    background-color: transparent;
    color: #34d399;
    border: none;
  }

  .rankwellpress-table-wrapper::-webkit-scrollbar-track {
    background: var(--rw-bg-alt, #2d2d2d);
  }

  .rankwellpress-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--rw-border-light, #404040);
  }
}


/* ==========================================================================
   Blockquotes — Adaptive Theme Color with Curved Accent Bar
   ========================================================================== */

.post-content blockquote,
.single-content blockquote,
.rankwellpress-single-content blockquote,
.rwp-article-body blockquote {
    margin: calc(var(--rw-space-4, 1rem) * 0.5) 0;
    padding: 16px 20px 16px 24px;
    border: none;
    background: color-mix(in srgb, var(--rw-color-primary, #0d7c3e) 6%, #ffffff);
    font-style: italic;
    color: color-mix(in srgb, var(--rw-color-primary, #0d7c3e) 75%, #000000);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.post-content blockquote::after,
.single-content blockquote::after,
.rankwellpress-single-content blockquote::after,
.rwp-article-body blockquote::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--rw-color-primary, #0d7c3e);
    border-radius: 8px 0 0 8px;
}

.post-content blockquote::before,
.single-content blockquote::before,
.rankwellpress-single-content blockquote::before,
.rwp-article-body blockquote::before {
    content: none !important;
    display: none !important;
}

.post-content blockquote p,
.single-content blockquote p,
.rankwellpress-single-content blockquote p,
.rwp-article-body blockquote p {
    color: color-mix(in srgb, var(--rw-color-primary, #0d7c3e) 75%, #000000);
    margin: 0 0 8px;
    position: relative;
    z-index: 1;
}

.post-content blockquote p:last-child,
.single-content blockquote p:last-child,
.rankwellpress-single-content blockquote p:last-child,
.rwp-article-body blockquote p:last-child {
    margin-bottom: 0;
}

.post-content blockquote cite,
.single-content blockquote cite,
.rankwellpress-single-content blockquote cite,
.rwp-article-body blockquote cite {
    color: color-mix(in srgb, var(--rw-color-primary, #0d7c3e) 60%, #000000);
    font-weight: 600;
    font-style: normal;
    font-size: 0.85rem;
}

.post-content blockquote a,
.single-content blockquote a,
.rankwellpress-single-content blockquote a,
.rwp-article-body blockquote a {
    color: var(--rw-color-primary, #0d7c3e);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content blockquote a:hover,
.single-content blockquote a:hover,
.rankwellpress-single-content blockquote a:hover,
.rwp-article-body blockquote a:hover {
    color: color-mix(in srgb, var(--rw-color-primary, #0d7c3e) 75%, #000000);
}

/* ==========================================================================
   Blockquotes — Dark Mode
   ========================================================================== */

html[data-theme="dark"] .post-content blockquote,
html[data-theme="dark"] .single-content blockquote,
html[data-theme="dark"] .rankwellpress-single-content blockquote,
html[data-theme="dark"] .rwp-article-body blockquote {
    background: color-mix(in srgb, var(--rw-color-primary, #34d399) 15%, #0f172a);
    color: color-mix(in srgb, var(--rw-color-primary, #34d399) 80%, #ffffff);
}

html[data-theme="dark"] .post-content blockquote::after,
html[data-theme="dark"] .single-content blockquote::after,
html[data-theme="dark"] .rankwellpress-single-content blockquote::after,
html[data-theme="dark"] .rwp-article-body blockquote::after {
    background: var(--rw-color-primary, #34d399);
}

html[data-theme="dark"] .post-content blockquote p,
html[data-theme="dark"] .single-content blockquote p,
html[data-theme="dark"] .rankwellpress-single-content blockquote p,
html[data-theme="dark"] .rwp-article-body blockquote p {
    color: color-mix(in srgb, var(--rw-color-primary, #34d399) 80%, #ffffff);
}

html[data-theme="dark"] .post-content blockquote cite,
html[data-theme="dark"] .single-content blockquote cite,
html[data-theme="dark"] .rankwellpress-single-content blockquote cite,
html[data-theme="dark"] .rwp-article-body blockquote cite {
    color: color-mix(in srgb, var(--rw-color-primary, #34d399) 70%, #ffffff);
}

html[data-theme="dark"] .post-content blockquote a,
html[data-theme="dark"] .single-content blockquote a,
html[data-theme="dark"] .rankwellpress-single-content blockquote a,
html[data-theme="dark"] .rwp-article-body blockquote a {
    color: var(--rw-color-primary, #34d399);
}

html[data-theme="dark"] .post-content blockquote a:hover,
html[data-theme="dark"] .single-content blockquote a:hover,
html[data-theme="dark"] .rankwellpress-single-content blockquote a:hover,
html[data-theme="dark"] .rwp-article-body blockquote a:hover {
    color: color-mix(in srgb, var(--rw-color-primary, #34d399) 70%, #ffffff);
}

/* ==========================================================================
   Blockquotes — Mobile
   ========================================================================== */

@media (max-width: 768px) {
    .post-content blockquote,
    .single-content blockquote,
    .rankwellpress-single-content blockquote,
    .rwp-article-body blockquote {
        padding: 12px 16px 12px 20px;
        margin: 16px 0;
        border-radius: 6px;
    }

    .post-content blockquote::after,
    .single-content blockquote::after,
    .rankwellpress-single-content blockquote::after,
    .rwp-article-body blockquote::after {
        border-radius: 6px 0 0 6px;
    }
}



/* ==========================================================================
   Content Visibility for Performance
   ========================================================================== */
.related-posts,
.post-navigation,
.comments-area {
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
  .clearfix::after {
    content: '';
    display: table;
    clear: both;
  }
}

/* ==========================================================================
 * Post Meta — Always One Line (Fluid Scaling)
 * ========================================================================== */
.post-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(4px, 0.8vw, 8px);
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    font-size: clamp(0.65rem, 1.4vw, 0.875rem);
    color: var(--rw-text-muted, #6b7280);
    box-sizing: border-box;
    line-height: 1.4;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    font-size: clamp(0.65rem, 1.4vw, 0.875rem);
    line-height: 1.4;
}

.meta-item svg {
    flex-shrink: 0;
    width: clamp(12px, 1.5vw, 14px);
    height: clamp(12px, 1.5vw, 14px);
    color: var(--rw-text-muted, #6b7280);
}

.meta-separator {
    flex-shrink: 0;
    font-size: clamp(0.5rem, 0.8vw, 0.75rem);
    color: #9ca3af;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    margin: 0 1px;
}

.meta-author {
    overflow: hidden;
}

.meta-author-link {
    color: var(--rw-text-body, #4b5563);
    text-decoration: none;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.meta-author-link:hover,
.meta-author-link:focus-visible {
    color: var(--rw-color-primary, #0d7c3e);
    outline: 2px solid var(--rw-color-primary, #0d7c3e);
    outline-offset: 2px;
    border-radius: 2px;
}

.meta-date time,
.meta-modified-date time,
.meta-reading-time span {
    white-space: nowrap;
}

.meta-comments a {
    color: var(--rw-text-muted, #6b7280);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.meta-comments a:hover,
.meta-comments a:focus-visible {
    color: var(--rw-color-primary, #0d7c3e);
    outline: 2px solid var(--rw-color-primary, #0d7c3e);
    outline-offset: 2px;
    border-radius: 2px;
}

.meta-read-aloud {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.meta-read-aloud .rwp-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: clamp(3px, 0.8vw, 6px) clamp(6px, 1.2vw, 10px);
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    white-space: nowrap;
    margin: 0;
}

html[data-theme="dark"] .post-meta {
    color: #94a3b8;
}

html[data-theme="dark"] .meta-item svg {
    color: #94a3b8;
}

html[data-theme="dark"] .meta-separator {
    color: #64748b;
}

html[data-theme="dark"] .meta-author-link {
    color: #e2e8f0;
}

html[data-theme="dark"] .meta-author-link:hover,
html[data-theme="dark"] .meta-author-link:focus-visible {
    color: #34d399;
    outline-color: #34d399;
}

html[data-theme="dark"] .meta-comments a {
    color: #94a3b8;
}

html[data-theme="dark"] .meta-comments a:hover,
html[data-theme="dark"] .meta-comments a:focus-visible {
    color: #34d399;
    outline-color: #34d399;
}

.hero-meta .post-meta {
    color: rgba(255, 255, 255, 0.9);
}

.hero-meta .meta-item svg {
    color: rgba(255, 255, 255, 0.7);
}

.hero-meta .meta-separator {
    color: rgba(255, 255, 255, 0.5);
}

.hero-meta .meta-author-link {
    color: #ffffff;
}

.hero-meta .meta-author-link:hover,
.hero-meta .meta-author-link:focus-visible {
    color: #34d399;
    outline-color: #34d399;
}

.hero-meta .meta-comments a {
    color: rgba(255, 255, 255, 0.9);
}

.hero-meta .meta-comments a:hover,
.hero-meta .meta-comments a:focus-visible {
    color: #34d399;
    outline-color: #34d399;
}

@media (max-width: 480px) {
    .post-meta {
        gap: clamp(3px, 0.5vw, 5px);
    }
    
    .meta-item {
        gap: 3px;
    }
    
    .meta-item svg {
        width: clamp(10px, 1vw, 12px);
        height: clamp(10px, 1vw, 12px);
    }
    
    .meta-separator {
        font-size: 0.5rem;
        margin: 0;
    }
}

@media (max-width: 360px) {
    .post-meta {
        gap: 3px;
    }
    
    .meta-item {
        gap: 2px;
    }
    
    .meta-read-aloud .rwp-read-btn {
        padding: 3px 5px;
        font-size: 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-meta,
    .meta-item,
    .meta-author-link,
    .meta-comments a,
    .meta-read-aloud .rwp-read-btn {
        transition: none !important;
    }
}

.post-meta .meta-by-label {
    color: var(--rw-text-muted, #6b7280);
    font-weight: 400;
    font-size: 0.85em;
}

.post-meta .meta-author-link {
    font-weight: 600;
}




/* ── Meta row: comment icon ── */
.meta-item.meta-comments a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s ease;
}

.meta-item.meta-comments a:hover,
.meta-item.meta-comments a:focus-visible {
    color: var(--rw-color-primary, #0d7c3e);
    outline: 2px solid var(--rw-color-primary, #0d7c3e);
    outline-offset: 2px;
    border-radius: 2px;
}

.meta-item.meta-comments svg {
    flex-shrink: 0;
    width: clamp(12px, 1.5vw, 14px);
    height: clamp(12px, 1.5vw, 14px);
    stroke: currentColor;
    vertical-align: middle;
}

html[data-theme="dark"] .meta-item.meta-comments a {
    color: #94a3b8;
}

html[data-theme="dark"] .meta-item.meta-comments a:hover {
    color: #34d399;
}