/* ========================================
   ROYAL QUEENS – AMAZON ADS MASTERPLAN
   CSS Styles
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:    #7c3aed;
  --purple-l:  #a78bfa;
  --purple-d:  #4c1d95;
  --gold:      #d97706;
  --gold-l:    #fbbf24;
  --gold-d:    #92400e;
  --blue:      #1d4ed8;
  --blue-l:    #60a5fa;
  --green:     #059669;
  --green-l:   #34d399;
  --pink:      #db2777;
  --pink-l:    #f472b6;
  --orange:    #ea580c;
  --orange-l:  #fb923c;
  --teal:      #0891b2;
  --teal-l:    #22d3ee;
  --red:       #dc2626;
  --red-l:     #f87171;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.13);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: #f8f7ff;
  color: var(--gray-800);
  line-height: 1.65;
  font-size: 15px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.mt-1 { margin-top: 1rem; }

/* ---- HERO ---- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 40%, #6b21a8 70%, #7c3aed 100%);
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(167,139,250,.25) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(251,191,36,.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px; padding: 6px 18px; font-size: 13px;
  margin-bottom: 20px; font-weight: 500; letter-spacing: .5px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; margin-bottom: 14px; line-height: 1.15;
}
.gradient-text {
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #fde68a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.05rem; opacity: .9; max-width: 560px; margin: 0 auto 28px;
}
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.stat-pill {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 99px; padding: 7px 16px;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}

/* ---- STICKY NAV ---- */
.sticky-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.nav-inner {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; max-width: 1080px; margin: 0 auto;
}
.nav-logo {
  font-weight: 700; color: var(--purple);
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; white-space: nowrap;
}
.nav-links {
  display: flex; gap: 4px; flex-wrap: wrap; flex: 1;
}
.nav-links a {
  color: var(--gray-600); text-decoration: none;
  padding: 5px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  transition: all .2s;
}
.nav-links a:hover { background: var(--purple); color: #fff; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 18px; color: var(--gray-700); }

/* ---- MAIN CONTENT ---- */
.main-content { padding: 36px 20px 60px; }

/* ---- ALERT BOX ---- */
.alert-box {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff; border-radius: var(--radius);
  padding: 20px 28px; margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}
.alert-icon { font-size: 2rem; opacity: .9; }
.alert-box h2 { font-size: 1.2rem; font-family: 'Playfair Display', serif; }
.alert-sub { font-size: 13px; opacity: .8; margin-top: 2px; }

/* ---- CHECKLIST ---- */
.checklist-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.check-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1.5px solid var(--gray-200);
  border-radius: 10px; padding: 12px 14px;
  cursor: pointer; transition: all .2s;
  font-size: 14px;
}
.check-item:hover { border-color: var(--purple-l); box-shadow: 0 2px 8px rgba(124,58,237,.1); }
.check-item input[type="checkbox"] { display: none; }
.checkmark {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--gray-300); border-radius: 5px;
  background: #fff; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.check-item input:checked ~ .checkmark {
  background: var(--green); border-color: var(--green);
}
.check-item input:checked ~ .checkmark::after {
  content: '✓'; color: #fff; font-size: 13px; font-weight: 700;
}
.check-item input:checked ~ span:last-child {
  text-decoration: line-through; color: var(--gray-400);
}
.check-item.completed { background: #f0fdf4; border-color: var(--green-l); }

.check-progress-bar {
  height: 8px; background: var(--gray-200); border-radius: 99px;
  margin-bottom: 6px; overflow: hidden;
}
.check-progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--green-l));
  border-radius: 99px; transition: width .4s ease;
}
.check-progress-label {
  font-size: 13px; color: var(--gray-600); text-align: right; margin-bottom: 32px;
}

/* ---- SECTION CARD ---- */
.section-card {
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); margin-bottom: 28px;
  overflow: hidden; border: 1px solid var(--gray-200);
}

/* ---- SECTION HEADERS ---- */
.section-header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 28px; position: relative;
}
.section-header.purple  { background: linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; }
.section-header.gold    { background: linear-gradient(135deg,#d97706,#f59e0b); color:#fff; }
.section-header.blue    { background: linear-gradient(135deg,#1d4ed8,#3b82f6); color:#fff; }
.section-header.green   { background: linear-gradient(135deg,#059669,#10b981); color:#fff; }
.section-header.pink    { background: linear-gradient(135deg,#db2777,#ec4899); color:#fff; }
.section-header.orange  { background: linear-gradient(135deg,#ea580c,#f97316); color:#fff; }
.section-header.teal    { background: linear-gradient(135deg,#0891b2,#06b6d4); color:#fff; }
.section-header.crown-header { background: linear-gradient(135deg,#1e1b4b,#4c1d95,#7c3aed); color:#fff; }
.section-header.camp-auto-header   { background: linear-gradient(135deg,#7c3aed,#a78bfa); color:#fff; }
.section-header.camp-manual-header { background: linear-gradient(135deg,#1d4ed8,#60a5fa); color:#fff; }
.section-header.camp-product-header{ background: linear-gradient(135deg,#059669,#34d399); color:#fff; }
.section-header.camp-broad-header  { background: linear-gradient(135deg,#ea580c,#fb923c); color:#fff; }

.section-icon {
  width: 46px; height: 46px; min-width: 46px;
  background: rgba(255,255,255,.2); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.section-num {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; opacity: .75; display: block; margin-bottom: 2px;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700; line-height: 1.2;
}
.camp-budget-badge {
  margin-left: auto; background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px; border-radius: 99px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
}

/* ---- CARD INNER PADDING ---- */
.section-card > *:not(.section-header) { padding: 20px 28px; }
.section-card > *:not(.section-header):last-child { padding-bottom: 28px; }

/* ---- INFO CALLOUTS ---- */
.info-callout {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 10px; padding: 14px 16px;
  font-size: 14px; margin: 16px 0;
}
.info-callout.warning  { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.info-callout.info     { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.info-callout.success  { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.info-callout.error    { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.info-callout i { margin-top: 2px; font-size: 1rem; flex-shrink: 0; }
.info-callout.small { font-size: 13px; margin: 10px 0 0; padding: 10px 12px; }

/* ---- BADGES ---- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-blue  { background: #dbeafe; color: #1e3a8a; }
.badge-gold  { background: #fef3c7; color: #92400e; }
.badge-red   { background: #fee2e2; color: #991b1b; }

/* ---- SUBSECTION TITLE ---- */
.subsection-title {
  font-size: 1rem; font-weight: 700; color: var(--gray-800);
  margin: 0 0 14px; display: flex; align-items: center; gap: 8px;
}
.subsection-title .text-green { color: var(--green); }
.red-title { color: var(--red); }

/* ---- KEYWORD GRID ---- */
.keyword-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.kw-tag {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border: 1px solid #c4b5fd; border-radius: 8px;
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  color: #4c1d95; display: flex; align-items: center; gap: 6px;
}
.kw-tag i { font-size: 10px; opacity: .7; }

/* ---- WHY BETTER ---- */
.why-better {
  background: var(--gray-50); border-radius: 10px;
  border: 1px solid var(--gray-200); padding: 16px 20px;
}
.why-better h4 {
  font-size: 14px; font-weight: 700; margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px; color: var(--gold);
}
.why-better ul { list-style: none; }
.why-better li {
  padding: 5px 0; font-size: 14px; color: var(--gray-700);
  display: flex; align-items: center; gap: 8px;
}
.why-better li i { color: var(--purple); font-size: 12px; }

/* ---- MATH CARDS ---- */
.math-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.math-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 18px 14px; text-align: center;
  transition: transform .2s;
}
.math-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.math-card.highlight {
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  border-color: transparent; color: #fff;
}
.math-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  margin: 0 auto 10px; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem;
}
.math-card-icon.price  { background: #dbeafe; color: var(--blue); }
.math-card-icon.margin { background: #d1fae5; color: var(--green); }
.math-card-icon.acos   { background: #fef3c7; color: var(--gold); }
.math-card-icon.clv    { background: rgba(255,255,255,.2); color: #fbbf24; }
.math-card-label { font-size: 12px; color: var(--gray-400); margin-bottom: 4px; }
.math-card.highlight .math-card-label { color: rgba(255,255,255,.65); }
.math-card-value { font-size: 1.8rem; font-weight: 800; color: var(--gray-800); }
.math-card.highlight .math-card-value { color: #fbbf24; }
.math-card-note { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.math-card.highlight .math-card-note { color: rgba(255,255,255,.5); }

.clv-formula {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 20px;
}
.clv-formula h4 {
  font-size: 13px; font-weight: 700; margin-bottom: 8px;
  color: var(--purple); display: flex; align-items: center; gap: 6px;
}
.formula-box {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 1px solid #c4b5fd; border-radius: 8px;
  padding: 12px 16px; font-size: 15px; font-family: monospace;
  color: var(--purple-d); margin-bottom: 8px;
}
.clv-formula p { font-size: 13px; color: var(--gray-600); }

.acos-compare {
  display: flex; align-items: center; gap: 16px;
  margin: 20px 0; flex-wrap: wrap;
}
.acos-card {
  flex: 1; min-width: 150px; border-radius: 12px;
  padding: 18px 16px; text-align: center;
}
.acos-card.standard { background: #fef3c7; border: 1px solid #fde68a; }
.acos-card.strategic { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; }
.acos-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.acos-value { font-size: 2.2rem; font-weight: 800; margin: 4px 0; }
.acos-card.standard .acos-value { color: var(--gold-d); }
.acos-card.strategic .acos-value { color: #fbbf24; }
.acos-sub { font-size: 12px; opacity: .75; }
.acos-arrow { font-size: 1.4rem; color: var(--gray-400); }

/* ---- CAMPAIGN OVERVIEW ---- */
.section-intro {
  font-size: 15px; color: var(--gray-700); margin-bottom: 16px;
}
.campaign-overview {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.camp-card {
  border-radius: 14px; padding: 20px 16px; text-align: center;
  position: relative; overflow: hidden; border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s;
}
.camp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.camp-auto    { background: linear-gradient(135deg, #f5f3ff, #ede9fe); border-color: #c4b5fd; }
.camp-manual  { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #93c5fd; }
.camp-product { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #6ee7b7; }
.camp-broad   { background: linear-gradient(135deg, #fff7ed, #ffedd5); border-color: #fdba74; }
.camp-num {
  position: absolute; top: 10px; left: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.12); color: rgba(0,0,0,.5);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.camp-icon { font-size: 1.8rem; margin-bottom: 8px; }
.camp-auto .camp-icon    { color: var(--purple); }
.camp-manual .camp-icon  { color: var(--blue); }
.camp-product .camp-icon { color: var(--green); }
.camp-broad .camp-icon   { color: var(--orange); }
.camp-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.camp-budget { font-size: 1.3rem; font-weight: 800; margin: 6px 0; }
.camp-auto .camp-budget    { color: var(--purple); }
.camp-manual .camp-budget  { color: var(--blue); }
.camp-product .camp-budget { color: var(--green); }
.camp-broad .camp-budget   { color: var(--orange); }
.camp-desc { font-size: 12px; color: var(--gray-600); margin-bottom: 12px; }
.camp-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  padding: 5px 12px; border-radius: 99px;
  background: rgba(0,0,0,.08); color: var(--gray-700);
  transition: all .2s;
}
.camp-link:hover { background: rgba(0,0,0,.15); }

.budget-total {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 12px 18px; font-size: 14px;
}
.budget-sum { font-size: 15px; }
.budget-sum strong { color: var(--purple); font-size: 16px; }

/* ---- STEPS ---- */
.steps-container { display: flex; flex-direction: column; gap: 16px; }
.step {
  display: flex; gap: 16px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 16px 18px;
}
.critical-step {
  background: #fef9ee; border-color: #fde68a;
}
.step-num {
  width: 32px; height: 32px; min-width: 32px;
  background: var(--purple); color: #fff;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700;
  margin-top: 2px;
}
.critical-num { background: var(--gold); }
.step-content { flex: 1; }
.step-content h4 {
  font-size: 14px; font-weight: 700; margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.step-content h4 i { color: var(--gold); }

.step-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 13px;
}
.path-item {
  background: var(--gray-200); border-radius: 6px;
  padding: 4px 10px; font-weight: 500; font-size: 12px;
}
.step-path i { color: var(--gray-400); font-size: 11px; }

/* ---- SETTINGS TABLE ---- */
.settings-table { border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-200); }
.setting-row {
  display: flex; border-bottom: 1px solid var(--gray-200); font-size: 13.5px;
}
.setting-row:last-child { border-bottom: none; }
.setting-key {
  min-width: 200px; padding: 9px 14px;
  background: var(--gray-100); font-weight: 600;
  color: var(--gray-700); border-right: 1px solid var(--gray-200);
}
.setting-val { padding: 9px 14px; color: var(--gray-800); }
.setting-val.code {
  font-family: monospace; font-size: 13px;
  color: var(--purple); background: #faf5ff;
}
.setting-val.highlight-val { font-weight: 700; color: var(--green); }

/* ---- PLACEMENT GRID ---- */
.placement-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.placement-item {
  flex: 1; min-width: 140px; border-radius: 10px;
  padding: 12px 14px; text-align: center; border: 1.5px solid;
}
.placement-item.high     { background: #f0fdf4; border-color: #86efac; }
.placement-item.medium   { background: #eff6ff; border-color: #93c5fd; }
.placement-item.low      { background: var(--gray-50); border-color: var(--gray-200); }
.placement-item.critical-placement { background: linear-gradient(135deg,#fef3c7,#fffbeb); border-color: #fbbf24; }
.placement-name { font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.placement-val { font-size: 1.5rem; font-weight: 800; }
.placement-item.high .placement-val     { color: var(--green); }
.placement-item.medium .placement-val   { color: var(--blue); }
.placement-item.low .placement-val      { color: var(--gray-400); }
.placement-item.critical-placement .placement-val { color: var(--gold); }
.star-tag {
  display: inline-block; background: var(--gold); color: #fff;
  font-size: 9px; padding: 2px 6px; border-radius: 4px; margin-left: 4px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}

/* ---- NEGATIVE KEYWORDS ---- */
.neg-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.neg-tag {
  background: #fee2e2; color: #991b1b;
  border: 1px solid #fca5a5; border-radius: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 500;
}

/* ---- KEYWORD TABLE ---- */
.keyword-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--gray-200); }
.keyword-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.keyword-table thead th {
  background: var(--gray-800); color: #fff;
  padding: 10px 14px; text-align: left; font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
}
.keyword-table tbody tr { border-bottom: 1px solid var(--gray-100); }
.keyword-table tbody tr:hover { background: var(--gray-50); }
.keyword-table tbody td { padding: 9px 14px; }
.keyword-table td.bid { font-weight: 700; color: var(--green); }
.match {
  display: inline-block; padding: 2px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.match.exact  { background: #1e3a8a; color: #fff; }
.match.phrase { background: #065f46; color: #fff; }
.match.broad  { background: #92400e; color: #fff; }

/* ---- BID GRID ---- */
.bid-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.bid-item {
  flex: 1; min-width: 130px; border-radius: 10px;
  padding: 12px 14px; text-align: center; border: 1.5px solid;
}
.bid-item.high-bid { background: #ecfdf5; border-color: #6ee7b7; }
.bid-item.mid-bid  { background: #eff6ff; border-color: #93c5fd; }
.bid-item.low-bid  { background: var(--gray-50); border-color: var(--gray-200); }
.bid-label { font-size: 12px; color: var(--gray-600); margin-bottom: 6px; }
.bid-val   { font-size: 1.5rem; font-weight: 800; color: var(--green); }

/* ---- SUBSTEP ---- */
.substep {
  display: flex; gap: 12px; margin-bottom: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--gray-200);
}
.substep:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.substep-label {
  width: 26px; height: 26px; min-width: 26px;
  background: var(--blue); color: #fff;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 12px; margin-top: 2px;
}
.substep > div { font-size: 14px; }
.search-queries { list-style: none; margin-top: 8px; }
.search-queries li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--purple); font-weight: 500;
  padding: 4px 0;
}
.criteria-list { list-style: none; margin-top: 8px; }
.criteria-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--gray-700); padding: 4px 0;
}
.criteria-list li i.fa-check  { color: var(--green); margin-top: 2px; }
.criteria-list li i.fa-folder { color: var(--blue); margin-top: 2px; }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 16px; }
.timeline-item {
  display: flex; gap: 20px; margin-bottom: 28px;
  position: relative;
}
.timeline-item::before {
  content: ''; position: absolute; left: -8px; top: 40px;
  bottom: -28px; width: 2px; background: var(--gray-200);
}
.timeline-item:last-child::before { display: none; }
.timeline-marker {
  width: 48px; height: 48px; min-width: 48px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; color: #fff;
  box-shadow: var(--shadow); z-index: 1;
}
.phase-learn   .timeline-marker { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.phase-analyze .timeline-marker { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.phase-scale   .timeline-marker { background: linear-gradient(135deg, #059669, #10b981); }
.timeline-content {
  flex: 1; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: 14px;
  padding: 18px 20px;
}
.timeline-period {
  font-size: 12px; font-weight: 700; color: var(--purple);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px;
}
.timeline-content h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 12px;
}
.timeline-content h4 {
  font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--gray-700);
}

.do-list { margin-bottom: 16px; }
.do-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--gray-200);
}
.do-item:last-child { border-bottom: none; }
.do-item.ok          { color: var(--green); }
.do-item.warning-item { color: var(--red); font-weight: 600; }
.do-item i { font-size: 13px; }

.metric-mini-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.metric-mini {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 8px; padding: 8px 12px; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
  color: var(--gray-700);
}

.action-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.action-card { border-radius: 10px; padding: 14px 16px; }
.negative-action { background: #fef2f2; border: 1px solid #fecaca; }
.positive-action  { background: #ecfdf5; border: 1px solid #a7f3d0; }
.negative-action h4 { color: var(--red); font-size: 13px; margin-bottom: 8px; }
.positive-action  h4 { color: var(--green); font-size: 13px; margin-bottom: 8px; }
.action-card p { font-size: 13px; color: var(--gray-700); margin-bottom: 4px; }
.action-card code {
  background: rgba(0,0,0,.07); border-radius: 4px;
  padding: 1px 6px; font-size: 12px; font-family: monospace;
}

.decision-table { border-radius: 10px; overflow: hidden; border: 1px solid var(--gray-200); }
.decision-row {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1px solid var(--gray-200);
}
.decision-row:last-child { border-bottom: none; }
.green-decision  { background: #ecfdf5; }
.yellow-decision { background: #fffbeb; }
.red-decision    { background: #fef2f2; }
.blue-decision   { background: #eff6ff; }
.d-condition { flex: 1; padding: 10px 14px; font-weight: 600; font-size: 13px; }
.d-arrow     { padding: 10px 10px; color: var(--gray-400); }
.d-action    { flex: 1.5; padding: 10px 14px; font-size: 13px; }

/* ---- PERF TABLE ---- */
.table-responsive { overflow-x: auto; border-radius: 10px; border: 1px solid var(--gray-200); }
.perf-table, .tracking-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.perf-table thead th, .tracking-table thead th {
  background: var(--gray-800); color: #fff;
  padding: 11px 16px; text-align: left; font-size: 12px;
  text-transform: uppercase; letter-spacing: .4px;
}
.perf-table tbody tr:nth-child(odd), .tracking-table tbody tr:nth-child(odd) {
  background: var(--gray-50);
}
.perf-table tbody td, .tracking-table tbody td { padding: 10px 16px; }
.acos-warn { color: var(--red);    font-weight: 700; }
.acos-mid  { color: var(--gold);   font-weight: 700; }
.acos-good { color: var(--green);  font-weight: 700; }

.realloc-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.realloc-card {
  flex: 1; min-width: 180px; border-radius: 10px;
  padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px;
  font-size: 13.5px;
}
.realloc-card i { font-size: 1.3rem; margin-top: 2px; }
.realloc-card.increase { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.realloc-card.increase i { color: var(--green); }
.realloc-card.decrease { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.realloc-card.decrease i { color: var(--red); }

/* ---- ACoS TARGETS ---- */
.acos-targets {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.acos-target-card {
  flex: 1; min-width: 200px; border-radius: 14px;
  padding: 20px; text-align: center;
}
.acos-target-card.breakeven {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #fde68a;
}
.acos-target-card.strategic {
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  border: 1.5px solid #7c3aed; color: #fff;
}
.acos-target-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .7px;
  font-weight: 600; opacity: .7; margin-bottom: 6px;
}
.acos-target-formula {
  font-size: 14px; font-family: monospace;
  margin-bottom: 10px; opacity: .8;
}
.acos-target-val {
  font-size: 3rem; font-weight: 800; line-height: 1;
}
.acos-target-card.breakeven .acos-target-val { color: var(--gold-d); }
.acos-target-card.strategic .acos-target-val { color: #fbbf24; }
.acos-target-note {
  font-size: 12px; opacity: .65; margin-top: 8px;
}

.acos-timeline-goals {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.acos-goal {
  flex: 1; min-width: 130px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 16px; text-align: center;
}
.acos-goal-month { font-size: 12px; font-weight: 700; color: var(--gray-600); margin-bottom: 4px; }
.acos-goal-val { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.acos-goal-val.warn   { color: var(--red); }
.acos-goal-val.medium { color: var(--gold); }
.acos-goal-val.good   { color: var(--green); }
.acos-goal-phase { font-size: 12px; color: var(--gray-500); }
.acos-goal-arrow { font-size: 1.2rem; color: var(--gray-300); }

.results-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.result-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 16px; text-align: center;
  transition: transform .2s;
}
.result-card:hover { transform: translateY(-2px); }
.result-card i { font-size: 1.4rem; color: var(--gray-400); margin-bottom: 6px; }
.result-card.highlight-result {
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  border-color: transparent; color: #fff;
}
.result-card.highlight-result i { color: #fbbf24; }
.result-label { font-size: 12px; color: var(--gray-600); margin-bottom: 4px; }
.result-card.highlight-result .result-label { color: rgba(255,255,255,.7); }
.result-val { font-size: 1.8rem; font-weight: 800; color: var(--purple); }
.result-card.highlight-result .result-val { color: #fbbf24; }
.result-sub { font-size: 12px; color: var(--gray-500); }
.result-card.highlight-result .result-sub { color: rgba(255,255,255,.6); }

/* ---- WINNERS CARD ---- */
.winners-card {
  background: linear-gradient(135deg, #fef9ee, #fffbeb);
  border: 1.5px solid #fde68a; border-radius: 12px;
  padding: 16px; margin-bottom: 20px;
}

/* ---- DAYPART ---- */
.daypart-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.daypart-card {
  flex: 1; min-width: 170px; border-radius: 12px;
  padding: 16px; text-align: center;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  transition: transform .2s;
}
.daypart-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.daypart-card.high-day   { background: linear-gradient(135deg,#fef3c7,#fffbeb); border-color: #fde68a; }
.daypart-card.medium-day { background: linear-gradient(135deg,#eff6ff,#dbeafe); border-color: #93c5fd; }
.daypart-period { font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 4px; }
.daypart-label  { font-size: 13px; color: var(--gray-700); margin-bottom: 8px; }
.daypart-val    { font-size: 1.7rem; font-weight: 800; color: var(--purple); }
.daypart-card.high-day   .daypart-val { color: var(--gold-d); }
.daypart-card.medium-day .daypart-val { color: var(--blue); }

/* ---- RED FLAGS ---- */
.red-flags { display: flex; flex-direction: column; gap: 8px; }
.red-flag {
  display: flex; align-items: center; gap: 12px;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 10px; padding: 12px 16px;
  font-size: 14px; color: #991b1b; font-weight: 500;
}
.red-flag i { color: var(--red); font-size: 14px; }

/* ---- FINALE ---- */
.finale-card { border: 2px solid var(--purple-l); }
.mindset-timeline {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.mindset-item {
  flex: 1; min-width: 150px; border-radius: 12px;
  padding: 16px; text-align: center; display: flex;
  flex-direction: column; gap: 4px;
}
.mindset-item.learning  { background: #fef2f2; border: 1px solid #fecaca; }
.mindset-item.optimizing{ background: #fffbeb; border: 1px solid #fde68a; }
.mindset-item.scaling   { background: #ecfdf5; border: 1px solid #a7f3d0; }
.m-days { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; opacity: .65; }
.m-title { font-size: 14px; font-weight: 700; }
.m-acos  { font-size: 12px; opacity: .7; }
.mindset-arrow { font-size: 1.2rem; color: var(--gray-300); }

.principles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.principle {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 16px;
}
.p-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--purple-l));
  color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 1rem; margin-bottom: 10px;
}
.p-title { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.principle p { font-size: 13px; color: var(--gray-600); }

.goal-90 {
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  border-radius: 14px; padding: 22px; color: #fff; margin-bottom: 20px;
}
.goal-90 h3 {
  font-size: 1rem; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.goal-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.g-stat {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px; padding: 14px; text-align: center;
}
.g-stat i { font-size: 1.2rem; color: #fbbf24; margin-bottom: 6px; }
.g-val { font-size: 1.6rem; font-weight: 800; color: #fbbf24; }
.g-label { font-size: 12px; opacity: .7; margin-top: 4px; }

.final-quote {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 2px solid #fbbf24; border-radius: 14px;
  padding: 22px; text-align: center; font-size: 15px;
  color: var(--gold-d); line-height: 1.8;
}
.final-quote i { color: var(--gold); margin: 0 4px; font-size: 1rem; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--gray-900); color: rgba(255,255,255,.7);
  padding: 28px 20px; text-align: center;
}
.site-footer p { font-size: 14px; display: flex; align-items: center;
  justify-content: center; gap: 6px; }
.site-footer i { color: #fbbf24; }
.footer-sub { margin-top: 4px; font-size: 16px; opacity: .9; }

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  width: 44px; height: 44px; background: var(--purple);
  color: #fff; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 15px; text-decoration: none;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
  opacity: 0; pointer-events: none; transition: all .3s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--purple-d); transform: translateY(-2px); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 56px; left: 0; right: 0;
    background: #fff; padding: 14px 20px 18px;
    border-bottom: 2px solid var(--gray-200);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 999;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .nav-links.open a {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav-links.open a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; }
  .nav-toggle:hover { background: var(--gray-100); }

  .section-header { flex-wrap: wrap; }
  .camp-budget-badge { margin-left: 0; }
  .setting-key { min-width: 140px; font-size: 12px; }
  .action-cards { grid-template-columns: 1fr; }
  .step { flex-direction: column; }
  .step-num { width: 28px; height: 28px; min-width: 28px; font-size: 12px; }
  .acos-compare { flex-direction: column; }
  .acos-arrow { transform: rotate(90deg); }
  .mindset-timeline, .acos-timeline-goals { flex-direction: column; }
  .mindset-arrow, .acos-goal-arrow { transform: rotate(90deg); }
  .section-card > *:not(.section-header) { padding: 14px 16px; }
  .section-card > *:not(.section-header):last-child { padding-bottom: 20px; }
  .hero { padding: 48px 0 36px; }
  .math-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .campaign-overview { grid-template-columns: 1fr 1fr; }
  .math-cards { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr 1fr; }
}
