/* M1: ad and next-step units, Direction B (decision 9). Paid units: dashed graphite frame with a drafting hatch and a
   "Sponsored"/"Advertisement" label. Free official resources: dashed sage frame. Data sheets keep their solid 1.5px
   graphite rules, so the two never look alike. Every unit has a fixed height (no layout shift). */
.ad-slot[hidden] { display: none !important; }
.ad-slot { box-sizing: border-box; font-family: var(--body, "Newsreader", Georgia, serif); color: var(--ink, #1D2420); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ad-box { box-sizing: border-box; height: 100%; padding: 12px 16px; border: 1.5px dashed var(--ink, #1D2420); overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.ad-box > * { flex-shrink: 0; }
.ad-free .ad-box { border-color: var(--sage, #6E8B7A); background: var(--film, #EDF1EC); }
.ad-paid .ad-box { background-color: var(--paper, #F6F7F3);
  background-image: repeating-linear-gradient(135deg, transparent 0 7px, rgba(29, 36, 32, .07) 7px 8px); }
.ad-tag { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-family: var(--plat, "Archivo", system-ui, sans-serif);
  font-stretch: 125%; font-size: 12px; line-height: 1.3; }
.ad-label { font-weight: 700; color: var(--ink, #1D2420); text-decoration: underline; text-underline-offset: 2px; }
.ad-paid .ad-label { padding: 1px 6px; border: 1.5px solid var(--ink, #1D2420); text-decoration: none; background: var(--panel, #fff); }
.ad-kind { color: var(--muted, #4D5A53); }
.ad-head { margin: 0; font-family: var(--plat, "Archivo", system-ui, sans-serif); font-stretch: 112%; font-size: 15px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-head a { color: var(--link, #1B5E7A); }
.ad-by { font-weight: 400; color: var(--muted, #4D5A53); font-size: 13px; }
.ad-text, .ad-why, .ad-foot { margin: 0; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ad-why { font-style: italic; color: var(--muted, #4D5A53); -webkit-line-clamp: 1; }
.ad-foot { font-size: 12px; color: var(--muted, #4D5A53); -webkit-line-clamp: 1; display: block; white-space: nowrap; text-overflow: ellipsis; }
.ad-foot > span + span::before { content: " / "; }

/* Report next steps: a full-width row of the report grid, right under the row of the sheet that triggered it. */
.report-grid > .ad-next { grid-column: 1 / -1; height: 132px; padding: 10px 18px; background: var(--panel, #fff);
  border-right: var(--rule, 1.5px solid #1D2420); border-bottom: var(--rule, 1.5px solid #1D2420); }
@media (max-width: 720px) { .report-grid > .ad-next { height: 248px; padding: 10px 12px; } .ad-box { padding: 10px 12px; }
  .ad-head { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .ad-by { display: none; } .ad-text { -webkit-line-clamp: 3; } .ad-why { -webkit-line-clamp: 3; } }

/* Static slots: AdSense / direct units on home and secondary pages. Fixed size; filled only below the fold. */
.ad-slot[data-slot="site.banner.top"], .ad-slot[data-slot="report.after_sources"], .ad-slot[data-slot="site.rail"],
.ad-slot[data-slot="county.in_content"] { display: block; height: 300px; max-width: 1200px; margin: 24px auto; padding: 0 var(--gutter, 16px); }
.ad-adsense .ins, .ad-adsense ins.adsbygoogle { flex: 1 1 auto; }
@media print { .ad-slot { display: none !important; } }
/* M2 logo: direct bookings may carry an approved logo (fixed 48px box, no layout shift). */
.ad-box .ad-logo { float: right; width: 48px; height: 48px; object-fit: contain; margin: 0 0 4px 10px; background: #fff; }
/* M2 logo v2: direct bookings may carry an approved logo, pinned top-right in a fixed 48px box (no layout shift). */
.ad-box:has(.ad-logo) { position: relative; padding-right: 80px; }
.ad-box .ad-logo { position: absolute; top: 12px; right: 16px; width: 48px; height: 48px; object-fit: contain; margin: 0; background: #fff; }
