/* /demos: a sidebar of filters beside a grid of tiles. Pressing a tile flies it to the top
   left and opens it into the viewer, where the demo loads. Demos draw inside .dx-mount,
   which is a size container, so they lay out by the space they get, not the window. */
.dx { display: grid; gap: 20px; padding-top: 24px; padding-bottom: 48px; min-height: calc(100dvh - 140px); }
@media (min-width: 960px) { .dx { grid-template-columns: 232px minmax(0, 1fr); gap: 32px; padding-top: 32px; } }

/* sidebar */
.dx-side { font-family: var(--sans); min-width: 0; }
.dx-side-h { margin: 0 0 8px; font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dx-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.dx-filters::-webkit-scrollbar { display: none; }
.dx-filter { flex: none; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font: 500 14px var(--sans); color: var(--ink); cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.dx-filter:hover { border-color: var(--ink); }
.dx-filter[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.dx-filter .n { font-size: 12px; color: var(--muted); }
.dx-filter[aria-selected="true"] .n { color: var(--orange); }
.dx-filter small { display: none; }
.dx-basecard { display: none; }
.dx-switch { margin-top: 18px; }
.dx-switch-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.dx-switch-list::-webkit-scrollbar { display: none; }
.dx-sw { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font: 500 13.5px var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.dx-sw:hover { border-color: var(--ink); }
.dx-sw[aria-current="true"] { border-color: var(--orange); background: #fff7ef; }
.dx-sw .dx-ico { width: 30px; height: 30px; border-radius: 8px; }
.dx-sw .dx-ico svg { width: 16px; height: 16px; }
.dx.is-open .dx-filters, .dx.is-open .dx-side > .dx-side-h:first-child { display: none; }
.dx.is-open .dx-switch { margin-top: 0; }
@media (min-width: 960px) {
  .dx-side { position: sticky; top: 20px; align-self: start; }
  .dx-filters, .dx-switch-list { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 4px; }
  .dx-filter { border-color: transparent; border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
  .dx-filter:hover { border-color: var(--line); }
  .dx-filter .n { margin-left: auto; }
  .dx-filter small { display: block; flex-basis: 100%; font-size: 12px; color: var(--muted); line-height: 1.3; }
  .dx-filter[aria-selected="true"] small { color: rgba(255, 255, 255, .65); }
  .dx-sw { border-color: transparent; }
  .dx-basecard { display: block; margin-top: 24px; padding: 16px; border-radius: 14px; background: var(--orange); color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.45; }
  .dx-basecard b { display: block; font-size: 15px; margin-bottom: 4px; }
  .dx-basecard span { display: block; }
  .dx-basecard-go { display: flex !important; align-items: center; gap: 6px; margin-top: 10px; font: 600 11.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
  .dx-basecard-go svg { width: 15px; height: 15px; }
  .dx-basecard:hover { background: var(--ink); color: #fff; }
}

/* gallery */
.dx-stage { min-width: 0; position: relative; }
.dx-intro { max-width: 760px; margin-bottom: 24px; }
.dx-intro .muted { font-size: 17px; margin: 0; }
.dx-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.dx-tile { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff;
  cursor: pointer; font-family: var(--sans); color: var(--ink); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s, opacity .25s; }
.dx-tile:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 14px 30px -14px rgba(11, 11, 11, .35); }
.dx-tile[hidden] { display: none; }
.dx-art { position: relative; height: 112px; display: flex; align-items: flex-end; padding: 16px; overflow: hidden; }
.dx-art::after { content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: currentColor; opacity: .08; }
.a-quotes { background: var(--ink); color: var(--orange); }
.a-whatsapp { background: #e8f8ee; color: #128c4a; }
.a-personal { background: #fff1e4; color: var(--orange-text); }
.a-go { background: var(--surface); color: var(--ink); }
.dx-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35); }
.dx-ico svg { width: 26px; height: 26px; }
.a-quotes .dx-ico { background: var(--orange); }
.dx-aud { position: absolute; top: 14px; right: 14px; font: 600 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.dx-tbody { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; gap: 6px; }
.dx-tbody b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.dx-for { font-size: 12.5px; color: var(--orange-text); font-weight: 600; }
.dx-blurb { font: 14.5px/1.5 var(--serif); color: var(--muted); }
.dx-tfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.dx-price { font: 600 12.5px var(--sans); padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.dx-open { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.dx-open svg { width: 15px; height: 15px; transition: transform .2s; }
.dx-tile:hover .dx-open svg { transform: translateX(3px); }
.dx-gallery.leaving .dx-tile:not(.flying-src) { opacity: 0; transform: translateY(16px) scale(.98); }
.dx-tile.flying-src { opacity: 0; }

/* the tile in flight */
.dx-flyer { position: fixed; z-index: 40; margin: 0; pointer-events: none; overflow: hidden; border-radius: 18px; border: 1px solid var(--ink); background: #fff;
  box-shadow: 0 30px 60px -20px rgba(11, 11, 11, .45); }
.dx-flyer .dx-art { height: 100%; }

/* viewer */
.dx-viewer { border: 2px solid var(--ink); border-radius: 20px; background: #fff; overflow: hidden; box-shadow: 0 10px 0 -3px var(--orange); }
.dx-viewer[hidden] { display: none; }
.dx-viewer.entering .dx-vbar > *, .dx-viewer.entering .dx-vbody, .dx-viewer.entering .dx-vfoot { opacity: 0; }
.dx-vbar > *, .dx-vbody, .dx-vfoot { transition: opacity .25s ease; }
.dx-vbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 12px 12px 14px; background: var(--ink); color: #fff; font-family: var(--sans); }
.dx-vico { flex: none; }
.dx-vico .dx-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--orange); }
.dx-vico .dx-ico svg { width: 21px; height: 21px; }
.dx-vtitle { min-width: 0; flex: 1; }
.dx-vtitle b { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.dx-vtitle small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-vbar .live { display: none; }
.dx-vbuy { padding: 10px 16px; font-size: 11.5px; }
.dx-vbuy:hover { background: #fff; color: var(--ink); }
.dx-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08);
  color: #fff; cursor: pointer; transition: background .15s, transform .15s; }
.dx-close:hover { background: #fff; color: var(--ink); transform: rotate(90deg); }
.dx-close svg { width: 20px; height: 20px; }
@media (max-width: 640px) { .dx-vbuy { order: 5; flex: 1 1 100%; } .dx-vtitle small { white-space: normal; } }
@media (min-width: 760px) { .dx-vbar .live { display: inline-flex; } }
.dx-vbody { position: relative; min-height: 420px; }
.dx-mount { container-type: inline-size; }
.dx-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px var(--sans); color: var(--muted); }
.dx-loading[hidden] { display: none; }
.dx-loading i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); animation: dx-dot 1s ease-in-out infinite; }
.dx-loading i:nth-child(2) { animation-delay: .15s; }
.dx-loading i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes dx-dot { 50% { transform: translateY(-6px); opacity: .4; } }
.dx-vfoot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; padding: 16px 18px; border-top: 1px solid var(--line); background: #fff7ef; font-family: var(--sans); }
.dx-vfoot b { display: block; font-size: 16px; font-weight: 600; }
.dx-vfoot span { display: block; font-size: 13.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .dx-tile, .dx-vbar > *, .dx-vbody, .dx-vfoot { transition: none; }
  .dx-loading i { animation: none; }
}
