/* Keep the application inside one viewport; content areas scroll independently. */
html,
body {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  overflow: hidden;
}

aside {
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

main {
  width: calc(100vw - 225px);
  height: 100vh;
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header,
.stats,
.mode,
footer {
  flex: 0 0 auto;
}

.actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notice {
  flex: 0 0 auto;
  max-height: 15vh;
  overflow-y: auto;
}

.stats {
  margin-top: 18px;
}

.stat {
  padding: 14px 18px;
}

.stat strong {
  font-size: 25px;
  margin-top: 6px;
}

.mode {
  margin: 12px 1px;
}

.workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}

.product-list,
.detail {
  position: static;
  top: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.product-list {
  align-content: start;
  padding-right: 7px;
}

.detail {
  padding-bottom: 28px;
}

footer {
  min-height: 20px;
  margin-top: 8px;
  overflow: hidden;
}

#intake-panel {
  position: fixed;
  z-index: 900;
  top: 20px;
  right: 20px;
  bottom: 20px;
  left: 245px;
  max-height: calc(100vh - 40px);
  margin: 0;
  overflow: auto;
  box-shadow: 0 18px 55px #102d2b33;
}

.asset-menu {
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}

@media (max-width: 1100px) and (min-width: 761px) {
  main {
    width: calc(100vw - 180px);
  }

  #intake-panel {
    left: 200px;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  main {
    padding-top: 18px;
    padding-bottom: 12px;
  }

  .eyebrow,
  header p,
  .stat .foot,
  footer {
    display: none;
  }

  h1 {
    margin-top: 0;
    font-size: 22px;
  }

  .stats {
    margin-top: 10px;
  }
}

@media (max-width: 760px) {
  body {
    display: flex;
    flex-direction: column;
  }

  aside {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    overflow: hidden;
  }

  main {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-left: 0;
  }

  .workspace {
    display: grid;
    grid-template-rows: minmax(105px, 32%) minmax(0, 1fr);
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    margin-bottom: 0;
    overflow-y: auto;
  }

  .detail {
    max-height: none;
    overflow-y: auto;
  }

  #intake-panel {
    inset: 8px;
    max-height: calc(100vh - 16px);
  }
}
