/* Ads block (ads-): the consent sheet and house promos in three placements. Tokens only; phone breakpoint 720. */
.ads { padding: 0; }
.ads[hidden] { display: none; }

/* ---- consent: a sheet that rises from the bottom edge, bottom left on a laptop, full width on a phone ---------------------- */
.ads-sheet { position: fixed; z-index: 60; left: 24px; bottom: 24px; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; display: grid; gap: 10px; padding: 22px 22px 20px; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overscroll-behavior: contain; }
.ads-h { font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
.ads-h:focus-visible { outline: none; }
.ads-t { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 60ch; }
.ads-more { font-weight: 600; white-space: nowrap; }
.ads-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.ads-act .k-btn { padding: 0 12px; }
/* the standing choice on a reopened sheet: a dot, so it is never colour alone */
.ads-act [aria-current="true"]::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.ads-sheet[data-open]:not([data-leave]) { animation: ads-rise .6s var(--ease) backwards; }
.ads-sheet[data-leave] { animation: ads-fold .45s var(--ease) forwards; pointer-events: none; }
@keyframes ads-rise { from { transform: translateY(calc(100% + 32px)); opacity: 0; } }
/* folds into its own bottom edge: the top inset closes to 100% while the sides stay wide enough not to clip the shadow */
@keyframes ads-fold { from { clip-path: inset(-60px -60px -60px -60px); } to { clip-path: inset(100% -60px 0 -60px); transform: translateY(14px); opacity: 0; } }

/* ---- promos ------------------------------------------------------------------------------------------------------------- */
.ads-pt { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.ads-px { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ads-body { display: grid; gap: 4px; min-width: 0; }
.ads-go { flex: none; }
.ads-go svg { transition: transform var(--d) var(--ease); }
.ads-img { display: block; object-fit: cover; }

/* banner: a full-width band, the picture on the left */
.ads[data-placement="banner"] { background: var(--surface); border-block: 1px solid var(--line); }
.ads-banner { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; align-items: center; gap: 24px; padding-block: 16px; }
.ads-banner:not(:has(.ads-img)) { grid-template-columns: minmax(0, 1fr) auto; }
.ads-banner .ads-img { width: 168px; height: 105px; border-radius: var(--radius-sm); }

/* card: picture, words, button, in the narrow column */
.ads[data-placement="card"] { padding-block: calc(var(--section) / 2); }
.ads-card { padding: 0; gap: 0; overflow: hidden; }
.ads-card .ads-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.ads-card .ads-body { padding: 20px 20px 16px; }
.ads-card .ads-go { margin: 0 20px 20px; }

/* strip: one line of words and a button on a soft band */
.ads[data-placement="strip"] { background: var(--brand-soft); }
.ads-strip { display: flex; align-items: center; justify-content: center; gap: 16px 20px; flex-wrap: wrap; min-height: 64px; padding-block: 10px; text-align: center; }
.ads-strip .ads-px { color: var(--ink); max-width: 64ch; text-wrap: balance; }
.ads-strip .ads-pt { font-size: 16px; }

@media (hover: hover) and (pointer: fine) {
  .ads-go:hover svg { transform: translateX(3px); }
}

@media (max-width: 720px) {
  .ads-sheet { left: 0; right: 0; bottom: 0; width: auto; max-height: 86dvh; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
  .ads-banner { grid-template-columns: 1fr; gap: 12px; padding-block: 16px; }
  .ads-banner:not(:has(.ads-img)) { grid-template-columns: 1fr; }
  .ads-banner .ads-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .ads-banner .ads-go { width: 100%; }
  .ads-strip { justify-content: flex-start; text-align: left; }
  .ads-strip .ads-go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ads-sheet[data-open]:not([data-leave]) { animation: k-fade .3s ease backwards; }
  .ads-sheet[data-leave] { animation: ads-fade-out .2s ease forwards; }
  .ads-go svg { transition: none; }
}
@keyframes ads-fade-out { to { opacity: 0; } }
