/* ===================================================
   AFFILIATE TOOLS - PREMIUM STYLES
   =================================================== */

:root{
  --bg:#ffffff;
  --bg2:#f4faf6;
  --text:#102016;
  --muted:#4a5c52;
  --line:rgba(16,32,22,.12);

  /* Matches the Sales Page Greens */
  --green:#15803d; 
  --green2:#0a3a20; 
  --mint:#e8f6ec;

  --card:#ffffff;
  --radius:18px;
  --shadow:0 14px 34px rgba(0,0,0,.08);

  --w:1220px;

  /* spacing scale */
  --s1:10px;
  --s2:14px;
  --s3:18px;
  --s4:24px;
  --s5:32px;
  --s6:42px;
}

/* Base */
*{ box-sizing:border-box; }
html,body{ height:100%; }

/* GLOBAL FONT UPDATE TO LATO */
body.aff-page, h1, h2, h3, h4, p, div, span, li, a, input, button, textarea, pre {
  font-family: 'Lato', sans-serif !important;
}

body.aff-page{
  margin:0;
  color:var(--text);
  background:var(--bg);
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img{ max-width:100%; display:block; height:auto; }
a{ color:inherit; }

.aff-wrap{
  max-width:var(--w);
  margin:0 auto;
  padding:0 18px;
}

/* ===============================
   PREMIUM HEADER (Topbar)
================================= */
.aff-topbar{
  position:sticky;
  top:0;
  z-index:60;
  background: linear-gradient(180deg, var(--green2) 0%, #062a14 100%);
  border-bottom: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

.aff-toprow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding: 18px 0;
}

.aff-brand-title{
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:12px;
  color: rgba(255,255,255,.80);
  margin-bottom: 6px;
}

.aff-brand-sub{
  font-weight:900;
  letter-spacing:-.02em;
  font-size:28px;
  line-height:1.05;
  color:#ffffff;
}

.aff-top-actions .aff-btn{
  border-color: rgba(255,255,255,.20);
  background: rgba(255,255,255,.08);
  color:#fff;
  box-shadow:none;
}

.aff-top-actions .aff-btn:hover{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
}

@media (max-width:520px){
  .aff-toprow{ padding: 14px 0; }
  .aff-brand-sub{ font-size:22px; }
}

.aff-top-actions{ display:flex; gap:10px; align-items:center; }

/* ===============================
   GLOBAL BUTTONS
================================= */
.aff-btn{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:11px 15px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  font-size:12px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .08s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}
.aff-btn:active{ transform:translateY(1px); }

/* Solid Yellow Button (Matches Sales Page) */
.aff-btn-solid {
  background: linear-gradient(180deg, #ffe83a, #ffd400);
  color: #0b2c14 !important;
  border-color: #d4b400;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.aff-btn-solid:hover {
  filter: brightness(1.05);
}

.aff-btn-primary{
  background:linear-gradient(180deg, var(--green), var(--green2));
  border-color:rgba(0,0,0,.05);
  color:#fff;
}
.aff-btn-primary:hover{ filter:brightness(1.04); }

.aff-btn-ghost:hover{
  background:rgba(21,128,61,.06);
  border-color:rgba(21,128,61,.22);
}

.aff-btn-small{
  padding:10px 13px;
  font-size:11.5px;
}
.aff-btn.is-copied{
  background:var(--green2);
  border-color:var(--green2);
  color:#fff;
}

/* Headings + text */
.aff-h1{
  font-weight:900;
  letter-spacing:-.03em;
  font-size:clamp(28px, 2.8vw, 44px);
  line-height:1.1;
  margin:10px 0 10px;
}
.aff-h2{
  font-weight:900;
  letter-spacing:-.02em;
  font-size:clamp(20px, 2vw, 28px);
  line-height:1.18;
  margin:0 0 14px;
}
.aff-h3{
  font-weight:800;
  letter-spacing:-.01em;
  font-size:18px;
  line-height:1.2;
  margin:0 0 10px;
}
.aff-h4{
  font-weight:800;
  font-size:16px;
  line-height:1.2;
  margin:0 0 10px;
}

.aff-p{ margin:0 0 18px; color:var(--text); font-size:16px; line-height:1.65; }
.aff-lead{ margin:0 0 26px; font-size:17px; line-height:24px; color:var(--text); max-width:72ch; }
.aff-note{ margin:12px 0 0; font-size:14px; line-height:18px; color:var(--muted); max-width:86ch; }
.aff-muted-center{ text-align:center; color:var(--muted); font-weight:700; font-size:14px; margin-top:12px; }
.aff-center{ text-align:center; }
.aff-max{ max-width:78ch; margin-left:auto; margin-right:auto; }

/* Cards */
.aff-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
}
.aff-divider{ height:1px; background:var(--line); margin:22px 0; border-radius:999px; }

/* Section headers (clean green bar) */
.aff-section-head{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin:0 0 16px; padding:14px 16px; border-radius:16px;
  border:1px solid rgba(21,128,61,.20);
  background:linear-gradient(180deg, rgba(21,128,61,.16), rgba(21,128,61,.08));
}
.aff-section-title{ font-weight:800; letter-spacing:.03em; text-transform:uppercase; margin:0; font-size:14px; color: var(--green); }
.aff-section{ padding:var(--s6) 0; }
.aff-section-soft{ background:var(--bg2); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }

/* Hero */
.aff-hero{
  padding:var(--s5) 0 var(--s3);
  background: radial-gradient(1200px 380px at 50% 0%, rgba(21,128,61,.10), transparent 70%), linear-gradient(180deg, #ffffff, #ffffff);
}
.aff-hero-grid{ display:grid; grid-template-columns:1.2fr .8fr; gap:32px; align-items:stretch; }
@media (max-width:980px){ .aff-hero-grid{ grid-template-columns:1fr; } }

.aff-pill-row{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.aff-pill{
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px;
  border-radius:999px; border:1px solid rgba(21,128,61,.18);
  background:rgba(21,128,61,.08); font-weight:800; font-size:13px; color:var(--text);
}

.aff-card-hero{ padding:36px; }
.aff-card-media{ padding:0; overflow:hidden; display: flex; align-items: center; justify-content: center;}

.aff-media{ padding:16px; display:flex; align-items:center; justify-content:center; }
.aff-media img{ width:100%; border-radius:16px; border:1px solid var(--line); background:#fff; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

/* Two-column grid */
.aff-grid-2{ display:grid; grid-template-columns:1.1fr .9fr; gap:24px; align-items:stretch; }
@media (max-width:980px){ .aff-grid-2{ grid-template-columns:1fr; } }

/* Slab */
.aff-slab{ background:linear-gradient(180deg, rgba(21,128,61,.14), rgba(21,128,61,.06)); border-color:rgba(21,128,61,.20); }
.aff-slab-eyebrow{ font-weight:800; letter-spacing:.03em; text-transform:uppercase; font-size:13px; color:var(--text); opacity:.95; margin-bottom:10px; }
.aff-list{ margin:0; padding-left:18px; }
.aff-list li{ margin:8px 0; }
.aff-highlight{ margin-top:14px; border-radius:16px; padding:14px; text-align:center; background:rgba(21,128,61,.14); border:1px solid rgba(21,128,61,.22); }
.aff-highlight-strong{ font-weight:800; letter-spacing:.03em; text-transform:uppercase; margin-bottom:6px; color: var(--green); }

/* Checklist */
.aff-checklist{ display:grid; gap:12px; }
.aff-check{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px 20px; font-weight:700; font-size: 16px;}

/* ===============================
   TABS & SCROLLABLE MOBILE MENU
================================= */
.aff-tabs{ margin-top:var(--s5); }

/* Modern, mobile-friendly horizontal scrolling tabs */
.aff-tabbar{
  display:flex;
  flex-wrap:nowrap;
  gap:10px;
  padding:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none; /* Firefox */
}
.aff-tabbar::-webkit-scrollbar { display:none; } /* Safari and Chrome */

.aff-tabbtn{
  flex: 0 0 auto;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:12px 18px;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
  font-size:13px;
  cursor:pointer;
  transition: all 0.2s ease;
}
.aff-tabbtn.is-active,
.aff-tabbtn[aria-selected="true"]{
  background:linear-gradient(180deg, var(--green), var(--green2));
  color:#fff;
  border-color:rgba(0,0,0,.06);
  box-shadow: 0 4px 10px rgba(21,128,61,.3);
}
.aff-tabpanes{ margin-top:24px; }
.aff-pane{ display:none; }
.aff-pane.is-active{ display:block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.aff-pane-head{ margin-bottom:20px; }

/* Asset cards grid */
.aff-cards-3{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px; }
@media (max-width:980px){ .aff-cards-3{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:640px){ .aff-cards-3{ grid-template-columns:1fr; } }
.aff-cards-1{ display:grid; grid-template-columns:1fr; gap:18px; }

.aff-asset{ padding:0; overflow:hidden; }
.aff-asset-media{
  padding:24px;
  background:linear-gradient(180deg, rgba(21,128,61,.08), rgba(21,128,61,.03));
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
}
.aff-asset-media img{ border-radius:16px; border:1px solid var(--line); background:#fff; width:100%; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.aff-asset-meta{ padding:16px 20px 20px; }
.aff-asset-title{ font-weight:800; letter-spacing:.03em; text-transform:uppercase; font-size:14px; }
.aff-asset-sub{ margin-top:6px; font-size:14px; line-height:18px; color:var(--muted); font-weight: 500;}

/* Banner specific */
.aff-banner img{ object-fit:contain; }
.aff-cta-row{ display:flex; justify-content:center; margin-top:24px; }

/* Keywords */
.aff-k-head{ font-weight:800; letter-spacing:.03em; text-transform:uppercase; margin-bottom:14px; font-size:14px; color: var(--green); }
.aff-k-grid{ display:flex; flex-wrap:wrap; gap:10px; }
.aff-k{ display:inline-flex; align-items:center; padding:10px 14px; border-radius:999px; border:1px solid var(--line); background:#f9fafb; font-weight:700; font-size:14px; color:var(--text); transition: background 0.2s; }
.aff-k:hover { background: #fff; border-color: var(--green); cursor: default; }

/* ===============================
   NEW: CLEAN EMAIL SWIPE BOXES
================================= */
.aff-swipe-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:24px; }
@media (max-width:980px){ .aff-swipe-grid{ grid-template-columns:1fr; } }
.aff-swipe{ padding:24px; }
.aff-swipe-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.aff-swipe-title{ font-weight:800; letter-spacing:.03em; text-transform:uppercase; font-size:14px; color: var(--green); }
.aff-swipe-subject{ color:#111; font-size:15px; margin-bottom:16px; line-height:1.4; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* The actual swipe container - looks like an email/paper now! */
.aff-swipe-box{
  margin:0;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#f9fafb; /* Light Grey Paper look */
  color:#1f2937; /* Dark readable text */
  padding:20px;
  font-size:15px;
  line-height:1.7;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  max-height:520px;
  font-family: 'Lato', sans-serif;
}

/* Tables */
.aff-table{ width:100%; border-collapse:separate; border-spacing:0; overflow:hidden; border-radius:18px; border:1px solid var(--line); background:#fff; box-shadow:var(--shadow); }
.aff-table thead th{ text-align:left; padding:16px; background:linear-gradient(180deg, rgba(21,128,61,.18), rgba(21,128,61,.08)); border-bottom:1px solid var(--line); font-weight:800; font-size:14px; color: var(--green2); }
.aff-table tbody td{ padding:16px; border-bottom:1px solid rgba(16,32,22,.08); vertical-align:top; font-size:15px; font-weight: 500; }
.aff-table tbody tr:last-child td{ border-bottom:none; }

/* Mini cards in strategy grid */
.aff-mini-card{ padding:24px; }

/* ===============================
   PREMIUM DARK FOOTER
================================= */
.aff-footer{ background:#1e1f22; padding:60px 0 50px; border-top:none; text-align:center; }
.aff-footer .aff-wrap{ max-width:900px; margin:0 auto; }
.aff-legal{ margin:0 0 18px; color:#d6d6d6; font-size:14px; line-height:1.7; }
.aff-footer-links{ display:flex; justify-content:center; align-items:center; gap:18px; flex-wrap:wrap; margin-top:20px; }
.aff-footer-links a{ color:#ffffff; font-weight:700; font-size:14px; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.25); transition:opacity .2s ease, border-color .2s ease; }
.aff-footer-links a:hover{ opacity:.8; border-color:#ffffff; }
.aff-dot{ color:#777; }
.aff-copy{ margin-top:22px; color:#9a9a9a; font-size:13px; font-weight:500; letter-spacing:.3px; }

/* ============================
   Hoplink Builder UI
============================ */
.aff-hop-builder{
  margin-top:20px;
  background: #f9fafb;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 18px;
}

.aff-field-label{
  display:block;
  font-weight:800;
  font-size:13px;
  color:var(--text);
  margin-bottom:10px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.aff-input{
  width:100%;
  padding:16px 20px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-family:inherit;
  font-size:16px;
  line-height:1.2;
  transition:border-color .2s ease, box-shadow .2s ease;
  font-weight: 700;
}
.aff-input:focus{ outline:none; border-color:rgba(21,128,61,.55); box-shadow:0 0 0 4px rgba(21,128,61,.14); }

.aff-code-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.aff-codeinput{
  flex:1 1 400px;
  border-radius:999px;
  border:2px solid var(--green);
  background:#fff;
  color:var(--green2);
  padding:14px 20px;
  font-size:15px;
  line-height:1.35;
  font-weight: 700;
}

/* Standout Yellow Copy Button */
.aff-btn-copy {
  appearance: none;
  background: linear-gradient(180deg, #ffe83a, #ffd400);
  color: #0b2c14;
  border: 1px solid #d4b400;
  border-radius: 999px;
  padding: 14px 24px;
  height: 52px;
  min-width: 140px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .1s ease, filter .1s ease;
}
.aff-btn-copy:hover { filter: brightness(1.05); transform: translateY(-1px); }
.aff-btn-copy:active { transform: translateY(1px); }
.aff-btn-copy::before { content: "⧉"; font-size: 16px; line-height: 1; }
.aff-btn-copy.is-copied { background: var(--green); color: #fff; border-color: var(--green2); }

@media (max-width:640px){
  #cbCopyBtn{ width:100%; }
}

.aff-link{ color: var(--green); text-decoration: none; border-bottom: 2px solid rgba(21,128,61,.35); font-weight: 900; }
.aff-link:hover{ color: var(--green2); border-bottom-color: var(--green2); }
.aff-muted{ color: var(--muted); font-size: 14px; font-weight: 700; }