/* readmore.me — advertising slots.
   Uses the palette from index.html, with fallbacks so advertise.html can
   load this file on its own. */

:root {
  --ad-surface: var(--surface, #18181c);
  --ad-border: var(--border, #2a2a32);
  --ad-accent: var(--accent, #e8c84a);
  --ad-text: var(--text, #e8e8ee);
  --ad-muted: var(--muted, #7a7a8a);
}

.ad-slot {
  width: 100%;
  max-width: 620px;
}

/* An unfilled slot takes no space, so no layout shift when nothing sells. */
.ad-slot:empty { display: none; }

.ad-slot[data-ad-slot="top"] { margin-top: 24px; }
.ad-slot[data-ad-slot="results"] { margin: 14px 0; }
.ad-slot[data-ad-slot="footer"] { margin-top: 40px; }

.ad-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--ad-surface);
  border: 1.5px solid var(--ad-border);
  border-left: 3px solid var(--ad-accent);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.ad-card:hover {
  border-color: var(--ad-accent);
  background: #1d1d22;
}

.ad-card.ad-house {
  border-left-style: dashed;
  background: transparent;
}

.ad-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  border-radius: 3px;
}

.ad-main { flex: 1; min-width: 0; }

.ad-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ad-muted);
  margin-bottom: 5px;
}

.ad-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ad-text);
  line-height: 1.3;
}

.ad-body {
  font-size: 12px;
  color: var(--ad-muted);
  margin-top: 4px;
  line-height: 1.45;
}

.ad-cta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ad-accent);
  white-space: nowrap;
  align-self: center;
}

/* Banner ads: a single image, no card chrome. */
.ad-banner { display: block; line-height: 0; }
.ad-banner img { width: 100%; height: auto; border-radius: 4px; display: block; }
.ad-banner .ad-label { line-height: normal; margin-bottom: 5px; }

@media (max-width: 520px) {
  .ad-card { flex-wrap: wrap; }
  .ad-cta { align-self: flex-start; }
}

/* Site footer, added with the ad slots so advertisers can find the rates. */
.site-footer {
  width: 100%;
  max-width: 620px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--ad-border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ad-muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--ad-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ad-accent); }
