/* Affiliate Editorial Pro — premium, conversion-optimized advertorial
   Pairs with templates/affiliate-editorial-pro.html (body.aep) */

:root {
  --aep-bg: #f6f7f9;
  --aep-paper: #ffffff;
  --aep-ink: #14181f;
  --aep-body: #2b313b;
  --aep-muted: #6a7280;
  --aep-line: #e7e9ee;
  --aep-soft: #f3f5f8;

  /* Accent (override per offer with --aep-accent in a small inline style if wanted) */
  --aep-accent: #1f7a4d;
  --aep-accent-2: #2fa468;
  --aep-accent-ink: #0f3d27;
  --aep-cta: #1f9d57;
  --aep-cta-hover: #167a43;
  --aep-gold: #c79a3a;

  --aep-radius: 16px;
  --aep-radius-sm: 10px;
  --aep-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
  --aep-shadow-lg: 0 8px 24px rgba(16, 24, 40, .10), 0 24px 60px rgba(16, 24, 40, .14);

  --aep-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --aep-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;

  --aep-max: 760px;
  --aep-wide: 1140px;
}

* { box-sizing: border-box; }

body.aep {
  margin: 0;
  font-family: var(--aep-sans);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 164, 104, .06), transparent 60%),
    var(--aep-bg);
  color: var(--aep-body);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--aep-accent); }

/* ---------- top bars ---------- */
.aep-disclosure {
  background: #11151c;
  color: #aab2bd;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 16px;
}

.aep-stickytop {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--aep-line);
  transition: box-shadow .2s ease;
}
.aep-stickytop.is-stuck { box-shadow: 0 6px 20px rgba(16, 24, 40, .08); }
.aep-stickytop-inner {
  max-width: var(--aep-wide);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.aep-brandmark {
  font-family: var(--aep-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--aep-ink);
}
.aep-brandmark small {
  display: block;
  font-family: var(--aep-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aep-muted);
}
.aep-toplink {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.aep-stickytop.is-stuck .aep-toplink {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------- layout ---------- */
.aep-wrap {
  max-width: var(--aep-wide);
  margin: 0 auto;
  padding: 0 20px;
}
.aep-grid {
  display: block;
  max-width: var(--aep-wide);
  margin: 28px auto 0;
  padding: 0 20px;
}
@media (min-width: 980px) {
  .aep-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
  }
}

.aep-article {
  background: var(--aep-paper);
  border: 1px solid var(--aep-line);
  border-radius: var(--aep-radius);
  box-shadow: var(--aep-shadow);
  padding: 28px 22px 36px;
  max-width: var(--aep-max);
  margin: 0 auto;
}
@media (min-width: 980px) {
  .aep-article { padding: 44px 52px 52px; margin: 0; }
}

/* ---------- hero ---------- */
.aep-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--aep-muted);
  margin-bottom: 16px;
}
.aep-pill {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
}
.aep-pill-cat { color: var(--aep-accent-ink); background: rgba(47, 164, 104, .14); }
.aep-pill-sponsor { color: #6a7280; background: var(--aep-soft); }

.aep-article h1 {
  font-family: var(--aep-serif);
  font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--aep-ink);
  margin: 0 0 16px;
}
.aep-lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.55;
  color: #3a414d;
  margin: 0 0 22px;
}
.aep-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--aep-muted);
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--aep-line);
}
.aep-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aep-accent-2), var(--aep-accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

/* trust row */
.aep-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin: 20px 0 8px;
  font-size: 13.5px;
  color: var(--aep-body);
}
.aep-trust .aep-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.aep-trust svg { width: 17px; height: 17px; flex-shrink: 0; }
.aep-stars { color: var(--aep-gold); letter-spacing: 1px; font-size: 15px; }
.aep-rating-num { font-weight: 700; color: var(--aep-ink); }

/* ---------- body copy ---------- */
.aep-body { font-size: 1.06rem; }
.aep-body p { margin: 0 0 1.15em; }
.aep-body p:last-child { margin-bottom: 0; }
.aep-body h2 {
  font-family: var(--aep-serif);
  font-size: 1.55rem;
  letter-spacing: -.01em;
  color: var(--aep-ink);
  margin: 1.8em 0 .6em;
}

.aep-figure { margin: 26px 0; text-align: center; }
.aep-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--aep-radius);
  border: 1px solid var(--aep-line);
  box-shadow: var(--aep-shadow);
}
.aep-caption { font-size: 13px; color: var(--aep-muted); margin-top: 10px; font-style: italic; }

/* ---------- how it works ---------- */
.aep-steps {
  margin: 34px 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 620px) { .aep-steps { grid-template-columns: repeat(3, 1fr); } }
.aep-step {
  background: var(--aep-soft);
  border: 1px solid var(--aep-line);
  border-radius: var(--aep-radius-sm);
  padding: 18px 16px;
}
.aep-step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--aep-accent);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  margin-bottom: 10px;
  font-size: 15px;
}
.aep-step h3 { margin: 0 0 4px; font-size: 1.02rem; color: var(--aep-ink); }
.aep-step p { margin: 0; font-size: 14.5px; color: var(--aep-muted); line-height: 1.55; }

/* ---------- benefits ---------- */
.aep-benefits {
  margin: 30px 0;
  padding: 26px 24px;
  background: linear-gradient(180deg, #fff, #fbfdfb);
  border: 1px solid var(--aep-line);
  border-radius: var(--aep-radius);
}
.aep-benefits h2 { font-family: var(--aep-serif); margin: 0 0 14px; font-size: 1.45rem; color: var(--aep-ink); }
.aep-benefits ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .aep-benefits ul { grid-template-columns: 1fr 1fr; } }
.aep-benefits li {
  position: relative;
  padding-left: 32px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--aep-body);
}
.aep-benefits li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--aep-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ---------- CTA ---------- */
.aep-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  background: linear-gradient(180deg, var(--aep-cta), var(--aep-cta-hover));
  color: #fff !important;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(31, 157, 87, .32);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.aep-cta:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31, 157, 87, .4); }
.aep-cta:active { transform: translateY(0); }
.aep-cta-lg { width: 100%; padding: 18px 28px; font-size: 18px; }
.aep-cta-micro { display: block; margin-top: 10px; font-size: 12.5px; color: var(--aep-muted); }

.aep-callout {
  margin: 30px 0;
  padding: 22px 24px;
  border-radius: var(--aep-radius);
  background: linear-gradient(135deg, rgba(47,164,104,.10), rgba(47,164,104,.03));
  border: 1px solid rgba(47, 164, 104, .25);
  text-align: center;
}
.aep-callout .aep-callout-kicker {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--aep-accent-ink); margin-bottom: 6px;
}
.aep-callout p { margin: 0 0 14px; font-size: 16.5px; color: var(--aep-ink); }

/* ---------- offer box (centerpiece) ---------- */
.aep-offerbox {
  margin: 36px 0;
  border: 2px solid var(--aep-accent);
  border-radius: var(--aep-radius);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(47,164,104,.08), transparent 55%),
    var(--aep-paper);
  box-shadow: var(--aep-shadow-lg);
  overflow: hidden;
  text-align: center;
}
.aep-offerbox-head {
  background: var(--aep-accent);
  color: #fff;
  padding: 9px 16px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.aep-offerbox-body { padding: 26px 24px 28px; }
.aep-offerbox h3 { font-family: var(--aep-serif); margin: 0 0 6px; font-size: 1.5rem; color: var(--aep-ink); }
.aep-price {
  display: flex; align-items: baseline; justify-content: center; gap: 12px;
  margin: 14px 0 4px;
}
.aep-price-now { font-size: 2.6rem; font-weight: 800; color: var(--aep-ink); letter-spacing: -.02em; }
.aep-price-was { font-size: 1.2rem; color: var(--aep-muted); text-decoration: line-through; }
.aep-price-save {
  display: inline-block; margin: 4px 0 16px;
  font-size: 13px; font-weight: 700; color: var(--aep-accent-ink);
  background: rgba(47,164,104,.14); padding: 4px 12px; border-radius: 999px;
}
.aep-offerbox .aep-mini-note { font-size: 13px; color: var(--aep-muted); margin: 6px 0 0; }
.aep-tier-list { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; font-size: 14.5px; }
.aep-tier-list li { padding: 12px 14px; border: 1px solid var(--aep-line); border-radius: var(--aep-radius-sm); margin-bottom: 8px; }
.aep-tier-list li.is-best { border-color: var(--aep-accent); background: rgba(47,164,104,.06); }
.aep-tier-list .aep-tier-tag { float: right; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--aep-accent-ink); }

/* ---------- guarantee ---------- */
.aep-guarantee {
  display: flex; gap: 18px; align-items: center;
  margin: 30px 0;
  padding: 22px 24px;
  border: 1px dashed var(--aep-accent);
  border-radius: var(--aep-radius);
  background: #fbfefb;
}
.aep-guarantee-badge {
  width: 76px; height: 76px; flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--aep-accent-2), var(--aep-accent));
  color: #fff;
  display: grid; place-items: center; text-align: center;
  font-weight: 800; line-height: 1.05;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 8px 18px rgba(31,122,77,.3);
}
.aep-guarantee-badge b { font-size: 1.4rem; display: block; }
.aep-guarantee-badge span { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.aep-guarantee h3 { margin: 0 0 5px; font-size: 1.15rem; color: var(--aep-ink); }
.aep-guarantee p { margin: 0; font-size: 14.5px; color: var(--aep-muted); }

/* ---------- FAQ ---------- */
.aep-faq { margin: 34px 0; }
.aep-faq h2 { font-family: var(--aep-serif); font-size: 1.5rem; color: var(--aep-ink); margin: 0 0 14px; }
.aep-faq details {
  border: 1px solid var(--aep-line);
  border-radius: var(--aep-radius-sm);
  padding: 0 18px;
  margin-bottom: 10px;
  background: var(--aep-paper);
  transition: border-color .15s ease;
}
.aep-faq details[open] { border-color: var(--aep-accent); }
.aep-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  color: var(--aep-ink);
  font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.aep-faq summary::-webkit-details-marker { display: none; }
.aep-faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 24px;
  color: var(--aep-accent);
  transition: transform .2s ease;
}
.aep-faq details[open] summary::after { transform: rotate(45deg); }
.aep-faq details p { margin: 0 0 16px; color: var(--aep-body); font-size: 15.5px; }

/* ---------- testimonials (optional, only if supplied) ---------- */
.aep-quotes { margin: 32px 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .aep-quotes { grid-template-columns: 1fr 1fr; } }
.aep-quote { background: var(--aep-soft); border: 1px solid var(--aep-line); border-radius: var(--aep-radius-sm); padding: 18px 20px; }
.aep-quote p { margin: 0 0 10px; font-style: italic; color: var(--aep-body); }
.aep-quote cite { font-style: normal; font-weight: 700; font-size: 14px; color: var(--aep-ink); }

/* ---------- final CTA ---------- */
.aep-finalcta {
  margin: 36px 0 0;
  text-align: center;
  padding: 34px 24px;
  border-radius: var(--aep-radius);
  color: #fff;
  background: linear-gradient(135deg, var(--aep-accent), var(--aep-accent-ink));
  box-shadow: var(--aep-shadow-lg);
}
.aep-finalcta h2 { font-family: var(--aep-serif); margin: 0 0 8px; font-size: 1.6rem; color: #fff; }
.aep-finalcta p { margin: 0 0 18px; opacity: .9; font-size: 15.5px; }
.aep-finalcta .aep-cta { background: #fff; color: var(--aep-accent-ink) !important; box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.aep-finalcta .aep-cta:hover { filter: none; background: #f3fbf6; }
.aep-finalcta .aep-cta-micro { color: rgba(255,255,255,.85); }

/* ---------- sidebar ---------- */
.aep-sidebar { display: none; }
@media (min-width: 980px) {
  .aep-sidebar { display: block; position: sticky; top: 84px; }
}
.aep-side-card {
  background: var(--aep-paper);
  border: 1px solid var(--aep-line);
  border-radius: var(--aep-radius);
  box-shadow: var(--aep-shadow);
  padding: 22px 20px;
  text-align: center;
}
.aep-side-card img { max-width: 100%; border-radius: var(--aep-radius-sm); margin-bottom: 14px; }
.aep-side-card h3 { font-family: var(--aep-serif); margin: 0 0 6px; font-size: 1.2rem; color: var(--aep-ink); }
.aep-side-proof { font-size: 13px; color: var(--aep-accent-ink); font-weight: 700; margin: 6px 0 14px; }

/* ---------- sticky bottom bar ---------- */
.aep-stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--aep-line);
  box-shadow: 0 -6px 24px rgba(16,24,40,.1);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  transform: translateY(110%);
  transition: transform .25s ease;
}
.aep-stickybar.is-on { transform: none; }
.aep-stickybar-info { text-align: left; min-width: 0; }
.aep-stickybar-info strong { display: block; font-size: 14px; color: var(--aep-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aep-stickybar-info span { font-size: 12px; color: var(--aep-muted); }
.aep-stickybar .aep-cta { padding: 12px 22px; font-size: 15px; flex-shrink: 0; }
@media (min-width: 980px) { .aep-stickybar { display: none; } }
body.aep { padding-bottom: 0; }
@media (max-width: 979px) { body.aep.has-stickybar { padding-bottom: 76px; } }

/* ---------- footer ---------- */
.aep-footer {
  max-width: var(--aep-wide);
  margin: 40px auto 0;
  padding: 28px 20px 60px;
  font-size: 12.5px;
  color: var(--aep-muted);
  text-align: center;
  line-height: 1.6;
}
.aep-footer a { color: var(--aep-muted); }

.lxry-post-purchase--highlight { box-shadow: 0 0 0 3px rgba(31, 157, 87, .35); }
