.amt-roundup-template {
  --amt-text: #2b211d;
  --amt-muted: #6e625d;
  --amt-border: #e7ddd8;
  --amt-border-soft: #efe7e2;
  --amt-accent: #b63504;
  --amt-accent-hover: #fc4903;
  --amt-soft: #fdf8f5;
  --amt-soft-2: #fcfaf8;
  color: var(--amt-text);
}

.amt-roundup-template .amt-roundup-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 34px 20px 56px;
}

.amt-roundup-template .amt-roundup-title {
  font-size: clamp(2.15rem, 4vw, 3.3rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.amt-roundup-template .amt-roundup-byline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--amt-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.amt-roundup-template .amt-roundup-intro {
  font-size: 1.04rem;
  line-height: 1.68;
  margin: 0 0 18px;
}

.amt-roundup-template .amt-roundup-disclosure,
.amt-roundup-template .amt-supplement-specs {
  background: var(--amt-soft-2);
  border: 1px solid var(--amt-border);
  border-radius: 12px;
  padding: 14px 17px;
  margin: 20px 0;
}

.amt-roundup-template .amt-roundup-toc,
.amt-roundup-template .amt-top-picks-block {
  display: block !important;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--amt-border-soft);
  border-bottom: 1px solid var(--amt-border-soft);
  border-radius: 0;
  padding: 14px 0;
  margin: 14px 0 0;
}

.amt-roundup-template .amt-roundup-toc h2,
.amt-roundup-template .amt-top-picks-block h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amt-muted);
}

.amt-roundup-template .amt-roundup-toc ul,
.amt-roundup-template .amt-top-picks-block ul {
  margin: 0;
  padding-left: 18px;
}

.amt-roundup-template .amt-roundup-toc li,
.amt-roundup-template .amt-top-picks-block li {
  margin-bottom: 5px;
}

.amt-roundup-template .amt-roundup-toc a {
  color: var(--amt-text);
  text-decoration: none;
}

.amt-roundup-template .amt-roundup-toc a:hover {
  color: var(--amt-accent);
}

.amt-roundup-template .amt-top-picks-block strong {
  color: #7a2f14;
}

.amt-roundup-template .amt-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.amt-roundup-template .amt-roundup-content {
  font-size: 18px;
  line-height: 1.68;
  margin-top: 22px;
}

.amt-roundup-template .amt-roundup-content h2,
.amt-roundup-template .amt-roundup-content h3,
.amt-roundup-template .amt-roundup-content h4 {
  line-height: 1.14;
  margin-top: 1.45em;
  margin-bottom: 0.42em;
}

.amt-roundup-template .amt-roundup-content h2 {
  font-size: clamp(1.55rem, 2.2vw, 2rem);
}

.amt-roundup-template .amt-roundup-content h3 {
  font-size: clamp(1.28rem, 1.8vw, 1.58rem);
}

.amt-roundup-template .amt-roundup-content p,
.amt-roundup-template .amt-roundup-content ul,
.amt-roundup-template .amt-roundup-content ol {
  margin: 0 0 8px;
}

.amt-roundup-template .amt-roundup-content li {
  margin-bottom: 4px;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-block p,
.amt-roundup-template .amt-roundup-content .amt-product-review-block ul,
.amt-roundup-template .amt-roundup-content .amt-product-review-block ol {
  margin: 0 0 8px;
}

.amt-roundup-template .amt-roundup-content img {
  max-width: 100%;
  height: auto;
}

.amt-roundup-template .amt-roundup-content > h3 {
  padding-top: 14px;
  border-top: 1px solid var(--amt-border-soft);
}

.amt-roundup-template .amt-roundup-content > h3 + p {
  margin-top: 2px;
}

.amt-roundup-template .amt-roundup-content .amt-cta-button {
  margin-top: 0;
}

.amt-roundup-template .amt-roundup-grid {
  display: grid;
  gap: 20px;
}

.amt-roundup-template .amt-roundup-card,
.amt-roundup-template .amt-product-card {
  border: 1px solid var(--amt-border);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}

.amt-roundup-template .amt-comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--amt-border);
  border-radius: 14px;
  background: #fff;
  margin: 20px 0 10px;
  box-shadow: 0 8px 20px rgba(28, 20, 17, 0.055);
}

.amt-roundup-template .amt-comparison-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.amt-roundup-template .amt-comparison-table th,
.amt-roundup-template .amt-comparison-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--amt-border-soft);
  vertical-align: top;
}

.amt-roundup-template .amt-comparison-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amt-muted);
  background: linear-gradient(180deg, #fdf8f5 0%, #f7ede8 100%);
  white-space: nowrap;
}

.amt-roundup-template .amt-comparison-table tbody tr:nth-child(even) {
  background: var(--amt-soft-2);
}

.amt-roundup-template .amt-comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.amt-roundup-template .amt-comparison-table td:first-child {
  font-weight: 700;
  min-width: 240px;
}

.amt-roundup-template .amt-comparison-table td:last-child {
  color: #7a2f14;
  font-weight: 600;
}

.amt-roundup-template .amt-comparison-table a {
  color: var(--amt-text);
  text-decoration: none;
}

.amt-roundup-template .amt-comparison-table a:hover {
  color: var(--amt-accent);
}

.amt-roundup-template .amt-affiliate-disclosure {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--amt-border-soft);
  color: var(--amt-muted);
  font-size: 13px;
  line-height: 1.58;
}

.amt-roundup-template .amt-product-card-title {
  margin-top: 0;
  margin-bottom: 12px;
}

.amt-roundup-template .amt-cta-button {
  display: inline-block;
  background: var(--amt-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 4px;
  line-height: 1.15;
  transition: background-color .2s ease, transform .2s ease;
}

.amt-roundup-template .amt-cta-button:hover {
  background: var(--amt-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.amt-roundup-template .amt-related-roundups {
  margin-top: 44px;
}

@media (max-width: 768px) {
  .amt-roundup-template .amt-roundup-shell {
    padding: 28px 16px 44px;
  }

  .amt-roundup-template .amt-roundup-content {
    font-size: 17px;
    line-height: 1.68;
    margin-top: 24px;
  }

  .amt-roundup-template .amt-comparison-table {
    min-width: 680px;
  }

  .amt-roundup-template .amt-cta-button {
    width: 100%;
    text-align: center;
  }
}


/* Local prototype safeguard: neutralize sticky/fixed footer behavior inside roundup views */
.amt-roundup-template + #footer-outer,
body.post-type-archive-amt_roundup #footer-outer,
body.single-amt_roundup #footer-outer,
body.single-amt_supplement #footer-outer {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  transform: none !important;
}

body.single-amt_roundup #footer-outer[data-midnight="light"],
body.single-amt_supplement #footer-outer[data-midnight="light"] {
  position: relative !important;
}

.amt-roundup-template .amt-author-bio {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--amt-border-soft);
}

.amt-roundup-template .amt-author-bio-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amt-muted);
}

.amt-roundup-template .amt-author-bio-layout {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 720px;
}

.amt-roundup-template .amt-author-bio-media {
  width: 40px;
  padding-top: 1px;
}

.amt-roundup-template .amt-author-bio-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

.amt-roundup-template .amt-author-bio-content {
  min-width: 0;
}

.amt-roundup-template .amt-author-bio-name {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.amt-roundup-template .amt-author-bio-title {
  margin: 1px 0 8px;
  color: var(--amt-muted);
  font-weight: 500;
  font-size: 0.94rem;
  line-height: 1.3;
}

.amt-roundup-template .amt-author-bio-text {
  font-size: 15px;
  line-height: 1.68;
  color: var(--amt-text);
}

.amt-roundup-template .amt-author-bio-text p {
  margin-bottom: 0.75em;
}

.amt-roundup-template .amt-author-bio-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .amt-roundup-template .amt-author-bio-layout {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .amt-roundup-template .amt-author-bio-media,
  .amt-roundup-template .amt-author-bio-avatar {
    width: 36px;
    height: 36px;
  }

  .amt-roundup-template .amt-author-bio-text {
    font-size: 14px;
    line-height: 1.62;
  }
}


.amt-roundup-template .amt-product-review-block {
  margin: 0 0 34px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--amt-border-soft);
}

.amt-roundup-template .amt-product-review-block:last-of-type {
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: 0;
}

.amt-roundup-template .amt-product-review-wrap {
  display: block;
  overflow: hidden;
  margin-bottom: 0;
}

.amt-roundup-template .amt-product-review-image {
  width: 36%;
  max-width: 240px;
  min-width: 168px;
  height: auto;
  border-radius: 10px;
  display: block;
}

.amt-roundup-template .amt-product-review-image--right {
  float: right;
  margin: 0 0 8px 18px;
}

.amt-roundup-template .amt-product-review-block h3 {
  margin: 0 0 8px;
}

.amt-roundup-template .amt-product-review-wrap p:first-child {
  margin-top: 0;
}

.amt-roundup-template .amt-product-review-wrap > *:last-child {
  margin-bottom: 0;
}

.amt-roundup-template .amt-product-review-wrap p,
.amt-roundup-template .amt-product-review-wrap ul,
.amt-roundup-template .amt-product-review-wrap ol {
  margin: 0 0 8px;
}

.amt-roundup-template .amt-product-review-wrap p:last-child,
.amt-roundup-template .amt-product-review-wrap ul:last-child,
.amt-roundup-template .amt-product-review-wrap ol:last-child {
  margin-bottom: 0;
}

.amt-roundup-template .amt-product-review-cta-row,
.amt-roundup-template .amt-product-review-cta-row--clear,
.amt-roundup-template p.amt-product-review-cta-row {
  clear: both;
  display: block;
  margin: 4px 0 0 !important;
  padding: 0;
  line-height: 1.1;
}

@media (max-width: 768px) {
  .amt-roundup-template .amt-product-review-image,
  .amt-roundup-template .amt-product-review-image--right {
    float: none;
    width: 100%;
    max-width: 240px;
    min-width: 0;
    margin: 0 0 14px 0;
  }
}


.amt-roundup-template .amt-product-review-image-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.amt-roundup-template .amt-product-review-image-link:hover img {
  opacity: 0.96;
}


.amt-roundup-template .amt-roundup-header {
  margin-bottom: 12px;
}

.amt-roundup-template .amt-roundup-toc-inner p,
.amt-roundup-template .amt-top-picks-inner p {
  margin: 0 0 6px;
}

.amt-roundup-template .amt-roundup-toc-inner ul,
.amt-roundup-template .amt-top-picks-inner ul {
  margin: 0;
  padding-left: 18px;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-block {
  margin: 0 0 34px;
  padding: 0 0 30px;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-block h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-wrap {
  margin-bottom: 0;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-wrap > *:last-child {
  margin-bottom: 0;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-cta-row,
.amt-roundup-template .amt-roundup-content p.amt-product-review-cta-row {
  margin: 4px 0 0 !important;
  padding: 0;
  line-height: 1.1;
}

.amt-roundup-template .amt-roundup-content .amt-product-review-cta-row .amt-cta-button {
  margin-top: 0 !important;
}


.amt-roundup-template .amt-roundup-module-force-visible {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.amt-roundup-template .amt-product-review-wrap + .amt-product-review-cta-row,
.amt-roundup-template .amt-product-review-wrap + p.amt-product-review-cta-row,
.amt-roundup-template .amt-product-review-block > .amt-product-review-cta-row,
.amt-roundup-template .amt-product-review-block > p.amt-product-review-cta-row {
  margin-top: 2px !important;
}

.amt-roundup-template .amt-product-review-block .amt-cta-button {
  margin-top: 0 !important;
}


/* =============================================
   ROUNDUP ENTRY BLOCKS — matched to SwitchbackTravel reference
   
   SBT computed values (from live DevTools audit):
   - H2 category: 30px / 700 / mb 10px / lh 36px
   - H3 product:  24px / 700 / mb 10px / lh 34px
   - Specs/facts:  18px / lh 28px (same as body)
   - Body p:       18px / lh 28px / mb 20px
   - Image wrapper: ~50% (392px of 790px) / float right / margin 0 0 0 5px / padding 10px
   - CTA:          inline-block / bg #b63503 / 18px bold / padding 7px 13px / mt 10px / no clear
   - Content width: 790px
   
   Theme culprits neutralized:
   - skin-material.css → p { padding-bottom: 1.5em } = 27px
   - salient-dynamic-styles.css → h3 { font-size: 24px }
   - amt-roundups.css → .amt-roundup-content h3/h4 { margin-top: 1.45em }
   ============================================= */

.amt-roundup-template .amt-roundup-content .amt-roundup-entry {
  margin: 0 0 30px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--amt-border-soft);
  background: transparent;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry:last-of-type {
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: 0;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry__inner {
  max-width: 820px;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry * {
  box-sizing: border-box;
}

/* Kill ALL inherited padding/margin on block elements inside entries.
   skin-material.css sets p { padding-bottom: 1.5em } = 27px — must use !important. */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry h3,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry h4,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry p,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry figure,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .wp-block-image,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .wp-block-buttons {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
}

/* Category heading — SBT: 30px / 700 / mb 10px / lh 36px */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__category {
  margin: 0 0 4px !important;
  font-size: 30px !important;
  line-height: 36px !important;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Product title — SBT: 24px / 700 / mb 10px / lh 34px */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__title {
  margin: 0 0 10px !important;
  font-size: 24px !important;
  line-height: 34px !important;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry__rank,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry__product,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry__price {
  display: inline;
}

/* Facts block — SBT specs use same font as body: 18px / lh 28px */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__facts {
  margin: 0 0 20px !important;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__facts p,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__fact {
  margin: 0 0 1px !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 28px !important;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__content {
  display: block;
}

/* Image — SBT: ~50% of 790px. We use 42% + smaller max for a more polished look.
   Image now appears right after the title heading (before facts),
   so facts + body text wrap to the left of it — matching SBT layout. */
.amt-roundup-template .amt-roundup-content article.amt-roundup-entry figure.amt-roundup-entry__figure,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__figure,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry figure {
  float: right !important;
  width: 42% !important;
  max-width: 340px !important;
  margin: 0 0 8px 20px !important;
  padding: 6px !important;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry__image,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry__image-link img {
  display: block;
  width: 100%;
  height: auto;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry__image-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Body text — SBT: 18px / lh 28px (1.556) / mb 20px */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__body {
  font-size: 18px;
  line-height: 28px;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__body p,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry p {
  margin: 0 0 20px !important;
  padding: 0 !important;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__body > *:last-child {
  margin-bottom: 0 !important;
}

/* CTA — SBT: inline-block / mt 10px / NO clear:both (sits in text flow) */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__cta-group {
  display: block;
  margin-top: 10px !important;
  padding: 0 !important;
}

.amt-roundup-template .amt-roundup-content .amt-roundup-entry__cta,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .nectar-button,
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-cta-button {
  display: inline-block;
  margin: 0 8px 8px 0 !important;
  white-space: nowrap;
}

/* Clearfix only on the entry itself, not the CTA group */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 900px) {
  .amt-roundup-template .amt-roundup-content article.amt-roundup-entry figure.amt-roundup-entry__figure,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__figure,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry figure {
    width: 40% !important;
    max-width: 300px !important;
  }
}

@media (max-width: 768px) {
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry {
    margin-bottom: 26px;
    padding-bottom: 20px;
  }

  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__category {
    margin-bottom: 4px !important;
    font-size: clamp(1.46rem, 5vw, 1.9rem) !important;
    line-height: 1.2 !important;
  }

  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__title {
    font-size: clamp(1.16rem, 4vw, 1.45rem) !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
  }

  .amt-roundup-template .amt-roundup-content article.amt-roundup-entry figure.amt-roundup-entry__figure,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__figure,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry figure {
    float: none !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
  }

  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__body p,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry p {
    margin-bottom: 16px !important;
  }
}

@media (max-width: 560px) {
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__fact,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__body {
    font-size: 16px;
    line-height: 25px;
  }

  .amt-roundup-template .amt-roundup-content .amt-roundup-entry__cta,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .nectar-button,
  .amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-cta-button {
    white-space: normal;
  }
}

/* Product title affiliate link — inherits heading style, underlines on hover */
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__product-link {
  color: inherit !important;
  text-decoration: none !important;
}
.amt-roundup-template .amt-roundup-content .amt-roundup-entry .amt-roundup-entry__product-link:hover {
  text-decoration: underline !important;
}
