/* Google Ads demo: "Where your budget goes" (Builder S). Prefix: ad- */
.ad__ctl { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px 14px; align-items: center; margin-bottom: clamp(24px, 3vw, 36px); }
.ad__ctl > label { grid-column: 1; grid-row: 1; }
.ad__slide { grid-column: 1; grid-row: 2; }
.ad__say { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ad__slide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.ad__end { padding: 8px 0; border: 0; background: none; cursor: pointer; font: 500 14px/1 var(--sans); letter-spacing: -.01em; color: rgba(245, 245, 244, .55); transition: color .3s; }
.ad__end:hover { color: #fff; }
.ad__range { --v: 0%; width: 100%; height: 28px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.ad__range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--lime) var(--v), rgba(255, 255, 255, .2) var(--v)); }
.ad__range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.ad__range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--lime); }
.ad__range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(198, 244, 50, .0), 0 4px 14px rgba(0, 0, 0, .5); transition: box-shadow .3s; }
.ad__range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; }
.ad__range:hover::-webkit-slider-thumb, .ad__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(198, 244, 50, .3), 0 4px 14px rgba(0, 0, 0, .5); }
.ad__range:focus-visible { outline: none; }
.ad__say { min-height: 4.5em; padding-left: 4px; font-size: 16px; line-height: 1.5; color: rgba(245, 245, 244, .8); display: flex; align-items: center; }

.ad__board { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.ad__terms, .ad__sum { padding: clamp(18px, 2vw, 26px); border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .02); }
.ad__terms-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-bottom: 14px; }
.ad__legend { display: inline-flex; gap: 16px; font: 400 10.5px/1 var(--mono); color: var(--muted); }
.ad__legend span { display: inline-flex; align-items: center; gap: 7px; }
.ad__legend i { width: 12px; height: 10px; border-radius: 3px; }
.ad__legend .w, .ad__bar .w, .ad__m-t .w { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .26) 0 3px, rgba(255, 255, 255, .08) 3px 6px); }
.ad__legend .l, .ad__bar .l, .ad__m-t .l { background: var(--lime); }
.ad__list { display: grid; }
.ad__row { display: grid; grid-template-columns: minmax(140px, 36%) minmax(0, 1fr); align-items: center; gap: 16px; min-height: 46px; padding: 6px 0; border-top: 1px solid var(--line); }
.ad__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/1.3 var(--mono); color: rgba(245, 245, 244, .86); transition: color .4s, opacity .4s; }
.ad__row.is-blocked .ad__t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .45); }
.ad__trk { position: relative; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .035); }
.ad__bar { position: absolute; left: 0; top: 0; bottom: 0; display: flex; width: var(--tw, 0%); overflow: hidden; border-radius: 9px; transition: width .6s var(--ease); }
.ad__bar .w { flex: none; width: var(--ww, 100%); transition: width .6s var(--ease); }
.ad__bar .l { flex: 1; min-width: 0; box-shadow: 0 0 14px rgba(198, 244, 50, .35); }
.ad__tag { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .4s; pointer-events: none; }
.ad__row.is-blocked .ad__tag { opacity: 1; }

.ad__sum { display: flex; flex-direction: column; gap: 22px; }
.ad__m-l { margin-bottom: 10px; font: 500 15px/1.2 var(--sans); letter-spacing: -.02em; }
.ad__m-t { position: relative; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.ad__m-t i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--mw, 50%); border-radius: 11px; transition: width .6s var(--ease); }
.ad__m-t .l { box-shadow: 0 0 18px rgba(198, 244, 50, .4); }
.ad__dots-w { margin-top: 2px; }
.ad__dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ad__dots li { aspect-ratio: 1; border-radius: 50%; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .26) 0 2px, rgba(255, 255, 255, .08) 2px 4px); transition: background .5s, box-shadow .5s, transform .5s var(--ease); }
.ad__dots li.is-l { background: var(--lime); box-shadow: 0 0 10px rgba(198, 244, 50, .55); transform: scale(1.06); }
.ad__neg { margin-top: auto; }
.ad__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 30px; }
.ad__chips li { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; font: 400 11.5px/1 var(--mono); color: rgba(245, 245, 244, .85); animation: ad-chip .5s var(--ease); }
.ad__chips li::before { content: "\2212"; color: var(--lime); }
@keyframes ad-chip { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
.ad__none { margin-top: 12px; font: 400 11.5px/1.4 var(--mono); color: var(--muted); }
.ad__none[hidden] { display: none; }
html[data-motion="off"] .ad__bar, html[data-motion="off"] .ad__bar .w, html[data-motion="off"] .ad__m-t i { transition: none; }
html[data-motion="off"] .ad__chips li { animation: none; }

@media (max-width: 960px) {
  .ad__ctl { grid-template-columns: 1fr; }
  .ad__ctl > label, .ad__slide, .ad__say { grid-column: 1; grid-row: auto; }
  .ad__say { min-height: 3em; padding-left: 0; }
  .ad__board { grid-template-columns: 1fr; }
  .ad__sum { flex-direction: row; flex-wrap: wrap; }
  .ad__sum > .mono-l { flex-basis: 100%; }
  .ad__m { flex: 1 1 240px; }
  .ad__dots-w { flex: 1 1 240px; }
  .ad__neg { flex-basis: 100%; margin-top: 0; }
}
@media (max-width: 560px) {
  .ad__slide { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .ad__range { grid-column: 1 / -1; grid-row: 1; }
  .ad__end:first-of-type { grid-row: 2; justify-self: start; }
  .ad__end:last-of-type { grid-row: 2; justify-self: end; }
  .ad__row { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .ad__legend { gap: 12px; }
}
