/* Size the overview against its content area, including when the sidebar is toggled. */
#root .p-console.p-customer main .studio-dashboard {
  max-width: 1440px !important;
  margin-inline: auto;
  container: workbench / inline-size;
}

#root .p-console.p-customer main:has(> .studio-dashboard) {
  padding-inline: clamp(14px, 2vw, 36px);
}

#root .p-console.p-customer .studio-dashboard .hm-hero-row {
  grid-template-columns: minmax(0, 1fr) clamp(246px, 21cqw, 286px);
  align-items: start;
}

#root .p-console.p-customer .studio-dashboard .hm-explore {
  grid-template-columns: clamp(212px, 23cqw, 300px) minmax(0, 1fr);
  height: auto;
  min-height: clamp(306px, 23.5cqw, 338px);
}

#root .p-console.p-customer .studio-dashboard .hm-example-media {
  width: 100%;
  min-height: 0;
}

#root .p-console.p-customer .studio-dashboard .hm-welcome {
  height: auto;
  min-height: 0;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px;
}

#root .p-console.p-customer .studio-dashboard .hm-welcome-copy > h2,
#root .p-console.p-customer .studio-dashboard .hm-welcome-steps {
  margin: 0;
}

#root .p-console.p-customer .studio-dashboard .hm-welcome-copy > p {
  display: none;
}

#root .p-console.p-customer .studio-dashboard .hm-welcome-steps {
  max-width: none;
}

#root .p-console.p-customer .studio-dashboard .st-featured-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#root .p-console.p-customer .studio-dashboard .hm-image-card .st-feature-image {
  width: 100%;
  aspect-ratio: 8 / 5;
  min-height: 184px;
  max-height: 230px;
}

/* Tall desktop windows can show larger previews without squeezing shorter windows. */
@media (min-height: 940px) {
  #root .p-console.p-customer main .studio-dashboard {
    max-width: clamp(1440px, min(78vw, calc(147svh - 70px)), 1760px) !important;
  }

  @container workbench (min-width: 1120px) {
    #root .p-console.p-customer .studio-dashboard .hm-explore {
      grid-template-columns: clamp(264px, 22cqw, 384px) minmax(0, 1fr);
      min-height: clamp(350px, calc(41svh - 40px), 532px);
    }

    #root .p-console.p-customer .studio-dashboard .hm-explore-content {
      padding: 22px 22px 14px;
    }

    #root .p-console.p-customer main .studio-dashboard .hm-explore-heading h2 {
      font-size: 20px !important;
    }

    #root .p-console.p-customer .studio-dashboard .hm-explore-list {
      margin-top: 13px;
    }

    #root .p-console.p-customer main .studio-dashboard .hm-model-row {
      min-height: clamp(44px, calc(5.9svh - 12px), 62px);
      padding: 4px 6px;
      gap: 12px;
    }

    #root .p-console.p-customer main .studio-dashboard .hm-model-row > img {
      width: clamp(30px, 2.2cqw, 40px);
      height: clamp(30px, 2.2cqw, 40px);
    }

    #root .p-console.p-customer main .studio-dashboard .hm-model-row strong {
      font-size: 15px !important;
      line-height: 20px;
    }

    #root .p-console.p-customer main .studio-dashboard .hm-model-row small {
      font-size: 12px !important;
      line-height: 16px;
    }

    #root .p-console.p-customer .studio-dashboard .hm-image-card .st-feature-image {
      height: clamp(232px, calc(37svh - 100px), calc(21cqw - 8px));
      max-height: 380px;
    }
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  #root .p-console.p-customer main:has(> .studio-dashboard) {
    padding-block-start: 18px;
  }

  #root .p-console.p-customer .studio-dashboard .st-heading {
    margin-bottom: 14px;
  }

  #root .p-console.p-customer .studio-dashboard .st-summary-row {
    margin-block: 14px 16px;
  }

  #root .p-console.p-customer .studio-dashboard .st-summary-row > article {
    min-height: 108px;
    padding-block: 10px;
  }
}

@container workbench (max-width: 1050px) {
  #root .p-console.p-customer .studio-dashboard .hm-hero-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #root .p-console.p-customer .studio-dashboard .hm-welcome {
    flex-flow: row wrap;
    align-items: center;
    gap: 6px 16px;
    padding-block: 12px;
  }

  #root .p-console.p-customer .studio-dashboard .hm-welcome-steps {
    display: flex;
    flex: 1 1 490px;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
  }

  #root .p-console.p-customer .studio-dashboard .hm-welcome-step {
    margin-top: 0;
  }
}

@container workbench (max-width: 960px) {
  #root .p-console.p-customer .studio-dashboard .st-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container workbench (max-width: 600px) {
  #root .p-console.p-customer .studio-dashboard .hm-explore {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  #root .p-console.p-customer .studio-dashboard .hm-explore-content {
    min-height: 0;
  }

  #root .p-console.p-customer .studio-dashboard .hm-example-media {
    aspect-ratio: 16 / 9;
    min-height: 174px;
  }

  #root .p-console.p-customer .studio-dashboard .hm-welcome,
  #root .p-console.p-customer .studio-dashboard .hm-welcome-steps {
    flex-direction: column;
    align-items: stretch;
  }

  #root .p-console.p-customer .studio-dashboard .hm-welcome-steps {
    flex-basis: auto;
  }

  #root .p-console.p-customer .studio-dashboard .st-summary-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #root .p-console.p-customer .studio-dashboard .st-summary-row > article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  #root .p-console.p-customer .studio-dashboard .st-summary-row strong {
    grid-column: 1;
    margin: 2px 0 0;
    overflow-wrap: anywhere;
  }

  #root .p-console.p-customer .studio-dashboard .st-summary-row > article > div {
    grid-area: 1 / 2 / 3;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 46cqw;
  }
}

@container workbench (max-width: 460px) {
  #root .p-console.p-customer .studio-dashboard .st-featured-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
