/* The popup inherits its selected service card's computed palette. */
#usecases-status { margin: 0 0 24px; }
#usecases-retry { margin-bottom: 24px; cursor: pointer; }
#usecases-retry[hidden], #usecases-status[hidden], #service-dialog-links-title[hidden] { display: none; }
.service-card-type { overflow-wrap: anywhere; }
.service-dialog {
  color: var(--dialog-foreground, var(--cream));
  background: var(--dialog-card-color, var(--blue));
}
.service-dialog-bar, .service-dialog-layout, .service-dialog-close { background: transparent; }
.service-dialog-links a, .service-dialog-bar .eyebrow, .sample-expanded button { color: inherit; }
.service-dialog :focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.service-dialog.has-usecase[open]:not(.has-expanded-sample) {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: clamp(22px, 3vw, 58px);
  width: calc(100vw - 24px);
  max-width: 1900px;
  height: calc(100dvh - 24px);
  max-height: none;
  padding: clamp(24px, 2.2vw, 40px);
  overflow: auto;
  scrollbar-width: none;
  isolation: isolate;
}
.has-usecase .service-dialog-bar, .has-usecase .service-dialog-layout { display: contents; }
.has-usecase .service-dialog-bar > div { grid-column: 1; grid-row: 1; padding-bottom: 26px; border-bottom: 1px solid currentColor; }
.has-usecase .service-dialog-bar h2 { font-size: clamp(2.6rem, 4.7vw, 5.7rem); line-height: .94; letter-spacing: -.06em; }
.has-usecase .service-dialog-bar .eyebrow { margin-bottom: 16px; font-size: .65rem; letter-spacing: .15em; }
.has-usecase .service-dialog-close { position: absolute; right: 26px; top: 24px; z-index: 15; border-color: currentColor; background: var(--dialog-card-color); }
.has-usecase .service-dialog-body { grid-column: 1; grid-row: 2; align-self: start; max-height: 100%; padding: 24px 4px 10px 0; border: 0; overflow-y: auto; scrollbar-width: none; }
.service-dialog.has-usecase::-webkit-scrollbar, .has-usecase .service-dialog-body::-webkit-scrollbar { display: none; }
.has-usecase .service-dialog-body > p { margin: 0; font-size: clamp(.92rem, 1.15vw, 1.2rem); line-height: 1.65; }
.has-usecase .service-dialog-tags { margin-top: 24px; }
.has-usecase .service-dialog-tags span { border-color: currentColor; font-size: .65rem; }
.has-usecase .service-dialog-body h3 { margin: 26px 0 12px; font-size: 1.4rem; }
.has-usecase .service-dialog-links { gap: 0; }
.has-usecase .service-dialog-links a { padding: 18px 0; font-size: .74rem; line-height: 1.5; border-color: currentColor; }
.has-usecase .service-dialog-links a::after { color: inherit; }
.service-samples.usecase-collage {
  grid-column: 2; grid-row: 1 / 3; align-self: safe center;
  justify-self: center; max-width: calc((100dvh - 145px) * var(--canvas-ratio, 1.25));
  width: 100%; height: auto; min-height: 0; margin: 0; padding: 0;
  background: var(--stage-background, transparent); overflow: visible;
  container-type: inline-size;
}
.usecase-collage::before { content: none; }
.collage-canvas { position: relative; width: 100%; aspect-ratio: var(--canvas-ratio, 1.25); }
.service-samples.usecase-collage .collage-item {
  position: absolute; left: var(--x); top: var(--y); right: auto;
  width: var(--w); margin: 0; padding: 0; z-index: var(--z);
  transform: translate(-50%, -50%) rotate(var(--r));
  background: none; box-shadow: none; color: inherit; transition: none;
}
.service-samples.usecase-collage .collage-frame {
  --media-ratio: 4 / 3;
  position: relative; width: 100%; height: auto; max-height: none;
  aspect-ratio: auto; padding: clamp(10px, 1.8cqw, 20px); overflow: hidden;
  clip-path: polygon(1% 2%, 65% 0, 99% 3%, 100% 96%, 54% 100%, 0 98%);
  background: var(--frame-color, var(--cream)); isolation: isolate;
}
.collage-frame[data-shape='skew'] { clip-path: polygon(2% 0, 100% 3%, 98% 100%, 0 97%); }
.collage-frame[data-shape='paper'] { clip-path: polygon(0 2%, 42% 0, 100% 3%, 99% 97%, 59% 100%, 1% 98%); }
.collage-frame[data-shape='torn'] { clip-path: polygon(0 1%, 34% 4%, 77% 0, 100% 3%, 98% 98%, 51% 100%, 2% 97%); }
.service-samples.usecase-collage .collage-frame img,
.service-samples.usecase-collage .collage-frame video { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; background: transparent; }
.service-samples.usecase-collage .collage-caption {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
  padding: 0; margin: 0; font: 600 clamp(1rem, 1.6cqw, 1.35rem)/1.1 var(--hand);
  color: inherit; text-shadow: none; pointer-events: none;
}
.service-samples.usecase-collage .collage-caption[data-placement='bottom'] { bottom: auto; top: calc(100% + 10px); text-align: center; }
.collage-caption span { display: inline-block; }
.collage-caption-hidden { visibility: hidden; }
.collage-label-arrow { position: absolute; width: 32px; height: 32px; right: 0; bottom: -16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.collage-caption[data-placement='bottom'] .collage-label-arrow { top: -18px; bottom: auto; }
.collage-canvas > .collage-connections { position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.collage-connections path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.collage-media-error { min-height: 100px; padding: 12px; color: var(--blue); background: var(--cream); font-size: .85rem; }
.collage-group { position: absolute; display: grid; left: var(--x); top: var(--y); width: var(--w); z-index: var(--z); transform: translate(-50%, -50%); }
.service-samples.usecase-collage .collage-group > .collage-item {
  position: relative; grid-area: 1 / 1; align-self: center; width: 100%; left: auto; top: auto;
  transform: translate(var(--stack-x), var(--stack-y)) rotate(var(--r));
}
.service-samples.usecase-collage .collage-group > .collage-caption { bottom: calc(100% + 14px); }
.service-samples.usecase-collage .collage-group > .collage-caption[data-placement='bottom'] { top: calc(100% + 18px); bottom: auto; }
.service-samples.usecase-collage .collage-frame .pdf-viewer { height: auto; aspect-ratio: 3 / 4; min-height: 120px; }
.collage-pdf-link { position: absolute; bottom: 12px; z-index: 10; padding: 8px 12px; background: var(--cream); color: var(--ink); font-size: .8rem; }
.collage-canvas .collage-pdf-link { display: none; }
#sample-expanded-stage .pdf-controls { display: none; }
.has-usecase.has-expanded-sample > .service-dialog-bar,
.has-usecase.has-expanded-sample > .service-dialog-layout { display: none; }
#sample-expanded-stage .collage-frame { padding: 0; }
#sample-expanded-stage .collage-frame::before { display: none; }
#sample-expanded-stage .collage-frame img, #sample-expanded-stage .collage-frame video { height: 100%; object-fit: contain; }
@media (max-width: 1000px) {
  .service-dialog.has-usecase[open]:not(.has-expanded-sample) { display: block; padding: 24px; overflow-y: auto; }
  .has-usecase .service-dialog-bar > div { padding-right: 95px; padding-bottom: 22px; }
  .has-usecase .service-dialog-bar h2 { font-size: clamp(2.2rem, 6.5vw, 4rem); }
  .has-usecase .service-dialog-body { max-height: none; overflow: visible; padding: 20px 0 30px; }
  .has-usecase .service-dialog-close { right: 16px; top: 18px; }
  .service-samples.usecase-collage { margin-top: 20px; max-width: none; }
}
@media (max-width: 600px) {
  .service-dialog.has-usecase[open]:not(.has-expanded-sample) { padding: 20px; }
  .has-usecase .service-dialog-bar > div { padding-right: 0; padding-top: 48px; }
  .has-usecase .service-dialog-bar .eyebrow { font-size: .6rem; }
  .has-usecase .service-dialog-close { position: fixed; right: 30px; top: 30px; }
  .service-dialog.has-usecase.is-scrolled::before { content: ''; position: fixed; z-index: 14; top: 13px; left: 50%; transform: translateX(-50%); width: calc(100vw - 26px); height: 70px; background: var(--dialog-card-color); pointer-events: none; }
  .collage-canvas { display: flex; flex-direction: column; gap: 78px; aspect-ratio: auto; padding: 36px 18px; }
  .service-samples.usecase-collage .collage-item { position: relative; width: 87%; left: auto; top: auto; transform: rotate(-3deg); align-self: flex-start; }
  .service-samples.usecase-collage .collage-item:nth-child(even) { align-self: flex-end; transform: rotate(3deg); }
  .service-samples.usecase-collage .collage-item:last-of-type { width: 100%; transform: none; }
  .collage-group { position: relative; width: 80%; left: auto; top: auto; transform: none; align-self: center; margin: 18px 0 42px; }
  .service-samples.usecase-collage .collage-group > .collage-item { width: 100%; align-self: center; transform: translate(var(--stack-x), var(--stack-y)) rotate(var(--r)); }
  .service-samples.usecase-collage .collage-frame { padding: 10px; }
  .collage-connections path { stroke-width: 3; }
}
