:root {
  --hdpr-navy: #052847;
  --hdpr-blue: #084378;
  --hdpr-text: #344250;
  --hdpr-muted: #667482;
  --hdpr-line: #e2eaf1;
  --hdpr-soft: #f5f8fb;
  --hdpr-white: #fff;
  --hdpr-radius: 18px;
  --hdpr-shadow: 0 10px 28px rgba(5, 40, 71, .07);
}

/* Global readability */
body {
  text-rendering: optimizeLegibility;
}
.content-area {
  min-width: 0;
}
.entry-content {
  color: var(--hdpr-text);
}
.entry-content p,
.entry-content li {
  line-height: 1.72;
}
.entry-content a:not(.button):not(.amz-button):not(.hdpr-product-cta-button):not(.hdpr-guide-card__link) {
  text-underline-offset: .15em;
  text-decoration-thickness: .08em;
}

/* Header */
.site-header-wrap .site-branding a {
  text-decoration: none;
}
.main-navigation .primary-menu-container > ul > li > a {
  font-weight: 700;
}

/* Parent context */
.hdpr-parent-context {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--hdpr-muted);
  font-size: 14px;
}
.hdpr-parent-context a {
  color: var(--hdpr-blue);
  font-weight: 700;
  text-decoration: none;
}

/* Homepage */
.hdpr-homepage .content-area,
.hdpr-homepage .site-main,
.hdpr-homepage .entry-content-wrap {
  width: 100%;
  max-width: none;
}
.hdpr-homepage .entry-content > h2:first-child {
  max-width: 900px;
  margin-top: 0;
  color: var(--hdpr-navy);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.hdpr-homepage .entry-content > p {
  max-width: 850px;
  font-size: 18px;
}
.hdpr-homepage .entry-content > h2:not(:first-child) {
  margin-top: 58px;
  padding-bottom: 13px;
  border-bottom: 2px solid var(--hdpr-line);
  color: var(--hdpr-navy);
  letter-spacing: -.025em;
}
.hdpr-homepage .entry-content > ul.wp-block-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  list-style: none;
}
.hdpr-homepage .entry-content > ul.wp-block-list > li {
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 43px;
  border: 1px solid var(--hdpr-line);
  border-radius: 16px;
  background: var(--hdpr-white);
  box-shadow: 0 8px 22px rgba(5,40,71,.05);
}
.hdpr-homepage .entry-content > ul.wp-block-list > li::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hdpr-navy);
}

/* Native guide grid */
.hdpr-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 24px 0 44px;
}
.hdpr-guide-card {
  min-width: 0;
  border: 1px solid var(--hdpr-line);
  border-left: 5px solid var(--hdpr-navy);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: var(--hdpr-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hdpr-guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(5,40,71,.12);
}
.hdpr-guide-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
}
.hdpr-guide-card__media {
  display: flex;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  background: var(--hdpr-soft);
  overflow: hidden;
}
.hdpr-guide-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hdpr-guide-card__placeholder {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--hdpr-navy);
  color: #fff;
  font-weight: 800;
}
.hdpr-guide-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}
.hdpr-guide-card__eyebrow {
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf3f8;
  color: var(--hdpr-navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hdpr-guide-card__title {
  color: var(--hdpr-navy);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}
.hdpr-guide-card__excerpt {
  margin-top: 12px;
  color: var(--hdpr-muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.hdpr-guide-card__cta {
  margin-top: auto;
  padding-top: 18px;
  color: var(--hdpr-blue);
  font-size: 14px;
  font-weight: 800;
}

/* Review/money page compatibility */
.hdpr-money-page .entry-content {
  max-width: 860px;
}
.hdpr-money-page .entry-content h2 {
  scroll-margin-top: 120px;
}
.hdpr-money-page .entry-content h3 {
  scroll-margin-top: 120px;
}
.hdpr-money-page .wp-block-image img {
  border-radius: 16px;
}

/* Amazon buttons - Growth Engine remains authoritative */
.amz-button {
  box-sizing: border-box;
  max-width: 320px;
  min-height: 48px;
  padding: 12px 22px !important;
  line-height: 1.25 !important;
}

/* Growth Engine Kadence compatibility */
.entry-content .hdpr-affiliate-note,
.entry-content .hdpr-ai-answer-box,
.entry-content .hdpr-product-cta-box,
.entry-content .hdpr-growth-toc,
.entry-content .hdpr-smart-link-box,
.entry-content .hdpr-hub-guides-box {
  box-sizing: border-box;
  max-width: 100%;
}
.entry-content .hdpr-product-cta-list,
.entry-content .hdpr-growth-toc-list {
  padding-left: 0;
}
.hdpr-has-growth-disclosure .entry-footer,
.hdpr-has-growth-disclosure .after-entry {
  /* Growth Engine already renders the primary affiliate disclosure. */
}

/* Tables */
.entry-content .wp-block-table {
  border: 1px solid var(--hdpr-line);
  border-radius: 16px;
  overflow: hidden;
}
.entry-content .wp-block-table table {
  margin: 0;
}
.entry-content .wp-block-table th {
  background: var(--hdpr-navy);
  color: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hdpr-line);
}
.site-footer a {
  text-underline-offset: .14em;
}

@media (max-width: 1024px) {
  .hdpr-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hdpr-homepage .entry-content > ul.wp-block-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hdpr-guide-grid,
  .hdpr-homepage .entry-content > ul.wp-block-list {
    grid-template-columns: 1fr;
  }
  .hdpr-guide-grid {
    gap: 16px;
  }
  .hdpr-guide-card__body {
    padding: 19px;
  }
  .hdpr-homepage .entry-content > p {
    font-size: 16.5px;
  }
  .hdpr-money-page .entry-content {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
 * v1.1.0 layout system
 * Homepage = wide editorial hub
 * Hub pages = wide resource pages
 * Money pages = focused 920px review layout
 * Posts = narrower reading layout
 * ======================================================= */

/* Remove Kadence's page-title hero on the homepage. */
.hdpr-homepage .entry-hero,
.hdpr-homepage .page-hero-section,
.hdpr-homepage .kadence-page-title,
.hdpr-homepage .entry-header.page-title,
.hdpr-homepage #inner-wrap > .entry-hero-container {
  display: none !important;
}

/* Remove the generic article-card treatment from the homepage. */
.hdpr-homepage #primary,
.hdpr-homepage .content-area,
.hdpr-homepage .site-main,
.hdpr-homepage .content-container,
.hdpr-homepage .entry,
.hdpr-homepage .entry-content-wrap,
.hdpr-homepage .entry-content {
  width: 100%;
  max-width: none !important;
}
.hdpr-homepage .content-container,
.hdpr-homepage .site-container,
.hdpr-homepage .site-main {
  padding-left: 0;
  padding-right: 0;
}
.hdpr-homepage .entry,
.hdpr-homepage .entry-content-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.hdpr-homepage .entry-content {
  max-width: 1200px !important;
  margin-right: auto;
  margin-left: auto;
  padding: clamp(34px, 5vw, 72px) clamp(20px, 4vw, 42px) 72px;
}
.hdpr-homepage .entry-content > h2:first-child {
  max-width: 920px;
}
.hdpr-homepage .entry-content > p {
  max-width: 880px;
}

/* Hub pages use a wide resource-center layout. */
.hdpr-hub-page #primary,
.hdpr-hub-page .content-area,
.hdpr-hub-page .site-main,
.hdpr-hub-page .content-container {
  width: 100%;
  max-width: none !important;
}
.hdpr-hub-page .content-container {
  grid-template-columns: minmax(0, 1fr) !important;
}
.hdpr-hub-page .entry-content-wrap {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}
.hdpr-hub-page .entry-content {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

/* Money pages: no sidebar and a comfortable roundup width. */
.hdpr-money-page #primary,
.hdpr-money-page .content-area,
.hdpr-money-page .site-main,
.hdpr-money-page .content-container {
  width: 100%;
  max-width: none !important;
}
.hdpr-money-page .content-container {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
}
.hdpr-money-page #secondary,
.hdpr-money-page .primary-sidebar,
.hdpr-money-page .widget-area.sidebar-primary {
  display: none !important;
}
.hdpr-money-page .entry,
.hdpr-money-page .entry-content-wrap {
  width: 100%;
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}
.hdpr-money-page .entry-content {
  width: 100%;
  max-width: 920px !important;
  margin-right: auto;
  margin-left: auto;
}

/* Keep informational posts focused and readable. */
.single-post:not(.hdpr-money-page) .entry-content {
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
}

/* Product imagery: large enough to evaluate, never dominant. */
.hdpr-money-page .entry-content figure.wp-block-image,
.hdpr-money-page .entry-content .wp-block-image {
  margin-top: 24px;
  margin-bottom: 18px;
  text-align: center;
}
.hdpr-money-page .entry-content .wp-block-image img,
.hdpr-money-page .entry-content img.aligncenter {
  display: block;
  width: auto;
  max-width: min(100%, 640px);
  max-height: 540px;
  margin-right: auto;
  margin-left: auto;
  object-fit: contain;
}

/* Better spacing for long roundup product sections. */
.hdpr-money-page .entry-content h2 {
  margin-top: clamp(46px, 7vw, 76px);
}
.hdpr-money-page .entry-content h3 {
  margin-top: clamp(38px, 6vw, 62px);
}
.hdpr-money-page .entry-content h4 {
  margin-top: 28px;
  margin-bottom: 10px;
}

/* Growth Engine blocks should use the full review width. */
.hdpr-money-page .hdpr-affiliate-note,
.hdpr-money-page .hdpr-ai-answer-box,
.hdpr-money-page .hdpr-product-cta-box,
.hdpr-money-page .hdpr-growth-toc,
.hdpr-money-page .hdpr-smart-link-box,
.hdpr-money-page .hdpr-hub-guides-box {
  width: 100%;
  max-width: 920px !important;
  margin-right: auto;
  margin-left: auto;
}
.hdpr-money-page .hdpr-product-cta-grid,
.hdpr-money-page .hdpr-top-picks-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Keep wide tables useful without compressing text. */
.hdpr-money-page .wp-block-table {
  width: 100%;
}
.hdpr-money-page .wp-block-table table {
  width: 100%;
  table-layout: auto;
}
.hdpr-money-page .wp-block-table th,
.hdpr-money-page .wp-block-table td {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

/* Slightly stronger branding in the Kadence header. */
.site-header .custom-logo {
  width: auto;
  max-height: 58px;
}

@media (max-width: 1024px) {
  .hdpr-homepage .entry-content,
  .hdpr-hub-page .entry-content-wrap,
  .hdpr-money-page .entry-content-wrap {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 767px) {
  .hdpr-homepage .entry-content {
    padding-top: 34px;
    padding-right: 18px;
    padding-left: 18px;
  }
  .hdpr-homepage .entry-content > h2:first-child {
    font-size: clamp(34px, 11vw, 46px);
  }
  .hdpr-homepage .entry-content > ul.wp-block-list,
  .hdpr-guide-grid,
  .hdpr-money-page .hdpr-product-cta-grid,
  .hdpr-money-page .hdpr-top-picks-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .hdpr-money-page .entry-content-wrap,
  .hdpr-hub-page .entry-content-wrap {
    padding-right: 16px;
    padding-left: 16px;
  }
  .hdpr-money-page .entry-content .wp-block-image img,
  .hdpr-money-page .entry-content img.aligncenter {
    max-height: 430px;
  }
  .hdpr-money-page .wp-block-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hdpr-money-page .wp-block-table table {
    min-width: 720px;
  }
}

/* =======================================================
 * v1.2.0 — Automatic homepage guide sections
 * ======================================================= */
.hdpr-homepage .hdpr-home-grid-injected {
  margin: 22px 0 54px;
}

.hdpr-homepage .hdpr-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

.hdpr-homepage .hdpr-guide-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(5, 40, 71, 0.07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hdpr-homepage .hdpr-guide-card:hover {
  transform: translateY(-4px);
  border-color: #c9d7e4;
  box-shadow: 0 16px 34px rgba(5, 40, 71, 0.12);
}

.hdpr-homepage .hdpr-guide-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
}

.hdpr-homepage .hdpr-guide-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #edf3f8, #f8fafc);
}

.hdpr-homepage .hdpr-guide-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.hdpr-homepage .hdpr-guide-card:hover .hdpr-guide-card__media img {
  transform: scale(1.025);
}

.hdpr-homepage .hdpr-guide-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #052847;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .08em;
  background:
    radial-gradient(circle at 78% 22%, rgba(8, 67, 120, .12), transparent 28%),
    linear-gradient(145deg, #edf3f8, #f8fafc);
}

.hdpr-homepage .hdpr-guide-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

.hdpr-homepage .hdpr-guide-card__eyebrow {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf3f8;
  color: #052847;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.hdpr-homepage .hdpr-guide-card__title {
  color: #052847;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.hdpr-homepage .hdpr-guide-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 11px;
  color: #52606e;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hdpr-homepage .hdpr-guide-card__cta {
  margin-top: auto;
  padding-top: 18px;
  color: #084378;
  font-size: 14px;
  font-weight: 800;
}

.hdpr-homepage .hdpr-home-section-more {
  margin: 16px 0 0;
  text-align: right;
}

.hdpr-homepage .hdpr-home-section-more a {
  color: #084378;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

/* Remove obsolete empty Mai containers if Mai markup remains in saved content. */
.hdpr-homepage .mai-grid:empty,
.hdpr-homepage .mai-grid .entries-wrap:empty {
  display: none !important;
}

.hdpr-homepage .entry-content > h2:not(:first-child) {
  margin-top: 58px;
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .hdpr-homepage .hdpr-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hdpr-homepage .hdpr-guide-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .hdpr-homepage .hdpr-home-grid-injected {
    margin-bottom: 44px;
  }
  .hdpr-homepage .hdpr-home-section-more {
    text-align: left;
  }
}


/* =======================================================
 * v1.3.0 — Polished parent hub pages
 * ======================================================= */

/* Parent hubs are resource pages, not oversized article cards. */
.hdpr-hub-page .entry,
.hdpr-hub-page .entry-content-wrap,
.hdpr-hub-page .entry-content {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hdpr-hub-page .entry-content-wrap {
  padding-top: clamp(36px, 5vw, 68px);
  padding-bottom: clamp(48px, 6vw, 82px);
}

.hdpr-hub-page .entry-content {
  max-width: 1120px !important;
}

/* Reduce Kadence's category title banner height. */
.hdpr-hub-page .entry-hero-container-inner,
.hdpr-hub-page .entry-hero,
.hdpr-hub-page .page-hero-section,
.hdpr-hub-page .kadence-page-title {
  min-height: 0 !important;
}

.hdpr-hub-page .entry-hero-container-inner,
.hdpr-hub-page .entry-hero .entry-header,
.hdpr-hub-page .page-hero-section .entry-header,
.hdpr-hub-page .kadence-page-title .entry-header {
  padding-top: clamp(28px, 4vw, 48px) !important;
  padding-bottom: clamp(28px, 4vw, 48px) !important;
}

/* Growth Engine's plain hub list is redundant when Kadence renders cards. */
.hdpr-hub-page .hdpr-hub-guides-box {
  display: none !important;
}

.hdpr-hub-guide-section {
  margin-top: clamp(48px, 7vw, 78px);
  padding-top: 4px;
}

.hdpr-hub-guide-section > h2 {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--hdpr-line);
  color: var(--hdpr-navy);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.hdpr-hub-guide-intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--hdpr-muted);
  font-size: 16.5px;
}

.hdpr-hub-page .hdpr-hub-guide-section .hdpr-guide-grid {
  margin-top: 28px;
  margin-bottom: 0;
}

/* Keep card summaries compact on a large directory. */
.hdpr-hub-page .hdpr-guide-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 767px) {
  .hdpr-hub-page .entry-content-wrap {
    padding-top: 30px;
    padding-bottom: 54px;
  }

  .hdpr-hub-guide-section {
    margin-top: 44px;
  }

  .hdpr-hub-guide-section > h2 {
    font-size: 28px;
  }
}

/* =========================================================
 * v1.4.0 — Hub guide load-more controls
 * All guide links remain in the HTML for crawlability. JavaScript only
 * controls progressive display for readers.
 * ======================================================= */
.hdpr-js .hdpr-guide-card--load-more {
  display: none;
}
.hdpr-guide-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: -14px 0 48px;
}
.hdpr-guide-load-more {
  appearance: none;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--hdpr-navy);
  border-radius: 999px;
  background: var(--hdpr-navy);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 40, 71, .16);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.hdpr-guide-load-more:hover,
.hdpr-guide-load-more:focus-visible {
  background: var(--hdpr-blue);
  border-color: var(--hdpr-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(5, 40, 71, .22);
}
.hdpr-guide-load-more:focus-visible {
  outline: 3px solid rgba(8, 67, 120, .24);
  outline-offset: 3px;
}
.hdpr-guide-load-more__count {
  font-weight: 700;
  opacity: .82;
}

@media (max-width: 767px) {
  .hdpr-guide-load-more {
    width: min(100%, 290px);
  }
}
