/**
 * Ad slot min-heights — prevents CLS (cumulative layout shift).
 * Loaded in <head> so space is reserved on first paint, before inject.js fires.
 */

/* Image slots: reserve space so swap is in-place */
[data-ad-slot="in-article-mid"]  { min-height: 250px; display: block; }
[data-ad-slot="article-end"]     { min-height: 250px; display: block; }
[data-ad-slot="home-hero"]       { min-height: 90px;  display: block; }
[data-ad-slot="sidebar"]         { min-height: 600px; display: block; }

/* home-top: short-wide leaderboard — NEVER a square.
   Fixed min-height prevents layout shift when inject.js swaps the SSR fallback. */
[data-ad-slot="home-top"]        { min-height: 56px;  display: block; }

/* Text units: no layout reservation needed */
[data-ad-slot="in-article-text"],
[data-ad-slot="footer-family"]   { min-height: 0; display: block; }

/* Pending state indicator */
[data-ad-pending] {
  background: transparent;
}

/* ── Base styles for JS-injected ads ─────────────────────────────────────── */
.adn-eyebrow {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: #9ca3af;
  margin: 0 0 5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.adn-text-link {
  display: block;
  text-decoration: none;
  color: inherit;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
}

.adn-text-name {
  font-weight: 600;
  color: #111827;
}

.adn-text-tag {
  color: #374151;
}

.adn-text-code {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* Card layout (image slots) */
.adn-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  border-top: 4px solid var(--adn-accent, #4350e8);
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.adn-card--300-250 { flex-direction: row; }
.adn-card--728-90  { flex-direction: row; align-items: center; padding: 0 12px; height: 82px; }
.adn-card--160-600 { flex-direction: column; max-width: 300px; }

/* home-top leaderboard: horizontal single-line layout */
.adn-leader-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  padding: 6px 10px 7px;
  border-radius: 8px;
  background: #f9f5f0;
  border: 1px solid rgba(0,0,0,0.07);
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}
.adn-leader-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  text-decoration: none;
  color: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  flex: 1;
}
.adn-leader-link:hover .adn-leader-name { text-decoration: underline; }
.adn-leader-name  { font-weight: 700; color: #111827; }
.adn-leader-sep   { color: #9ca3af; }
.adn-leader-body  { color: #374151; }
.adn-leader-code  {
  font-family: 'Courier New', monospace;
  font-size: 0.76rem;
  background: rgba(0,0,0,0.07);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.adn-leader-cta   { color: #4350e8; font-weight: 600; white-space: nowrap; }

@media (max-width: 480px) {
  .adn-leader-sep { display: none; }
  .adn-leader-bar { gap: 2px 4px; }
}

.adn-card-img {
  width: 120px;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
}

.adn-card-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.adn-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--adn-accent, #4350e8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.adn-name {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.2;
}

.adn-tag {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.adn-offer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--adn-accent-light, #eef0fd);
  border-left: 3px solid var(--adn-accent, #4350e8);
  border-radius: 4px;
  padding: 6px 8px;
  margin: 3px 0;
}

.adn-offer-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--adn-accent-dark, #2e3ab5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.adn-code {
  font-size: 10px;
  color: #374151;
}

.adn-code strong {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.adn-cta {
  display: inline-block;
  padding: 7px 14px;
  background: var(--adn-accent, #4350e8);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
}
