/* Advertising spaces. One ruleset, six placements, three layout variants.

   Every variant is built so the paid label cannot be lost: .ad-slot-tag is
   never display:none, never positioned off-screen, and is always the first
   thing in the box in reading order. A space is also visibly a box -- its own
   border and its own background -- so it does not read as another editorial
   card in the column it sits in.

   Print hides advertising entirely: a fridge-door calendar is not an ad
   carrier, and the old .exchange-ad-slot rule did the same thing. */

.ad-slot {
  --ad-ink: #0e2e44;
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 15px 17px;
  border: 1px solid var(--line, #d7d2c4);
  border-top: 3px solid #d9ad57;
  border-radius: 11px;
  background: #f6f4ec;
  min-width: 0;
}
.ad-slot-tag {
  font: 500 9px/1.45 var(--mono, ui-monospace, monospace);
  letter-spacing: .07em;
  color: #7a5a1d;
  margin: 0;
  text-transform: uppercase;
}
.ad-slot-copy { min-width: 0; }
.ad-slot-headline {
  font: 600 21px/1.15 var(--display, Georgia, serif);
  color: var(--ad-ink);
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.ad-slot-message {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink2, #4a4a44);
  margin: 0;
  overflow-wrap: anywhere;
}
/* Default for every variant: a contained mark. The panel and rail spaces are
   narrow and keep this shape; only the inline card below overrides it. */
.ad-slot-creative,
.ad-slot-logo {
  max-width: 100%;
  max-height: 90px;
  width: auto;
  object-fit: contain;
  justify-self: start;
  background: #fffefa;
  border-radius: 5px;
  padding: 4px;
}

/* A booked creative spans the card. It was capped at 90px tall and
   left-aligned, which is right for a logo and wrong for artwork: a 1200px
   illustration drew at 135x90 and nothing in it was legible. The label still
   sits above it in reading order, which is the rule this file exists to keep.

   3:1 with object-fit:cover, so a creative that is not the published shape is
   centre-cropped rather than allowed to set the card's height. Supply 3:1.
   Scoped to --inline on purpose: the panel and rail spaces are narrow columns
   where a banner would be a letterbox, and they keep the contained mark. */
.ad-slot--inline .ad-slot-creative {
  width: 100%;
  max-height: none;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  background: #fffefa;
  display: block;
}
.ad-slot-link {
  justify-self: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--ad-ink);
  color: #fffefa;
  border: 1px solid var(--ad-ink);
}
.ad-slot-link:hover { background: #17415e; }
.ad-slot-foot {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink2, #4a4a44);
  margin: 0;
}
.ad-slot.is-open .ad-slot-headline { font-size: 19px; }

/* Full-width panel: the Exchange sponsor space, in the dark treatment it has
   carried since it shipped. */
.ad-slot--panel {
  --ad-ink: #173a45;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #12394a;
  border-color: #12394a;
  border-top-width: 4px;
  padding: 20px 23px;
  box-shadow: 0 5px 15px #0e2e4410;
}
.ad-slot--panel .ad-slot-tag { grid-column: 1 / -1; color: #f0ca7d; }
.ad-slot--panel .ad-slot-headline { font-size: 27px; color: #fffefa; }
.ad-slot--panel .ad-slot-message { color: #dbe6e3; }
.ad-slot--panel .ad-slot-creative,
.ad-slot--panel .ad-slot-logo { grid-column: 1 / -1; max-height: 56px; }
.ad-slot--panel .ad-slot-link {
  background: #efd49c;
  border-color: #efd49c;
  color: #173a45;
  white-space: nowrap;
}
.ad-slot--panel .ad-slot-link:hover { background: #f6e3bb; }
.ad-slot--panel .ad-slot-foot { grid-column: 1 / -1; color: #bcd0ce; }

/* Narrow rail: the calendar's left column and a place page's sidebar. */
.ad-slot--rail { margin: 15px 0; padding: 13px 14px; }
.ad-slot--rail .ad-slot-headline { font-size: 18px; }
.ad-slot--rail .ad-slot-message { font-size: 13px; }
.ad-slot--rail .ad-slot-creative,
.ad-slot--rail .ad-slot-logo { max-height: 70px; }

@media (max-width: 760px) {
  .ad-slot--panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 17px;
    border-radius: 11px;
  }
  .ad-slot--panel .ad-slot-headline { font-size: 25px; }
  .ad-slot--panel .ad-slot-link { justify-self: start; }
}
@media (max-width: 480px) {
  .ad-slot { padding: 14px 15px; }
  .ad-slot-headline { font-size: 19px; }
}
@media print { .ad-slot { display: none; } }
