/* Restyles the old WordPress (GeneratePress) blog pages to match the new design.
   Loaded by the Worker on WordPress pages only. */
:root { --ink: #161616; --ink-2: #444; --muted: #666; --rule: #e5e5e5; --accent: #0f766e; --accent-2: #5eb5ab; }

body { background: #fff !important; color: var(--ink); font-family: "IBM Plex Sans", system-ui, sans-serif !important; font-size: 17px; line-height: 1.65; }
em, i, cite { font-style: normal; }

/* New header (injected) */
.sp-hd { border-top: 4px solid var(--accent); border-bottom: 1px solid #ddd; background: #fff; }
.sp-hd .sp-w { max-width: 1160px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 16px; flex-wrap: wrap; }
.sp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; color: var(--ink) !important; }
.sp-hd nav { display: flex; gap: 22px; flex-wrap: wrap; }
.sp-hd nav a { text-decoration: none; color: var(--ink) !important; font-size: 16px; }
.sp-hd nav a:hover { color: var(--accent) !important; }
@media (max-width: 600px) { .sp-hd .sp-w { padding-top: 10px; padding-bottom: 10px; } .sp-hd nav { gap: 14px; } .sp-hd nav a { font-size: 14px; } }

/* Page frame */
.site.grid-container, .site-footer .gb-inside-container { max-width: 1160px !important; }
.one-container .site-content { padding: 28px 24px 40px !important; }
.separate-containers .inside-article, .one-container .container { background: #fff !important; }

/* Breadcrumbs */
.rank-math-breadcrumb { font-size: 14px; margin-bottom: 8px; }
.rank-math-breadcrumb a { color: var(--accent) !important; }

/* Titles: headline font for the page title only */
h1, h1.gb-headline, h1.entry-title, .page-title {
  font-family: "Libre Caslon Text", Georgia, serif !important; font-weight: 700 !important;
  font-size: 44px !important; line-height: 1.12 !important; letter-spacing: -.01em; color: var(--ink) !important;
}
@media (max-width: 600px) { h1, h1.gb-headline, h1.entry-title, .page-title { font-size: 32px !important; } }
.gb-headline:not(h1):not(h2):not(h3) { color: var(--muted) !important; font-size: 14px; }

/* Body text */
.entry-content { color: var(--ink); }
.entry-content p, .entry-content li { color: var(--ink); }
.entry-content h2 { font-family: inherit !important; font-size: 26px !important; font-weight: 600 !important; margin: 44px 0 10px; padding-top: 16px; border-top: 2px solid var(--ink); line-height: 1.25; color: var(--ink) !important; }
.entry-content h3 { font-family: inherit !important; font-size: 20px !important; font-weight: 600 !important; color: var(--ink) !important; }
.entry-content h4 { font-family: inherit !important; font-size: 17px !important; font-weight: 600 !important; }
.entry-content a, .inside-right-sidebar a, .site-main a { color: var(--accent); }
.entry-content a:hover { color: #0b5d57; }
.entry-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--ink-2); font-style: normal; }
.entry-content table { border-collapse: collapse; }
.entry-content th, .entry-content td { border-color: var(--rule) !important; }

/* Table of contents box */
#ez-toc-container { background: #fff !important; border: 0 !important; border-top: 2px solid var(--accent) !important; border-bottom: 1px solid #ccc !important; border-radius: 0 !important; box-shadow: none !important; padding: 12px 0 !important; width: 100% !important; }
#ez-toc-container a { color: var(--accent) !important; }
#ez-toc-container .ez-toc-title { font-weight: 600 !important; }

/* Buttons (GenerateBlocks / AAWP) */
.gb-button, .wp-block-button__link { background: var(--accent) !important; color: #fff !important; border-radius: 4px !important; }
.aawp .aawp-button--buy, .aawp-button--amazon { border-radius: 4px !important; }

/* Sidebar */
.inside-right-sidebar .widget { background: #fff !important; padding: 0 0 20px !important; border-top: 2px solid var(--ink); }
.inside-right-sidebar .widget-title, .inside-right-sidebar h2 { font-family: inherit !important; font-size: 16px !important; font-weight: 600 !important; margin: 14px 0 10px !important; color: var(--ink) !important; }
.inside-right-sidebar a { text-decoration: none; }

/* Footer */
.site-footer, .site-footer .gb-container { background: #fff !important; color: var(--muted) !important; }
.site-footer { border-top: 1px solid #ddd; }
.site-footer .gb-headline { color: var(--ink) !important; }
.site-footer p, .site-footer .gb-headline-text { font-size: 14px !important; }
.site-footer a { color: var(--muted) !important; }
.site-info { background: #fff !important; color: var(--muted) !important; border-top: 1px solid var(--rule); font-size: 14px; }

/* Post titles in lists (category and archive pages) */
h2.entry-title, h2.gb-headline, .wp-show-posts-entry-title { font-family: inherit !important; font-size: 21px !important; font-weight: 600 !important; line-height: 1.3 !important; letter-spacing: 0 !important; }
h2.entry-title a, h2.gb-headline a, .wp-show-posts-entry-title a { color: var(--ink) !important; text-decoration: none; }
h2.entry-title a:hover, h2.gb-headline a:hover, .wp-show-posts-entry-title a:hover { color: var(--accent) !important; }

/* Contents box: hide the collapse toggle */
#ez-toc-container .ez-toc-title-toggle, #ez-toc-container input[type="checkbox"], #ez-toc-container .ez-toc-icon-toggle-span { display: none !important; }

/* Title block lines up with the text */
.rank-math-breadcrumb + .gb-container > .gb-inside-container { padding-left: 0 !important; padding-right: 0 !important; }

/* Pinterest-style title graphics inside posts */
.entry-content .wp-block-image:has(img[src*="-PIN"]), .entry-content .wp-block-image:has(img[data-lazy-src*="-PIN"]),
.entry-content figure:has(img[src*="-PIN"]), .entry-content figure:has(img[data-lazy-src*="-PIN"]) { display: none !important; }

/* Category and archive pages: a plain list of titles */
.archive .page-header { margin-bottom: 8px; }
.archive .generate-columns-container, .blog .generate-columns-container { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.archive article.generate-columns, .blog article.generate-columns { width: 100% !important; float: none !important; padding: 0 !important; margin: 0 !important; border-bottom: 1px solid var(--rule); }
.archive article .inside-article, .blog article .inside-article { padding: 14px 0 !important; background: none !important; }
.archive h2.entry-title, .blog h2.entry-title { font-size: 18px !important; margin: 0 !important; }
.archive .entry-summary:empty, .archive .entry-meta { display: none; }
@media (max-width: 760px) { .archive .generate-columns-container, .blog .generate-columns-container { grid-template-columns: minmax(0, 1fr); } }

/* Sidebar list without thumbnails */
#right-sidebar ul { margin: 0; padding: 0; list-style: none; }
#right-sidebar li { padding: 10px 0 !important; border-bottom: 1px solid var(--rule); margin: 0 !important; }
#right-sidebar .rpwwt-post-title { margin: 0 !important; }

/* Plain pages (About, Contact, Privacy) */
.page .entry-header { margin-bottom: 12px; }
.page .inside-article { padding: 28px 0 !important; }
.page .entry-content { max-width: 760px; }

/* Category title spans the full width above the list */
.generate-columns-container > .page-header { grid-column: 1 / -1; padding: 0 0 12px !important; margin: 0 0 4px !important; border-bottom: 2px solid var(--accent); background: none !important; }
.generate-columns-container > .page-header .page-title { margin: 0 !important; }

/* Footer: plain text links and icons */
.site-footer .gb-button { background: none !important; color: var(--muted) !important; padding: 0 6px !important; border: 0 !important; font-size: 14px !important; text-decoration: underline; }
.site-footer .gb-button:hover { color: var(--accent) !important; }
.site-footer .gb-button .gb-icon, .site-footer .gb-button svg { color: var(--ink) !important; fill: currentColor !important; }
.site-footer .gb-container { padding-top: 16px !important; padding-bottom: 16px !important; }

/* Less empty space around the footer */
.site-footer .gb-container-8ea0a712, .site-footer > .gb-container { padding-top: 24px !important; padding-bottom: 24px !important; min-height: 0 !important; }
.site-footer .gb-grid-wrapper { row-gap: 16px !important; }
